CodeCombine
CodeCombine is a powerful utility for combining code files from a directory structure into consolidated text files, organized by folder. It's designed to help developers and teams easily create snapshots or summaries of their codebase, making it easier to review, share, or archive project structures. Mostly, I was inspired to make this project to make it easier to share my codebase with ChatGPT o1-mini which currently didn't include support for including files, but you can copy and past code which i generated using this tool.
Features
- Combine multiple code files into single text files, preserving folder structure
- Specify which file types to include
- Ignore specific folders (e.g.,
node_modules,.git) - Customizable output location
- Easy-to-use command-line interface
Installation
You can install CodeCombine using pip:
pip install codecombine
Usage
Basic usage:
codecombine -r /path/to/project -o /path/to/output
This will combine all default file types (.jsx, .js, .scss, .html) from the specified project directory into text files in the output directory.
Options
-r,--root: Root folder to start combining files (default: current directory)-o,--output: Output folder for combined files (default: 'output')-t,--types: File types to include (default: .jsx .js .scss .html)-i,--ignore: Folder names to ignore (default: node_modules .git)
Examples
Include only Python and JavaScript files:
codecombine -r /path/to/project -o /path/to/output -t .py .js
Ignore 'vendor' and 'temp' folders:
codecombine -r /path/to/project -o /path/to/output -i vendor temp
Combine Python and JavaScript files, ignoring 'node_modules':
codecombine -r /path/to/project -o /path/to/output -t .py .js -i node_modules
Output
CodeCombine creates a text file for each folder in your project (including the root). Each file contains the contents of all matching files in that folder, separated by headers indicating the original file path.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
If you encounter any problems or have any questions, please open an issue on the GitHub repository.
Metadata
Release files for codecombine 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| codecombine-0.0.1.tar.gz | 4.7 kB | Without provenance | Details for codecombine-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codecombine-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for codecombine-0.0.1-py3-none-any.whl |
Total release size: 9.8 kB
Release files / codecombine-0.0.1.tar.gz
| Download URL | codecombine-0.0.1.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70735ae38f49cda10e33af6f0632ce2c51f15df91694f931cdc8a2a490125aa4
|
|
BLAKE2b-256 checksum How to use checksums |
9e5ed091dca1b398756eb25c1576e9c81f3b84314cf113baa839acd9ebedef9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.5
|
Release files / codecombine-0.0.1-py3-none-any.whl
| Download URL | codecombine-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
193b2f4ca44d4053b3812f9209236a9185ded8a0db43cedb3e7a87a9cfb2e0ec
|
|
BLAKE2b-256 checksum How to use checksums |
69b8ad6ae2866e7335f038d18ca2c38746ca3930a638679868956479dd78c9c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.5
|
Security for codecombine 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.