{"id":32663877,"url":"https://github.com/vraxo/coalesce","last_synced_at":"2026-05-15T18:04:34.429Z","repository":{"id":321279682,"uuid":"1085207107","full_name":"Vraxo/Coalesce","owner":"Vraxo","description":"A .NET CLI tool to merge your entire codebase into a single file for AI prompts","archived":false,"fork":false,"pushed_at":"2025-10-28T19:01:00.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-28T21:05:09.057Z","etag":null,"topics":["ai","automation","chatgpt","claude","cli","code-mergers","csharp","developer-tools","dotnet","gemini","llm","productivity","prompt-engineering","prompt-generator"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vraxo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-28T18:15:26.000Z","updated_at":"2025-10-28T19:13:46.000Z","dependencies_parsed_at":"2025-10-28T21:18:40.010Z","dependency_job_id":null,"html_url":"https://github.com/Vraxo/Coalesce","commit_stats":null,"previous_names":["vraxo/coalesce"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Vraxo/Coalesce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vraxo%2FCoalesce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vraxo%2FCoalesce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vraxo%2FCoalesce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vraxo%2FCoalesce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vraxo","download_url":"https://codeload.github.com/Vraxo/Coalesce/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vraxo%2FCoalesce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":282070789,"owners_count":26608933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-31T02:00:07.401Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","automation","chatgpt","claude","cli","code-mergers","csharp","developer-tools","dotnet","gemini","llm","productivity","prompt-engineering","prompt-generator"],"created_at":"2025-10-31T23:00:52.283Z","updated_at":"2025-10-31T23:02:13.702Z","avatar_url":"https://github.com/Vraxo.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ✨ Coalesce\n\nA simple CLI tool to merge source code from multiple files and directories into a single, context-rich text file.\n\n---\n\n### 🤖 About This Project\n\n**Coalesce** is a command-line utility designed to solve a specific problem: consolidating an entire project's source code into one file. The primary goal is to create a comprehensive input for Large Language Models (LLMs), providing them with the full context of a codebase in a single pass—a process used extensively during the development of Coalesce itself.\n\nThis is a solo project, developed almost entirely by AI. It's built primarily for personal use, but is being shared in the hope that it might be useful to others. Please use it with the understanding that it's a personal tool, not a commercial product. It's provided \"as-is\" without any guarantees.\n\n---\n\n## ✅ Features\n\n- **Directory Merging**: Scans one or more source directories and merges all eligible files.\n- **Configuration File**: Easily configure options using a `coalesce.yaml` file.\n- **CLI Overrides**: All configuration options can be overridden with command-line arguments for flexibility.\n- **Smart Filtering**:\n  - Include files based on a whitelist of extensions (`--include-ext`).\n  - Exclude directories and files by name (`--exclude-dir`, `--exclude-file`).\n  - Exclude files by extension (`--exclude-ext`).\n- **Path-Only Mode**: Include the path of binary or irrelevant files without their content (`--path-only-ext`).\n- **Project Presets**: Quickly generate a `coalesce.yaml` for common project types like `dotnet` and `node`.\n- **Custom Presets**: Create your own presets for your specific project structures.\n- **Dry Run Mode**: Preview which files will be included in the output without actually writing the file using the `--dry-run` flag.\n- **Cross-Platform**: Generates OS-specific run scripts (`coalesce-run.bat` or `coalesce-run.sh`) for ease of use.\n\n---\n\n## 📥 Installation\n\n**Platform Support Note:** Coalesce is developed and tested primarily on **Windows** 🖥️. While the core functionality is intended to be cross-platform, its behavior on macOS and Linux has not been verified. Some features, like the automatic `install-path` command, are Windows-specific.\n\n1. Download the latest executable for your operating system from the **Releases** page.\n2. Place the executable in a directory of your choice.\n3. For ease of use, add this directory to your system's PATH environment variable.\n\nFor Windows users, you can use the built-in command to add Coalesce to your user PATH automatically:\n\n```sh\ncoalesce install-path\n```\n\n*You may need to restart your terminal for the PATH change to take effect.*\n\n---\n\n## 🚀 Quick Start\n\nThe easiest way to get started is by using the `init` command in your project's root directory.\n\n1. **Initialize Configuration**\n   \n   This command creates a default `coalesce.yaml` file and an appropriate run script (`.bat` or `.sh`).\n   \n   ```sh\n   coalesce init\n   ```\n   \n   If you're working with a Node.js or .NET project, you can use a preset to get a more tailored configuration:\n   \n   ```sh\n   # For a Node.js project\n   coalesce init --preset node\n   \n   # For a .NET project\n   coalesce init --preset dotnet\n   ```\n\n2. **Customize `coalesce.yaml`**\n   \n   Open the newly created `coalesce.yaml` and edit the `sourceDirectoryPaths` and other options to match your project structure.\n   \n   ```yaml\n   # Path for the final merged output file.\n   outputFilePath: coalesce.md\n   \n   # List of source directories to scan for files.\n   sourceDirectoryPaths:\n     - ./src\n     # - ./another-source-folder\n   ```\n\n3. **Run the Merge**\n   \n   Simply execute the main command. It will automatically find and use your `coalesce.yaml` file.\n   \n   ```sh\n   coalesce\n   ```\n   \n   This will generate the `coalesce.md` file (or whatever you specified in your config) in the current directory.\n\n---\n\n## 🛠️ Usage\n\n### The `merge` Command\n\nThis is the default command. It merges files based on configuration from `coalesce.yaml` and any command-line overrides.\n\n**Syntax**\n\n```sh\ncoalesce [output-file] [source-dirs...] [options]\n```\n\n- `[output-file]`: (Optional) The path for the merged output file. **Overrides** the value in `coalesce.yaml`.\n- `[source-dirs...]`: (Optional) One or more source directories to scan. **Overrides** the list in `coalesce.yaml`.\n\n**Options**\n\n| Option                  | Description                                                                               | Behavior with `coalesce.yaml`             |\n| ----------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------- |\n| `--config \u003cpath\u003e`       | Path to a specific YAML configuration file.                                               |                                           |\n| `--exclude-dir \u003cname\u003e`  | Excludes a directory by name (e.g., 'node_modules'). Can be used multiple times.          | **Adds to** the list in the config file.  |\n| `--exclude-file \u003cname\u003e` | Excludes a file by name (e.g., 'yarn.lock'). Can be used multiple times.                  | **Adds to** the list in the config file.  |\n| `--include-ext \u003cext\u003e`   | Includes only files with this extension (e.g., '.md'). Can be used multiple times.        | **Replaces** the list in the config file. |\n| `--exclude-ext \u003cext\u003e`   | Excludes files with this extension (e.g., '.log'). Can be used multiple times.            | **Adds to** the list in the config file.  |\n| `--path-only-ext \u003cext\u003e` | Includes a file by path only, without content (e.g., '.dll'). Can be used multiple times. | **Adds to** the list in the config file.  |\n| `--dry-run`             | Simulates a merge, printing which files would be included.                                |                                           |\n| `-q`, `--quiet`         | Suppresses all informational output.                                                      |                                           |\n| `-v`, `--verbose`       | Enables detailed output, showing why files are skipped.                                   |                                           |\n| `--help`                | Show help and usage information.                                                          |                                           |\n\n**Example**\n\n```sh\n# Run using the config file, but add 'dist' to the excluded directories\ncoalesce --exclude-dir dist\n\n# Run with a specific output file and source, ignoring the config for those values\ncoalesce docs/context.md ./src ./lib --include-ext .js .css\n```\n\n### Other Commands\n\n#### `init`\n\nGenerates a `coalesce.yaml` configuration file and a run script.\n\n```sh\ncoalesce init [--preset \u003cname\u003e]\n```\n\n- `--preset`: (Optional) Initializes the config from a built-in (`dotnet`, `node`) or custom preset.\n\n#### `preset`\n\nManages configuration presets.\n\n- `coalesce preset list`: Lists all available built-in and custom presets.\n- `coalesce preset path`: Displays the path to the user's custom presets directory.\n\n#### `install-path` / `uninstall-path`\n\nManages the application's presence in the system PATH.\n\n- On **Windows**, this command modifies the user's PATH automatically.\n- On **macOS/Linux**, this command displays manual instructions for updating your PATH.\n\n---\n\n## 📝 Configuration (`coalesce.yaml`)\n\nThe `coalesce.yaml` file is the primary way to configure the tool for a project. The `init` command generates this file for you.\n\nHere is an example of the default configuration:\n\n```yaml\n# Default configuration for Coalesce.\n# Use 'coalesce init --preset \u003cname\u003e' for project-specific templates (e.g., dotnet, node).\n\n# Path for the final merged output file.\noutputFilePath: coalesce.md\n\n# List of source directories to scan for files.\nsourceDirectoryPaths:\n  - ./src\n\n# (Whitelist) To process ONLY specific file types, add their extensions here (e.g., \".cs\", \".py\").\n# If this list is empty, Coalesce processes ALL files not matched by other exclusion rules.\nincludeExtensions: []\n\n# (Blacklist) Explicitly skip files with these extensions.\nexcludeExtensions: []\n\n# Skip directories with these names (case-insensitive).\nexcludeDirectoryNames:\n  - .git\n\n# Skip files with these names (case-insensitive).\nexcludeFileNames:\n  - .DS_Store\n  - Thumbs.db\n  - coalesce.yaml\n\n# For these file types, only include their path in the output, not their content.\n# Useful for binary files like images, DLLs, etc.\npathOnlyExtensions:\n  - .png\n  - .jpg\n  - .jpeg\n  - .gif\n  - .bmp\n  - .svg\n  - .ico\n  - .webp\n  - .dll\n  - .exe\n```\n\n---\n\n## 🎨 Presets\n\nPresets are templates for `coalesce.yaml` that help you get started quickly.\n\n**Using a Preset**\nUse the `init` command with the `--preset` option:\n\n```sh\ncoalesce init --preset node\n```\n\n**Creating a Custom Preset**\n\n1. Find your presets directory:\n   \n   ```sh\n   coalesce preset path\n   ```\n\n2. Navigate to that directory.\n\n3. Copy the `_template.yaml` file to a new file, for example `my-preset.yaml`.\n\n4. Customize `my-preset.yaml` to your needs.\n\nYou can now use your custom preset:\n\n```sh\ncoalesce init --preset my-preset\n```\n\nYour custom preset will now also appear when you run `coalesce preset list`.\n\n---\n\n## 🤝 Contributing\n\nContributions are very welcome! If you encounter a bug, have an idea for a new feature, or want to improve the code, please feel free to:\n\n- 🐛 **Open an Issue**: Report bugs or suggest new features.\n- 🧑‍💻 **Submit a Pull Request**: Offer improvements, fixes, or new functionality.\n\n---\n\n## 📜 License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvraxo%2Fcoalesce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvraxo%2Fcoalesce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvraxo%2Fcoalesce/lists"}