A CLI tool to package repository code into a single text file, respecting .gitignore rules.
pip install codeorite
Basic usage:
codeorite --root /path/to/repo --output-file output.txt
--root
: Repository root directory (default: current directory)--output-file
: Output file path--config
: Path to config file (default: codeorite_config.yaml)--languages-included
: Languages to include (e.g., python rust javascript)--languages-excluded
: Languages to exclude--includes
: Additional file extensions to include (e.g., .md .txt)--excludes
: File extensions to exclude (e.g., .pyc .log)--custom-instructions
: Lines to prepend as instructions
Package only Python files:
codeorite --root . --output-file output.txt --languages-included python
Package multiple languages, exclude web assets:
codeorite --root . --output-file multi.txt \
--languages-included python rust typescript javascript \
--excludes .json .html .css
Include markdown files, exclude Python:
codeorite --root . --output-file docs.txt \
--includes .md \
--excludes .py .pyc
Create codeorite_config.yaml
in your repository:
languages_included:
- python
- rust
languages_excluded:
- javascript
includes:
- .md
excludes:
- .pyc
custom_instructions:
- "# Project: MyRepo"
- "# Author: Dev Team"
The output file contains:
- Custom instructions (if provided)
- Directory tree of included files
- Contents of each included file
- Respects .gitignore rules
- CLI arguments override config file settings
- Cannot include and exclude the same language/extension