combicode


Namecombicode JSON
Version 1.4.0 PyPI version JSON
download
home_pageNone
SummaryA CLI tool to combine a project's codebase into a single file for LLM context.
upload_time2025-08-13 23:48:15
maintainerNone
docs_urlNone
authorA. Aurelions
requires_python>=3.8
licenseMIT License Copyright (c) 2025 A. Aurelions Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Combicode

[![NPM Version](https://img.shields.io/npm/v/combicode.svg)](https://www.npmjs.com/package/combicode)
[![PyPI Version](https://img.shields.io/pypi/v/combicode.svg)](https://pypi.org/project/combicode/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

<img align="center" src="https://github.com/aaurelions/combicode/raw/main/screenshot.png" width="800"/>

**Combicode** is a zero-dependency CLI tool that intelligently combines your project's source code into a single, LLM-friendly text file.

The generated file starts with a system prompt and a file tree overview, priming the LLM to understand your project's complete context instantly. Paste the contents of `combicode.txt` into ChatGPT, Claude, or any other LLM to get started.

## Why use Combicode?

- **Maximum Context:** Gives your LLM a complete picture of your project structure and code.
- **Intelligent Priming:** Starts the output with a system prompt and a file tree, directing the LLM to analyze the entire codebase before responding.
- **Intelligent Ignoring:** Automatically skips `node_modules`, `.venv`, `dist`, `.git`, binary files, and other common junk.
- **`.gitignore` Aware:** Respects your project's existing `.gitignore` rules out of the box.
- **Zero-Install Usage:** Run it directly with `npx` or `pipx` without polluting your environment.
- **Customizable:** Easily filter by file extension or add custom ignore patterns.

## Quick Start

Navigate to your project's root directory in your terminal and run one of the following commands:

#### For Node.js/JavaScript/TypeScript projects (via `npx`):

```bash
npx combicode
```

#### For Python projects (or general use, via `pipx`):

```bash
pipx run combicode
```

This will create a `combicode.txt` file in your project directory, complete with the context-setting header.

## Usage and Options

### Preview which files will be included

Use the `--dry-run` or `-d` flag to see a list of files without creating the output file.

```bash
# npx
npx combicode --dry-run

# pipx
pipx run combicode -d
```

### Specify an output file

Use the `--output` or `-o` flag.

```bash
npx combicode -o my_project_context.md
```

### Include only specific file types

Use the `--include-ext` or `-i` flag with a comma-separated list of extensions.

```bash
# Include only TypeScript, TSX, and CSS files
npx combicode -i .ts,.tsx,.css

# Include only Python and YAML files
pipx run combicode -i .py,.yaml
```

### Add custom exclude patterns

Use the `--exclude` or `-e` flag with comma-separated glob patterns.

```bash
# Exclude all test files and anything in a 'docs' folder
npx combicode -e "**/*_test.py,docs/**"
```

### Generating Context for `llms.txt`

The `--llms.txt` or `-l` flag is designed for projects that use an [`llms.txt`](https://llmstxt.org/) file to specify important documentation. When this flag is used, Combicode inserts a specialized system prompt telling the LLM that the provided context is the project's definitive documentation for a specific version. This helps the LLM provide more accurate answers and avoid using deprecated functions.

```bash
# Combine all markdown files for an llms.txt context
npx combicode -l -i .md -o llms.txt
```

## All CLI Options

| Option           | Alias | Description                                                                    | Default         |
| ---------------- | ----- | ------------------------------------------------------------------------------ | --------------- |
| `--output`       | `-o`  | The name of the output file.                                                   | `combicode.txt` |
| `--dry-run`      | `-d`  | Preview files without creating the output file.                                | `false`         |
| `--include-ext`  | `-i`  | Comma-separated list of extensions to exclusively include.                     | (include all)   |
| `--exclude`      | `-e`  | Comma-separated list of additional glob patterns to exclude.                   | (none)          |
| `--llms-txt`     | `-l`  | Use a specialized system prompt for context generated from an `llms.txt` file. | `false`         |
| `--no-gitignore` |       | Do not use patterns from the project's `.gitignore` file.                      | `false`         |
| `--no-header`    |       | Omit the introductory prompt and file tree from the output.                    | `false`         |
| `--version`      | `-v`  | Show the version number.                                                       |                 |
| `--help`         | `-h`  | Show the help message.                                                         |                 |

## License

This project is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "combicode",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "A. Aurelions",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/37/70/93618aa0006a29c2ad736ea05ddf6d3e63a27cfbbb0e27a6824f7ab99e42/combicode-1.4.0.tar.gz",
    "platform": null,
    "description": "# Combicode\n\n[![NPM Version](https://img.shields.io/npm/v/combicode.svg)](https://www.npmjs.com/package/combicode)\n[![PyPI Version](https://img.shields.io/pypi/v/combicode.svg)](https://pypi.org/project/combicode/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n<img align=\"center\" src=\"https://github.com/aaurelions/combicode/raw/main/screenshot.png\" width=\"800\"/>\n\n**Combicode** is a zero-dependency CLI tool that intelligently combines your project's source code into a single, LLM-friendly text file.\n\nThe generated file starts with a system prompt and a file tree overview, priming the LLM to understand your project's complete context instantly. Paste the contents of `combicode.txt` into ChatGPT, Claude, or any other LLM to get started.\n\n## Why use Combicode?\n\n- **Maximum Context:** Gives your LLM a complete picture of your project structure and code.\n- **Intelligent Priming:** Starts the output with a system prompt and a file tree, directing the LLM to analyze the entire codebase before responding.\n- **Intelligent Ignoring:** Automatically skips `node_modules`, `.venv`, `dist`, `.git`, binary files, and other common junk.\n- **`.gitignore` Aware:** Respects your project's existing `.gitignore` rules out of the box.\n- **Zero-Install Usage:** Run it directly with `npx` or `pipx` without polluting your environment.\n- **Customizable:** Easily filter by file extension or add custom ignore patterns.\n\n## Quick Start\n\nNavigate to your project's root directory in your terminal and run one of the following commands:\n\n#### For Node.js/JavaScript/TypeScript projects (via `npx`):\n\n```bash\nnpx combicode\n```\n\n#### For Python projects (or general use, via `pipx`):\n\n```bash\npipx run combicode\n```\n\nThis will create a `combicode.txt` file in your project directory, complete with the context-setting header.\n\n## Usage and Options\n\n### Preview which files will be included\n\nUse the `--dry-run` or `-d` flag to see a list of files without creating the output file.\n\n```bash\n# npx\nnpx combicode --dry-run\n\n# pipx\npipx run combicode -d\n```\n\n### Specify an output file\n\nUse the `--output` or `-o` flag.\n\n```bash\nnpx combicode -o my_project_context.md\n```\n\n### Include only specific file types\n\nUse the `--include-ext` or `-i` flag with a comma-separated list of extensions.\n\n```bash\n# Include only TypeScript, TSX, and CSS files\nnpx combicode -i .ts,.tsx,.css\n\n# Include only Python and YAML files\npipx run combicode -i .py,.yaml\n```\n\n### Add custom exclude patterns\n\nUse the `--exclude` or `-e` flag with comma-separated glob patterns.\n\n```bash\n# Exclude all test files and anything in a 'docs' folder\nnpx combicode -e \"**/*_test.py,docs/**\"\n```\n\n### Generating Context for `llms.txt`\n\nThe `--llms.txt` or `-l` flag is designed for projects that use an [`llms.txt`](https://llmstxt.org/) file to specify important documentation. When this flag is used, Combicode inserts a specialized system prompt telling the LLM that the provided context is the project's definitive documentation for a specific version. This helps the LLM provide more accurate answers and avoid using deprecated functions.\n\n```bash\n# Combine all markdown files for an llms.txt context\nnpx combicode -l -i .md -o llms.txt\n```\n\n## All CLI Options\n\n| Option           | Alias | Description                                                                    | Default         |\n| ---------------- | ----- | ------------------------------------------------------------------------------ | --------------- |\n| `--output`       | `-o`  | The name of the output file.                                                   | `combicode.txt` |\n| `--dry-run`      | `-d`  | Preview files without creating the output file.                                | `false`         |\n| `--include-ext`  | `-i`  | Comma-separated list of extensions to exclusively include.                     | (include all)   |\n| `--exclude`      | `-e`  | Comma-separated list of additional glob patterns to exclude.                   | (none)          |\n| `--llms-txt`     | `-l`  | Use a specialized system prompt for context generated from an `llms.txt` file. | `false`         |\n| `--no-gitignore` |       | Do not use patterns from the project's `.gitignore` file.                      | `false`         |\n| `--no-header`    |       | Omit the introductory prompt and file tree from the output.                    | `false`         |\n| `--version`      | `-v`  | Show the version number.                                                       |                 |\n| `--help`         | `-h`  | Show the help message.                                                         |                 |\n\n## License\n\nThis project is licensed under the MIT License.\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 A. Aurelions\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        ",
    "summary": "A CLI tool to combine a project's codebase into a single file for LLM context.",
    "version": "1.4.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/aaurelions/combicode/issues",
        "Homepage": "https://github.com/aaurelions/combicode"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7d7b843d15570c170aae5897e4562c238230d2bd1699c0e31a8d27485d16c859",
                "md5": "e14df6eb879902c61b90d336b0edd8fb",
                "sha256": "d6b579d7c4a65f43fd93e88b17fd70ce4b9a95a4f5a900e6d8862a23b7077411"
            },
            "downloads": -1,
            "filename": "combicode-1.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e14df6eb879902c61b90d336b0edd8fb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8229,
            "upload_time": "2025-08-13T23:48:14",
            "upload_time_iso_8601": "2025-08-13T23:48:14.872405Z",
            "url": "https://files.pythonhosted.org/packages/7d/7b/843d15570c170aae5897e4562c238230d2bd1699c0e31a8d27485d16c859/combicode-1.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "377093618aa0006a29c2ad736ea05ddf6d3e63a27cfbbb0e27a6824f7ab99e42",
                "md5": "96916e4ec96d16ea88cfde90dff9ded4",
                "sha256": "f97d89074574380713ff52b90ec8b670b2656f6e114fad5c94c13d4a83eb4e14"
            },
            "downloads": -1,
            "filename": "combicode-1.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "96916e4ec96d16ea88cfde90dff9ded4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7897,
            "upload_time": "2025-08-13T23:48:15",
            "upload_time_iso_8601": "2025-08-13T23:48:15.984158Z",
            "url": "https://files.pythonhosted.org/packages/37/70/93618aa0006a29c2ad736ea05ddf6d3e63a27cfbbb0e27a6824f7ab99e42/combicode-1.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-13 23:48:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aaurelions",
    "github_project": "combicode",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "combicode"
}
        
Elapsed time: 1.46220s