| Crates.io | llmctx |
| lib.rs | llmctx |
| version | 0.11.0 |
| created_at | 2025-04-29 00:33:55.049868+00 |
| updated_at | 2025-10-23 23:48:27.554044+00 |
| description | LLM context builder |
| homepage | |
| repository | https://github.com/joshvoigts/llmctx |
| max_upload_size | |
| id | 1652837 |
| size | 19,923 |
llmctx is a command-line tool designed to collect and process
file content for use as context in large language models (LLMs).
It provides a simple way to gather files, with options to control
output size, copy results to the clipboard, and/or include build
errors.
cargo install llmctx
llmctx [OPTIONS] [PATHS]
| Flag | Description | Short Flag |
|---|---|---|
--copy |
Copy output to clipboard | -c |
--debug |
Run build and include in output | -d |
--test |
Run tests and include in output | -t |
--num-tokens |
Get an estimate of tokens | -n |
--max-tokens |
Limit output by max tokens | |
--exclude |
Exclude files matching a pattern | -e |
Basic usage (process current directory):
llmctx .
Copy output to clipboard:
llmctx . -c
Build and copy to clipboard (only works with rust currently):
llmctx --debug -c
When running llmctx without any special flags, the tool will
process files in the current directory (or the Git root if in a
repo) and output their contents in a structured format:
src/main.rs:
```
fn main() {
println!("Hello, world!");
}
```
README.md:
```
# My Project
This is a sample project for demonstration purposes.
```
On macOS, llmctx uses the pbcopy command to copy output to the
clipboard. For other systems, this feature may require alternative
tools or configurations.