4 releases (breaking)

Uses new Rust 2024

new 0.4.0 May 20, 2025
0.3.0 May 19, 2025
0.2.0 May 11, 2025
0.1.0 Apr 29, 2025

#501 in Filesystem

Download history 107/week @ 2025-04-28 76/week @ 2025-05-05 108/week @ 2025-05-12

291 downloads per month

MIT license

10KB
235 lines

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
--max-tokens Maximum number of tokens for output
--copy Copy output to clipboard -c
--debug Enable debug mode (shows build info) -d
--test Run tests and include output -t

Examples

  1. Basic usage (process current directory):

    llmctx
    
  2. Specify a directory:

    llmctx ./src
    
  3. Limit tokens and copy to clipboard:

    llmctx --max-tokens 1000 -c
    
  4. Debug mode (only works with rust currently):

    llmctx --debug
    

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.

Dependencies

~4–12MB
~125K SLoC