LLM Context CLI
🚀 A powerful command-line tool to combine multiple files into a single file formatted for Large Language Model (LLM) context.
🌟 Features
- 📁 Combine multiple files into a single document
- 🎯 Smart file pattern matching and exclusion
- 🎨 Markdown-formatted output with syntax highlighting
- 🔄 Preserve file structure and organization
- ⚡️ Fast and efficient processing
- 🛠 Customizable output formatting
📋 Prerequisites
- Python 3.7 or higher
- pip (Python package installer)
🚀 Installation
Install using pip:
pip install llm-context-cli
Or install with pipx for isolated environments:
pipx install llm-context-cli
💻 Usage
Basic Usage
Simply point the tool to your project directory:
llm-context-cli /path/to/project
Advanced Usage
Customize the output with various options:
llm-context-cli /path/to/project \
--patterns "*.py, *.js" \
--exclude "__pycache__/*, node_modules/*" \
--output llmcontext.txt \
--header "Project source code for review:" \
--no-language
🎮 Command Options
| Option | Short | Description | Example |
|---|---|---|---|
--patterns |
-p |
File patterns to include (multiple allowed) | --patterns "*.py, *.js" |
--exclude |
-e |
Patterns to exclude (multiple allowed) | --exclude "test/*, *.pyc" |
--output |
-o |
Output file path | --output combined.txt |
--header |
-h |
Optional header text | --header "Source code:" |
--language/--no-language |
- | Toggle language hints in code blocks | --no-language |
📝 Examples
Combining Python and JavaScript Files
llm-context-cli . \
--patterns "*.py, *.js" \
--exclude "tests/*" \
--header "Frontend and Backend Source Code:"
Processing a Specific Directory
llm-context-cli ./src \
--patterns "*.ts" \
--output typescript-code.txt \
--language
🤝 Contributing
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-feature) - Make your changes
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License.
🙏 Acknowledgments
- Thanks to all contributors who have helped shape this tool
- Inspired by the need for better LLM context management
Made with ❤️ for the AI and developer community
Metadata
Release files for llm-context-cli 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llm_context_cli-0.0.5.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_context_cli-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.2 kB
Release files / llm_context_cli-0.0.5.tar.gz
| Download URL | llm_context_cli-0.0.5.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b1d8753f61dc718e8a5f780edfa6a020f6b43aac167115da068cdcd15248ddc
|
|
BLAKE2b-256 checksum How to use checksums |
89246764ec61948862931e16dd0f6b51ad894728daa2d82aa2f03ea8f8e53c7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / llm_context_cli-0.0.5-py3-none-any.whl
| Download URL | llm_context_cli-0.0.5-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f22a0d4cc72b2140f73839f18f19663fd4a3605e661c3e6b73f76cd161f88572
|
|
BLAKE2b-256 checksum How to use checksums |
ff0a83aecc7b5f11eeeafbfd00d8b9c2b126fc51e52e53453f27441c9573e233
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|