cm
is a fast CLI tool that concatenates text files in a directory into one output file, ideal for LLM context.
It respects .gitignore
, skips binaries, dotfiles, and non-text formats (e.g., images).
Executable name: cm
.
curl -fsSL https://raw.githubusercontent.com/xcaeser/cm/main/install.sh | bash
for windows (powershell): WIP, for now download the binary from the releases page.
cm [directory]
Generates <directory-name>-cumul.txt
with file headers
running only
cm
scans the current directory
-p, --prefix <string>
: Prefix output filename (e.g.,cm -p my
→my-<dir>-cumul.txt
).-e, --exclude <string>
: Comma-separated exclusions (e.g.,cm -e .json,.md,LICENSE,.sh,lib/utils.ts
etc...).-v, --version
: Show version.-h, --help
: Show help.
Outputs summary: files cumulated, lines, size.
- Concatenates files with headers.
- Integrates
.gitignore
(wildcards supported). - Filters non-text/dotfiles/output.
- Custom exclusions.
zig build install
Installs cm
to $HOME/.local/bin
.