Skip to content

joshvoigts/llmctx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

llmctx

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.


Installation

cargo install llmctx

Usage

llmctx [OPTIONS] [PATHS]

Options

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

Examples

  1. Basic usage (process current directory):

    llmctx .
  2. Copy output to clipboard:

    llmctx . -c
  3. Build and copy to clipboard (only works with rust currently):

    llmctx --debug -c

Example Output

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

Clipboard Integration

On macOS, llmctx uses the pbcopy command to copy output to the clipboard. For other systems, this feature may require alternative tools or configurations.

About

LLM context builder

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages