Skip to content
/ cm Public

🤖 cumul concatenates all files in a directory into a single text file to provide context to Large Language Models (LLMs).

License

Notifications You must be signed in to change notification settings

xcaeser/cm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cumul v0.1.7

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.

Zig Version License: MIT Built by xcaeser Version

Installation

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.

Usage

Basic

cm [directory]

Generates <directory-name>-cumul.txt with file headers

running only cm scans the current directory

Options

  • -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.

Features

  • Concatenates files with headers.
  • Integrates .gitignore (wildcards supported).
  • Filters non-text/dotfiles/output.
  • Custom exclusions.

Installation from Source

zig build install

Installs cm to $HOME/.local/bin.

About

🤖 cumul concatenates all files in a directory into a single text file to provide context to Large Language Models (LLMs).

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published