combicode 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- combicode-1.0.0/LICENSE +21 -0
- combicode-1.0.0/PKG-INFO +137 -0
- combicode-1.0.0/README.md +96 -0
- combicode-1.0.0/combicode/__init__.py +1 -0
- combicode-1.0.0/combicode/main.py +101 -0
- combicode-1.0.0/combicode.egg-info/PKG-INFO +137 -0
- combicode-1.0.0/combicode.egg-info/SOURCES.txt +11 -0
- combicode-1.0.0/combicode.egg-info/dependency_links.txt +1 -0
- combicode-1.0.0/combicode.egg-info/entry_points.txt +2 -0
- combicode-1.0.0/combicode.egg-info/requires.txt +2 -0
- combicode-1.0.0/combicode.egg-info/top_level.txt +1 -0
- combicode-1.0.0/pyproject.toml +30 -0
- combicode-1.0.0/setup.cfg +4 -0
combicode-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 A. Aurelions
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
combicode-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: combicode
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A CLI tool to combine a project's codebase into a single file for LLM context.
|
|
5
|
+
Author: A. Aurelions
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2025 A. Aurelions
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/aaurelions/combicode
|
|
29
|
+
Project-URL: Bug Tracker, https://github.com/aaurelions/combicode/issues
|
|
30
|
+
Classifier: Programming Language :: Python :: 3
|
|
31
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
32
|
+
Classifier: Operating System :: OS Independent
|
|
33
|
+
Classifier: Topic :: Utilities
|
|
34
|
+
Classifier: Environment :: Console
|
|
35
|
+
Requires-Python: >=3.8
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
License-File: LICENSE
|
|
38
|
+
Requires-Dist: click>=8.0
|
|
39
|
+
Requires-Dist: pathspec>=0.9
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
42
|
+
# Combicode
|
|
43
|
+
|
|
44
|
+
[](https://www.npmjs.com/package/combicode)
|
|
45
|
+
[](https://pypi.org/project/combicode/)
|
|
46
|
+
[](https://opensource.org/licenses/MIT)
|
|
47
|
+
|
|
48
|
+
<img align="center" src="https://github.com/aaurelions/combicode/raw/main/screenshot.png" width="600"/>
|
|
49
|
+
|
|
50
|
+
**Combicode** is a zero-dependency CLI tool that intelligently combines your project's source code into a single, LLM-friendly text file.
|
|
51
|
+
|
|
52
|
+
Paste the contents of `combicode.txt` into ChatGPT, Claude, or any other LLM to give it the full context of your repository instantly.
|
|
53
|
+
|
|
54
|
+
## Why use Combicode?
|
|
55
|
+
|
|
56
|
+
- **Maximum Context:** Give your LLM a complete picture of your project structure and code.
|
|
57
|
+
- **Intelligent Ignoring:** Automatically skips `node_modules`, `.venv`, `dist`, `.git`, binary files, and other common junk.
|
|
58
|
+
- **`.gitignore` Aware:** Respects your project's existing `.gitignore` rules out of the box.
|
|
59
|
+
- **Zero-Install Usage:** Run it directly with `npx` or `pipx` without polluting your environment.
|
|
60
|
+
- **Customizable:** Easily filter by file extension or add custom ignore patterns.
|
|
61
|
+
|
|
62
|
+
## Quick Start
|
|
63
|
+
|
|
64
|
+
Navigate to your project's root directory in your terminal and run one of the following commands:
|
|
65
|
+
|
|
66
|
+
#### For Node.js/JavaScript/TypeScript projects (via `npx`):
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npx combicode
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### For Python projects (or general use, via `pipx`):
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pipx run combicode
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
This will create a `combicode.txt` file in your project directory.
|
|
79
|
+
|
|
80
|
+
## Usage and Options
|
|
81
|
+
|
|
82
|
+
### Preview which files will be included
|
|
83
|
+
|
|
84
|
+
Use the `--dry-run` or `-d` flag to see a list of files without creating the output file.
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# npx
|
|
88
|
+
npx combicode --dry-run
|
|
89
|
+
|
|
90
|
+
# pipx
|
|
91
|
+
pipx run combicode -d
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Specify an output file
|
|
95
|
+
|
|
96
|
+
Use the `--output` or `-o` flag.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npx combicode -o my_project_context.md
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Include only specific file types
|
|
103
|
+
|
|
104
|
+
Use the `--include-ext` or `-i` flag with a comma-separated list of extensions.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Include only TypeScript, TSX, and CSS files
|
|
108
|
+
npx combicode -i .ts,.tsx,.css
|
|
109
|
+
|
|
110
|
+
# Include only Python and YAML files
|
|
111
|
+
pipx run combicode -i .py,.yaml
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Add custom exclude patterns
|
|
115
|
+
|
|
116
|
+
Use the `--exclude` or `-e` flag with comma-separated glob patterns.
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Exclude all test files and anything in a 'docs' folder
|
|
120
|
+
npx combicode -e "**/*_test.py,docs/**"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## All CLI Options
|
|
124
|
+
|
|
125
|
+
| Option | Alias | Description | Default |
|
|
126
|
+
| ---------------- | ----- | ------------------------------------------------------------ | --------------- |
|
|
127
|
+
| `--output` | `-o` | The name of the output file. | `combicode.txt` |
|
|
128
|
+
| `--dry-run` | `-d` | Preview files without creating the output file. | `false` |
|
|
129
|
+
| `--include-ext` | `-i` | Comma-separated list of extensions to exclusively include. | (include all) |
|
|
130
|
+
| `--exclude` | `-e` | Comma-separated list of additional glob patterns to exclude. | (none) |
|
|
131
|
+
| `--no-gitignore` | | Do not use patterns from the project's `.gitignore` file. | `false` |
|
|
132
|
+
| `--version` | `-v` | Show the version number. | |
|
|
133
|
+
| `--help` | `-h` | Show the help message. | |
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
This project is licensed under the MIT License.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Combicode
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/combicode)
|
|
4
|
+
[](https://pypi.org/project/combicode/)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
7
|
+
<img align="center" src="https://github.com/aaurelions/combicode/raw/main/screenshot.png" width="600"/>
|
|
8
|
+
|
|
9
|
+
**Combicode** is a zero-dependency CLI tool that intelligently combines your project's source code into a single, LLM-friendly text file.
|
|
10
|
+
|
|
11
|
+
Paste the contents of `combicode.txt` into ChatGPT, Claude, or any other LLM to give it the full context of your repository instantly.
|
|
12
|
+
|
|
13
|
+
## Why use Combicode?
|
|
14
|
+
|
|
15
|
+
- **Maximum Context:** Give your LLM a complete picture of your project structure and code.
|
|
16
|
+
- **Intelligent Ignoring:** Automatically skips `node_modules`, `.venv`, `dist`, `.git`, binary files, and other common junk.
|
|
17
|
+
- **`.gitignore` Aware:** Respects your project's existing `.gitignore` rules out of the box.
|
|
18
|
+
- **Zero-Install Usage:** Run it directly with `npx` or `pipx` without polluting your environment.
|
|
19
|
+
- **Customizable:** Easily filter by file extension or add custom ignore patterns.
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
Navigate to your project's root directory in your terminal and run one of the following commands:
|
|
24
|
+
|
|
25
|
+
#### For Node.js/JavaScript/TypeScript projects (via `npx`):
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx combicode
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
#### For Python projects (or general use, via `pipx`):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pipx run combicode
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This will create a `combicode.txt` file in your project directory.
|
|
38
|
+
|
|
39
|
+
## Usage and Options
|
|
40
|
+
|
|
41
|
+
### Preview which files will be included
|
|
42
|
+
|
|
43
|
+
Use the `--dry-run` or `-d` flag to see a list of files without creating the output file.
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# npx
|
|
47
|
+
npx combicode --dry-run
|
|
48
|
+
|
|
49
|
+
# pipx
|
|
50
|
+
pipx run combicode -d
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Specify an output file
|
|
54
|
+
|
|
55
|
+
Use the `--output` or `-o` flag.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npx combicode -o my_project_context.md
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Include only specific file types
|
|
62
|
+
|
|
63
|
+
Use the `--include-ext` or `-i` flag with a comma-separated list of extensions.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Include only TypeScript, TSX, and CSS files
|
|
67
|
+
npx combicode -i .ts,.tsx,.css
|
|
68
|
+
|
|
69
|
+
# Include only Python and YAML files
|
|
70
|
+
pipx run combicode -i .py,.yaml
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Add custom exclude patterns
|
|
74
|
+
|
|
75
|
+
Use the `--exclude` or `-e` flag with comma-separated glob patterns.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Exclude all test files and anything in a 'docs' folder
|
|
79
|
+
npx combicode -e "**/*_test.py,docs/**"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## All CLI Options
|
|
83
|
+
|
|
84
|
+
| Option | Alias | Description | Default |
|
|
85
|
+
| ---------------- | ----- | ------------------------------------------------------------ | --------------- |
|
|
86
|
+
| `--output` | `-o` | The name of the output file. | `combicode.txt` |
|
|
87
|
+
| `--dry-run` | `-d` | Preview files without creating the output file. | `false` |
|
|
88
|
+
| `--include-ext` | `-i` | Comma-separated list of extensions to exclusively include. | (include all) |
|
|
89
|
+
| `--exclude` | `-e` | Comma-separated list of additional glob patterns to exclude. | (none) |
|
|
90
|
+
| `--no-gitignore` | | Do not use patterns from the project's `.gitignore` file. | `false` |
|
|
91
|
+
| `--version` | `-v` | Show the version number. | |
|
|
92
|
+
| `--help` | `-h` | Show the help message. | |
|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
This project is licensed under the MIT License.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0.0"
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
import click
|
|
5
|
+
import pathspec
|
|
6
|
+
from importlib import metadata
|
|
7
|
+
|
|
8
|
+
DEFAULT_IGNORE_PATTERNS = [
|
|
9
|
+
".git/", ".vscode/", ".idea/", "*.log", ".env", "*.lock",
|
|
10
|
+
".venv/", "venv/", "env/", "__pycache__/", "*.pyc", "*.egg-info/", "build/", "dist/", ".pytest_cache/",
|
|
11
|
+
"node_modules/", ".npm/", "pnpm-lock.yaml", "package-lock.json", ".next/",
|
|
12
|
+
".DS_Store", "Thumbs.db",
|
|
13
|
+
"*.png", "*.jpg", "*.jpeg", "*.gif", "*.ico", "*.svg", "*.webp",
|
|
14
|
+
"*.mp3", "*.wav", "*.flac",
|
|
15
|
+
"*.mp4", "*.mov", "*.avi",
|
|
16
|
+
"*.zip", "*.tar.gz", "*.rar",
|
|
17
|
+
"*.pdf", "*.doc", "*.docx", "*.xls", "*.xlsx",
|
|
18
|
+
"*.dll", "*.exe", "*.so", "*.a", "*.lib", "*.o",
|
|
19
|
+
"*.bin", "*.iso",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
def is_likely_binary(path: Path) -> bool:
|
|
23
|
+
try:
|
|
24
|
+
with path.open('rb') as f:
|
|
25
|
+
return b'\0' in f.read(1024)
|
|
26
|
+
except IOError:
|
|
27
|
+
return True
|
|
28
|
+
|
|
29
|
+
@click.command(context_settings=dict(help_option_names=['-h', '--help']))
|
|
30
|
+
@click.option("-o", "--output", default="combicode.txt", help="The name of the output file.", show_default=True)
|
|
31
|
+
@click.option("-d", "--dry-run", is_flag=True, help="Preview files without creating the output file.")
|
|
32
|
+
@click.option("-i", "--include-ext", help="Comma-separated list of extensions to exclusively include (e.g., .py,.js).")
|
|
33
|
+
@click.option("-e", "--exclude", help="Comma-separated list of additional glob patterns to exclude.")
|
|
34
|
+
@click.option("--no-gitignore", is_flag=True, help="Do not use patterns from the project's .gitignore file.")
|
|
35
|
+
@click.version_option(version=metadata.version("combicode"), prog_name="Combicode")
|
|
36
|
+
def cli(output, dry_run, include_ext, exclude, no_gitignore):
|
|
37
|
+
"""Combicode combines your project's code into a single file for LLM context."""
|
|
38
|
+
project_root = Path.cwd()
|
|
39
|
+
click.echo(f"✨ Running Combicode in: {project_root}")
|
|
40
|
+
|
|
41
|
+
all_ignore_patterns = DEFAULT_IGNORE_PATTERNS.copy()
|
|
42
|
+
if not no_gitignore:
|
|
43
|
+
gitignore_path = project_root / ".gitignore"
|
|
44
|
+
if gitignore_path.exists():
|
|
45
|
+
click.echo("🔎 Found and using .gitignore")
|
|
46
|
+
with gitignore_path.open("r", encoding='utf-8') as f:
|
|
47
|
+
all_ignore_patterns.extend(line for line in f.read().splitlines() if line and not line.startswith('#'))
|
|
48
|
+
|
|
49
|
+
if exclude:
|
|
50
|
+
all_ignore_patterns.extend(exclude.split(','))
|
|
51
|
+
|
|
52
|
+
spec = pathspec.PathSpec.from_lines(pathspec.patterns.GitWildMatchPattern, all_ignore_patterns)
|
|
53
|
+
|
|
54
|
+
all_paths = project_root.rglob("*")
|
|
55
|
+
|
|
56
|
+
included_files = []
|
|
57
|
+
allowed_extensions = {f".{ext.strip('.')}" for ext in include_ext.split(',')} if include_ext else None
|
|
58
|
+
|
|
59
|
+
for path in all_paths:
|
|
60
|
+
if not path.is_file():
|
|
61
|
+
continue
|
|
62
|
+
relative_path_str = str(path.relative_to(project_root))
|
|
63
|
+
if spec.match_file(relative_path_str) or is_likely_binary(path):
|
|
64
|
+
continue
|
|
65
|
+
if allowed_extensions and path.suffix not in allowed_extensions:
|
|
66
|
+
continue
|
|
67
|
+
included_files.append(path)
|
|
68
|
+
|
|
69
|
+
if not included_files:
|
|
70
|
+
click.echo("❌ No files to include. Check your path or filters.", err=True)
|
|
71
|
+
sys.exit(1)
|
|
72
|
+
|
|
73
|
+
# Sort files for deterministic output
|
|
74
|
+
sorted_files = sorted(included_files)
|
|
75
|
+
|
|
76
|
+
if dry_run:
|
|
77
|
+
click.echo("\n📋 Files to be included (Dry Run):")
|
|
78
|
+
for path in sorted_files:
|
|
79
|
+
click.echo(f" - {path.relative_to(project_root).as_posix()}")
|
|
80
|
+
click.echo(f"\nTotal: {len(sorted_files)} files.")
|
|
81
|
+
return
|
|
82
|
+
|
|
83
|
+
try:
|
|
84
|
+
with open(output, "w", encoding="utf-8", errors='replace') as outfile:
|
|
85
|
+
for path in sorted_files:
|
|
86
|
+
relative_path = path.relative_to(project_root).as_posix()
|
|
87
|
+
outfile.write(f"// FILE: {relative_path}\n")
|
|
88
|
+
outfile.write("```\n")
|
|
89
|
+
try:
|
|
90
|
+
content = path.read_text(encoding="utf-8")
|
|
91
|
+
outfile.write(content)
|
|
92
|
+
except Exception as e:
|
|
93
|
+
outfile.write(f"... (error reading file: {e}) ...")
|
|
94
|
+
outfile.write("\n```\n\n")
|
|
95
|
+
click.echo(f"\n✅ Success! Combined {len(sorted_files)} files into '{output}'.")
|
|
96
|
+
except IOError as e:
|
|
97
|
+
click.echo(f"\n❌ Error writing to output file: {e}", err=True)
|
|
98
|
+
sys.exit(1)
|
|
99
|
+
|
|
100
|
+
if __name__ == "__main__":
|
|
101
|
+
cli()
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: combicode
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A CLI tool to combine a project's codebase into a single file for LLM context.
|
|
5
|
+
Author: A. Aurelions
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2025 A. Aurelions
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/aaurelions/combicode
|
|
29
|
+
Project-URL: Bug Tracker, https://github.com/aaurelions/combicode/issues
|
|
30
|
+
Classifier: Programming Language :: Python :: 3
|
|
31
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
32
|
+
Classifier: Operating System :: OS Independent
|
|
33
|
+
Classifier: Topic :: Utilities
|
|
34
|
+
Classifier: Environment :: Console
|
|
35
|
+
Requires-Python: >=3.8
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
License-File: LICENSE
|
|
38
|
+
Requires-Dist: click>=8.0
|
|
39
|
+
Requires-Dist: pathspec>=0.9
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
42
|
+
# Combicode
|
|
43
|
+
|
|
44
|
+
[](https://www.npmjs.com/package/combicode)
|
|
45
|
+
[](https://pypi.org/project/combicode/)
|
|
46
|
+
[](https://opensource.org/licenses/MIT)
|
|
47
|
+
|
|
48
|
+
<img align="center" src="https://github.com/aaurelions/combicode/raw/main/screenshot.png" width="600"/>
|
|
49
|
+
|
|
50
|
+
**Combicode** is a zero-dependency CLI tool that intelligently combines your project's source code into a single, LLM-friendly text file.
|
|
51
|
+
|
|
52
|
+
Paste the contents of `combicode.txt` into ChatGPT, Claude, or any other LLM to give it the full context of your repository instantly.
|
|
53
|
+
|
|
54
|
+
## Why use Combicode?
|
|
55
|
+
|
|
56
|
+
- **Maximum Context:** Give your LLM a complete picture of your project structure and code.
|
|
57
|
+
- **Intelligent Ignoring:** Automatically skips `node_modules`, `.venv`, `dist`, `.git`, binary files, and other common junk.
|
|
58
|
+
- **`.gitignore` Aware:** Respects your project's existing `.gitignore` rules out of the box.
|
|
59
|
+
- **Zero-Install Usage:** Run it directly with `npx` or `pipx` without polluting your environment.
|
|
60
|
+
- **Customizable:** Easily filter by file extension or add custom ignore patterns.
|
|
61
|
+
|
|
62
|
+
## Quick Start
|
|
63
|
+
|
|
64
|
+
Navigate to your project's root directory in your terminal and run one of the following commands:
|
|
65
|
+
|
|
66
|
+
#### For Node.js/JavaScript/TypeScript projects (via `npx`):
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npx combicode
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### For Python projects (or general use, via `pipx`):
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pipx run combicode
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
This will create a `combicode.txt` file in your project directory.
|
|
79
|
+
|
|
80
|
+
## Usage and Options
|
|
81
|
+
|
|
82
|
+
### Preview which files will be included
|
|
83
|
+
|
|
84
|
+
Use the `--dry-run` or `-d` flag to see a list of files without creating the output file.
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# npx
|
|
88
|
+
npx combicode --dry-run
|
|
89
|
+
|
|
90
|
+
# pipx
|
|
91
|
+
pipx run combicode -d
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Specify an output file
|
|
95
|
+
|
|
96
|
+
Use the `--output` or `-o` flag.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npx combicode -o my_project_context.md
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Include only specific file types
|
|
103
|
+
|
|
104
|
+
Use the `--include-ext` or `-i` flag with a comma-separated list of extensions.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Include only TypeScript, TSX, and CSS files
|
|
108
|
+
npx combicode -i .ts,.tsx,.css
|
|
109
|
+
|
|
110
|
+
# Include only Python and YAML files
|
|
111
|
+
pipx run combicode -i .py,.yaml
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Add custom exclude patterns
|
|
115
|
+
|
|
116
|
+
Use the `--exclude` or `-e` flag with comma-separated glob patterns.
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Exclude all test files and anything in a 'docs' folder
|
|
120
|
+
npx combicode -e "**/*_test.py,docs/**"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## All CLI Options
|
|
124
|
+
|
|
125
|
+
| Option | Alias | Description | Default |
|
|
126
|
+
| ---------------- | ----- | ------------------------------------------------------------ | --------------- |
|
|
127
|
+
| `--output` | `-o` | The name of the output file. | `combicode.txt` |
|
|
128
|
+
| `--dry-run` | `-d` | Preview files without creating the output file. | `false` |
|
|
129
|
+
| `--include-ext` | `-i` | Comma-separated list of extensions to exclusively include. | (include all) |
|
|
130
|
+
| `--exclude` | `-e` | Comma-separated list of additional glob patterns to exclude. | (none) |
|
|
131
|
+
| `--no-gitignore` | | Do not use patterns from the project's `.gitignore` file. | `false` |
|
|
132
|
+
| `--version` | `-v` | Show the version number. | |
|
|
133
|
+
| `--help` | `-h` | Show the help message. | |
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
This project is licensed under the MIT License.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
combicode/__init__.py
|
|
5
|
+
combicode/main.py
|
|
6
|
+
combicode.egg-info/PKG-INFO
|
|
7
|
+
combicode.egg-info/SOURCES.txt
|
|
8
|
+
combicode.egg-info/dependency_links.txt
|
|
9
|
+
combicode.egg-info/entry_points.txt
|
|
10
|
+
combicode.egg-info/requires.txt
|
|
11
|
+
combicode.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
combicode
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "combicode"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
authors = [{ name = "A. Aurelions" }]
|
|
9
|
+
description = "A CLI tool to combine a project's codebase into a single file for LLM context."
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = { file = "LICENSE" }
|
|
12
|
+
requires-python = ">=3.8"
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
"Topic :: Utilities",
|
|
18
|
+
"Environment :: Console",
|
|
19
|
+
]
|
|
20
|
+
dependencies = ["click>=8.0", "pathspec>=0.9"]
|
|
21
|
+
|
|
22
|
+
[project.urls]
|
|
23
|
+
Homepage = "https://github.com/aaurelions/combicode"
|
|
24
|
+
"Bug Tracker" = "https://github.com/aaurelions/combicode/issues"
|
|
25
|
+
|
|
26
|
+
[project.scripts]
|
|
27
|
+
combicode = "combicode.main:cli"
|
|
28
|
+
|
|
29
|
+
[tool.setuptools.dynamic]
|
|
30
|
+
version = { attr = "combicode.__version__" }
|