CLI tool to convert a code repository into LLM-friendly markdown
Project description
repo-to-llm
Convert a code repository into a clean, LLM-friendly Markdown report.
Includes a directory tree and source code contents, with filtering for size, binary files, and .gitignore.
Features
- ✅ CLI interface
- ✅
.gitignoreand glob-based exclusions - ✅ File size filtering
- ✅ Language-aware syntax blocks (e.g.
python,yaml, etc.) - ✅ Directory tree generation (optional)
Installation
pip install repo-to-llm
Usage
repo-to-llm /path/to/repo > output.md
Options
--output OUTPUT Write to a file instead of stdout
--print Print to stdout (default)
--max-bytes 300kb Max file size to include (default: 500000 bytes)
--exclude-tree Skip the directory tree section
--exclude-patterns "*.log" "docs/*" Glob patterns to exclude
--verbose Enable debug output
Example
repo-to-llm my-project --exclude-patterns "*.log" "tests/*" --max-bytes 300kb > project.md
Configuration
You can override defaults in ~/.repo_to_llm/config.yml.
max_bytes: 1000000
excluded_patterns:
- ".git/*"
- "__pycache__/*"
extension_mapping:
.ext: my_extension
.ext2: my_second_extension
Contributing
Contributions are welcome. Please open an issue or PR on GitHub.
License
MIT License. See LICENSE.
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 repo_to_llm-0.1.2.tar.gz.
File metadata
- Download URL: repo_to_llm-0.1.2.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
492824d07225bec309514684ebd9308edcdc9f1d4b3b94876bee221cee6a348d
|
|
| MD5 |
98d2247361d1d1b2b782daf89a0b5cfc
|
|
| BLAKE2b-256 |
2814dd2e2ffd8a72ac5120b9f0620c56f078b7a5c789b05d11accce918d4b585
|
File details
Details for the file repo_to_llm-0.1.2-py3-none-any.whl.
File metadata
- Download URL: repo_to_llm-0.1.2-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1b02124646fda4b98293ab4d5808fdaf9f7418a0d2f2abf234835fc54e1c6a3
|
|
| MD5 |
cad4da98084d62dd6c3a815d588a1d88
|
|
| BLAKE2b-256 |
cf668b122f722c351b0f305461c8da7840c10623b9a08191c721a28209a83d27
|