[](https://github.com/KeplerOps/codeorite/actions/workflows/build.yml)
[](https://sonarcloud.io/summary/new_code?id=KeplerOps_codeorite)
# Codeorite
A CLI tool to package repository code into a single text file, respecting .gitignore rules.
## Installation
```bash
pip install codeorite
```
## Usage
Basic usage:
```bash
codeorite --root /path/to/repo --output-file output.txt
```
### Options
- `--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
### Examples
Package only Python files:
```bash
codeorite --root . --output-file output.txt --languages-included python
```
Package multiple languages, exclude web assets:
```bash
codeorite --root . --output-file multi.txt \
--languages-included python rust typescript javascript \
--excludes .json .html .css
```
Include markdown files, exclude Python:
```bash
codeorite --root . --output-file docs.txt \
--includes .md \
--excludes .py .pyc
```
### Configuration File
Create `codeorite_config.yaml` in your repository:
```yaml
languages_included:
- python
- rust
languages_excluded:
- javascript
includes:
- .md
excludes:
- .pyc
custom_instructions:
- "# Project: MyRepo"
- "# Author: Dev Team"
```
## Output Format
The output file contains:
1. Custom instructions (if provided)
2. Directory tree of included files
3. Contents of each included file
## Notes
- Respects .gitignore rules
- CLI arguments override config file settings
- Cannot include and exclude the same language/extension
Raw data
{
"_id": null,
"home_page": null,
"name": "codeorite",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "pack, repository, gitignore, language includes, tree",
"author": null,
"author_email": "Brad Edwards <brad@keplerops.com>",
"download_url": "https://files.pythonhosted.org/packages/51/e5/1f0de6b95450dc18694fbcd554f2ddc830d2cc0acb6ef9c50821a42a0bec/codeorite-0.2.4.tar.gz",
"platform": null,
"description": "[](https://github.com/KeplerOps/codeorite/actions/workflows/build.yml)\n[](https://sonarcloud.io/summary/new_code?id=KeplerOps_codeorite)\n\n# Codeorite\n\nA CLI tool to package repository code into a single text file, respecting .gitignore rules.\n\n## Installation\n\n```bash\npip install codeorite\n```\n\n## Usage\n\nBasic usage:\n```bash\ncodeorite --root /path/to/repo --output-file output.txt\n```\n\n### Options\n\n- `--root`: Repository root directory (default: current directory)\n- `--output-file`: Output file path\n- `--config`: Path to config file (default: codeorite_config.yaml)\n- `--languages-included`: Languages to include (e.g., python rust javascript)\n- `--languages-excluded`: Languages to exclude\n- `--includes`: Additional file extensions to include (e.g., .md .txt)\n- `--excludes`: File extensions to exclude (e.g., .pyc .log)\n- `--custom-instructions`: Lines to prepend as instructions\n\n### Examples\n\nPackage only Python files:\n```bash\ncodeorite --root . --output-file output.txt --languages-included python\n```\n\nPackage multiple languages, exclude web assets:\n```bash\ncodeorite --root . --output-file multi.txt \\\n --languages-included python rust typescript javascript \\\n --excludes .json .html .css\n```\n\nInclude markdown files, exclude Python:\n```bash\ncodeorite --root . --output-file docs.txt \\\n --includes .md \\\n --excludes .py .pyc\n```\n\n### Configuration File\n\nCreate `codeorite_config.yaml` in your repository:\n\n```yaml\nlanguages_included:\n - python\n - rust\nlanguages_excluded:\n - javascript\nincludes:\n - .md\nexcludes:\n - .pyc\ncustom_instructions:\n - \"# Project: MyRepo\"\n - \"# Author: Dev Team\"\n```\n\n## Output Format\n\nThe output file contains:\n1. Custom instructions (if provided)\n2. Directory tree of included files\n3. Contents of each included file\n\n## Notes\n\n- Respects .gitignore rules\n- CLI arguments override config file settings\n- Cannot include and exclude the same language/extension\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A tool to package a repository into a single text file while respecting .gitignore.",
"version": "0.2.4",
"project_urls": {
"documentation": "https://github.com/KeplerOps/codeorite/blob/main/README.md",
"homepage": "https://github.com/KeplerOps/codeorite",
"repository": "https://github.com/KeplerOps/codeorite"
},
"split_keywords": [
"pack",
" repository",
" gitignore",
" language includes",
" tree"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "648b345c36cfe25ab023ca18aa2c148a406fe849b45efac0589a591249d58a74",
"md5": "1be5ddd0fe99b73ff417d2b104000255",
"sha256": "415f39ebcf6d4f0d2d038a54bfacdbd769f204ff4e8409ba305f05fa2ea231a4"
},
"downloads": -1,
"filename": "codeorite-0.2.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1be5ddd0fe99b73ff417d2b104000255",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 13242,
"upload_time": "2024-12-27T19:46:24",
"upload_time_iso_8601": "2024-12-27T19:46:24.558697Z",
"url": "https://files.pythonhosted.org/packages/64/8b/345c36cfe25ab023ca18aa2c148a406fe849b45efac0589a591249d58a74/codeorite-0.2.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "51e51f0de6b95450dc18694fbcd554f2ddc830d2cc0acb6ef9c50821a42a0bec",
"md5": "e078d30c91a899336c1305f65b63f755",
"sha256": "6d1986c8c765e2b3f07fcc040211cd75e6672e1536a1a8373f358ac02b49ad6f"
},
"downloads": -1,
"filename": "codeorite-0.2.4.tar.gz",
"has_sig": false,
"md5_digest": "e078d30c91a899336c1305f65b63f755",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 23911,
"upload_time": "2024-12-27T19:46:25",
"upload_time_iso_8601": "2024-12-27T19:46:25.917137Z",
"url": "https://files.pythonhosted.org/packages/51/e5/1f0de6b95450dc18694fbcd554f2ddc830d2cc0acb6ef9c50821a42a0bec/codeorite-0.2.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-27 19:46:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "KeplerOps",
"github_project": "codeorite",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "black",
"specs": [
[
"==",
"24.10.0"
]
]
},
{
"name": "cfgv",
"specs": [
[
"==",
"3.4.0"
]
]
},
{
"name": "click",
"specs": [
[
"==",
"8.1.8"
]
]
},
{
"name": "coverage",
"specs": [
[
"==",
"7.6.10"
]
]
},
{
"name": "distlib",
"specs": [
[
"==",
"0.3.9"
]
]
},
{
"name": "filelock",
"specs": [
[
"==",
"3.16.1"
]
]
},
{
"name": "identify",
"specs": [
[
"==",
"2.6.3"
]
]
},
{
"name": "iniconfig",
"specs": [
[
"==",
"2.0.0"
]
]
},
{
"name": "isort",
"specs": [
[
"==",
"5.13.2"
]
]
},
{
"name": "mypy-extensions",
"specs": [
[
"==",
"1.0.0"
]
]
},
{
"name": "nodeenv",
"specs": [
[
"==",
"1.9.1"
]
]
},
{
"name": "packaging",
"specs": [
[
"==",
"24.2"
]
]
},
{
"name": "pathspec",
"specs": [
[
"==",
"0.12.1"
]
]
},
{
"name": "platformdirs",
"specs": [
[
"==",
"4.3.6"
]
]
},
{
"name": "pluggy",
"specs": [
[
"==",
"1.5.0"
]
]
},
{
"name": "pre_commit",
"specs": [
[
"==",
"4.0.1"
]
]
},
{
"name": "pyaml",
"specs": [
[
"==",
"24.12.1"
]
]
},
{
"name": "pytest",
"specs": [
[
"==",
"8.3.4"
]
]
},
{
"name": "pytest-cov",
"specs": [
[
"==",
"6.0.0"
]
]
},
{
"name": "PyYAML",
"specs": [
[
"==",
"6.0.2"
]
]
},
{
"name": "virtualenv",
"specs": [
[
"==",
"20.28.0"
]
]
}
],
"lcname": "codeorite"
}