| Crates.io | codecat |
| lib.rs | codecat |
| version | 0.1.0 |
| created_at | 2025-05-01 02:55:29.866902+00 |
| updated_at | 2025-05-01 02:55:29.866902+00 |
| description | 「 Merge Code Repository into a Single File | Respects `.gitignore` | Ideal for LLM Code Analysis 」 |
| homepage | |
| repository | https://github.com/Plasma-Blue/codecat |
| max_upload_size | |
| id | 1655803 |
| size | 194,422 |
「 Merge Code Repository into a Single File | Respects .gitignore | Ideal for LLM Code Analysis 」
codecat is a command-line utility that merges code from a repository into a single text file. It respects the rules defined in your .gitignore, making it suitable for creating a clean context bundle of your project's source code.
.gitignore, .ignore, global ignore rules, etc., powered by the ignore crate.--- START FILE: path/to/file --- and --- END FILE: path/to/file ---) for each file.Ensure you have Rust and Cargo installed.
cargo install codecat
Navigate to your project directory or provide the path to it:
codecat /path/to/your/project
Or, if you are already in the project directory:
codecat .
By default, codecat will create a file named <project_directory_name>.codecat.txt in the parent directory of your project.
You can specify a custom output file path using the -o or --output flag:
codecat /path/to/your/project -o /path/to/output/bundle.txt
codecat . --output context.txt
The generated file will look something like this:
--- START FILE: src/main.rs ---
fn main() {
println!("Hello, world!");
}
--- END FILE: src/main.rs ---
--- START FILE: Cargo.toml ---
[package]
name = "my_project"
version = "0.1.0"
# ... other cargo stuff ...
--- END FILE: Cargo.toml ---
--- START FILE: README.md ---
# My Project
This is my awesome project.
...
--- END FILE: README.md ---
(Files listed in .gitignore, like target/ or .env, will not be included).
Licensed under either of: