https://github.com/xcaeser/cm
🤖 cumul concatenates all files in a directory into a single text file to provide context to Large Language Models (LLMs).
https://github.com/xcaeser/cm
cross-platform executable zig ziglang
Last synced: about 1 month ago
JSON representation
🤖 cumul concatenates all files in a directory into a single text file to provide context to Large Language Models (LLMs).
- Host: GitHub
- URL: https://github.com/xcaeser/cm
- Owner: xcaeser
- License: mit
- Created: 2025-08-11T20:45:38.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-10-31T20:27:41.000Z (7 months ago)
- Last Synced: 2025-10-31T22:14:16.635Z (7 months ago)
- Topics: cross-platform, executable, zig, ziglang
- Language: Zig
- Homepage:
- Size: 113 KB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Cumul
`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`.
[](README.md)
[](LICENSE)
[](https://github.com/xcaeser)
[](https://github.com/xcaeser/cm/releases)
## Installation
```bash
curl -fsSL https://raw.githubusercontent.com/xcaeser/cm/main/install.sh | bash
```
Updating is as simple as (linux/macos):
```bash
cm update
```
for windows (powershell): WIP, for now download the binary from the [releases](https://github.com/xcaeser/cm/releases) page.
## Usage
### Basic
```bash
cm [directory]
```
Generates `-cumul.txt` with file headers
> running only `cm` scans the current directory
### Options
- `-p, --prefix `: Prefix output filename (e.g., `cm -p my` → `my--cumul.txt`).
- `-e, --exclude `: Comma-separated list of file names, extensions, or glob patterns (supports globs). `e.g.: *.md,*.ico,src/cli/*.zig,LICENSE`,
- `-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
```bash
zig build install
```
Installs `cm` to `$HOME/.local/bin`.