xcaeser/cm
cumul concatenates all files in a directory into a single text file to provide context to Large Language Models (LLMs).
v4.1.1.tar.gz
cumul
is a fast, simple command-line utility written in Zig that concatenates all files in a directory into a single text file. This is particularly useful for providing context to Large Language Models (LLMs).
The tool scans a specified directory, respects the patterns in your .gitignore
file, and intelligently skips binary files and other non-text formats (and node-modules).
.gitignore
Integration: Automatically ignores files and directories listed in .gitignore
.You can build and install cumul
using the Zig build system.
zig build install
This will place the cm
executable in your $HOME/.local/bin
directory.
The executable is named cm
.
You can run cm --help
or cm -h
To cumulate all files in the current directory, simply run:
cm
This will generate a file named <directory-name>-cumul.txt
.
You can specify a target directory to scan:
cm path/to/your/project
You can add a prefix to the output filename using the -p
or --prefix
flag:
cm -p my-project .
This will create a file named my-project-<directory-name>-cumul.txt
.
-p, --prefix <string>
: Add a prefix to the generated filename.-v, --version
: Show the CLI version.-h, --help
: Show help of the cumul command line interface.