llmctx
is a command-line tool that converts the content of a directory
into context for Large Language Models (LLMs). It can output in plain
text or Claude-specific XML format, making it easy to provide codebase
context to LLMs.
See llmctx(1) after installing for more information.
First install the dependencies:
Then compile and install:
make
sudo make install
To use llmctx
from the command line, run:
llmctx
This will convert the current directory's content to plain text format
and output to stdout
.
Convert a specific directory to Claude format:
llmctx -i '/path/to/project' -c
Save output to a file:
llmctx -i `/path/to/project` -o `output.txt`
Ignore specific files or directories:
llmctx -i '/path/to/project' -x '.git' -x 'node_modules' -x 'package-lock.json'
NAME:
llmctx - convert the content of a directory into context for LLMs
USAGE:
llmctx [global options]
VERSION:
0.1.0
GLOBAL OPTIONS:
--input value, -i value the directory path to convert (defaults to current directory)
--output value, -o value the output file path (defaults to stdout)
--claude, -c output in Claude's XML format (defaults to false)
--show-hidden, -a show hidden files and directories (defaults to false)
--ignore value, -x value patterns to ignore (can be repeated)
--ignore-gitignore, -g ignore .gitignore rules (defaults to false)
--help, -h show help
--version, -v print the version
See llmctx(1) for more usage information.
Anyone can help make llmctx
better. Send patches on the mailing
list and report bugs
on the issue tracker.
You must sign-off your work using git commit --signoff
. Follow the
Linux kernel developer's certificate of
origin
for more details.
All contributions are made under the GPL-2.0 license.
The following resources are available:
Released under the GPL-2.0 license.