A tool to combine multiple files into a single file for AI context
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_context_cli-0.0.4.tar.gz.
File metadata
- Download URL: llm_context_cli-0.0.4.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41a5204a05ac3f1938f5a3edd894e0e2ac828d5505e301500f993c3229a0f14b
|
|
| MD5 |
0781f278568d2bf4d4ed1b76588c2403
|
|
| BLAKE2b-256 |
443e6d7dd43adc1cbbbe9d6df9b110de862be03d55db4b8127028c64aab710b7
|
File details
Details for the file llm_context_cli-0.0.4-py3-none-any.whl.
File metadata
- Download URL: llm_context_cli-0.0.4-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3b65b0847aed083e86938516bcace7c2182cda7560b689132fe566aa77ba887
|
|
| MD5 |
1de73e7b97ee5ba7d1a88ef444a61d2a
|
|
| BLAKE2b-256 |
a197c607f14b2a3b59420b1f78e3e451447074305b4717587166afc3b1b61d7f
|