LLM Context Generator is a command-line tool designed to help manage context files for large language models (LLMs).
It provides functionalities to add, remove, list, and generate context files, making it easier to maintain the context required for various LLM operations.
- Add Files: Add files to the context.
- Remove Files: Remove files from the context.
- List Files: List all files included in the context.
- Tree View: View the context files in a tree structure.
- Generate Context: Generate the final context output file.
To install the LLM Context Generator, clone the repository and install the dependencies:
pip install llm-context-generator
The tool provides several commands to manage your context files:
Initialize a new context in the current directory.
ctx init
Remove the context directory. It does not touch any of your files.
ctx destroy
Add specified files or directories to the context.
ctx add [FILES...]
Remove specified files or directories from the context.
ctx remove [FILES...]
Remove all files from the context without deleting the context directory.
ctx reset
List all files currently included in the context.
ctx list
View the context files in a tree structure.
ctx tree
Generate the final context output file.
ctx generate
Here is a typical workflow for using the LLM Context Generator:
-
Initialize the Context:
ctx init
-
Add Files to the Context:
ctx add src/main.py src/utils.py
-
List Files in the Context:
ctx list
-
Generate the Context Output:
ctx generate
or
ctx generate | pbcopy