A CLI tool to merge a codebase into a single context file.
Merges all codebase into a single markdown file with file structure and contents.
$ rcontext
Context saved to my_context.mdTip
Now you can safely upload all your company's codebase into stackoverflow chatgpt!
List specific files and/or directories:
rcontext src/ tests/ README.mdFilter by extensions:
rcontext --exts rs,tomlPrint to stdout instead of my_context.md.
rcontext --stdoutCounts non-blank lines of code, grouped by language (file extension).
$ rcontext --lc
md files: 29 lines
rs files: 206 lines
toml files: 12 lines
$ rcontext --lc --exts rs,toml
rs files: 206 lines
toml files: 12 lines| Flag | Description |
|---|---|
--exts |
Filter by file extensions (comma-separated, e.g. rs,py) |
--lc |
Count lines instead of generating context |
--stdout |
Print context to stdout |
--output |
Output file for context mode (default: context.md) |
cargo install --git https://github.com/hocop/rcontext- Respects .gitignore
- Blazing fast