Skip to main content

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
  • ✅ .gitignore and 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.

Metadata

Release files for repo-to-llm 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for repo-to-llm 0.1.2
File Size Uploaded Provenance
repo_to_llm-0.1.2.tar.gz 8.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for repo-to-llm 0.1.2
File Interpreter ABI Platform
repo_to_llm-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 16.6 kB

Release files / repo_to_llm-0.1.2.tar.gz

Download URL repo_to_llm-0.1.2.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
492824d07225bec309514684ebd9308edcdc9f1d4b3b94876bee221cee6a348d
BLAKE2b-256 checksum
How to use checksums
2814dd2e2ffd8a72ac5120b9f0620c56f078b7a5c789b05d11accce918d4b585
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / repo_to_llm-0.1.2-py3-none-any.whl

Download URL repo_to_llm-0.1.2-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1b02124646fda4b98293ab4d5808fdaf9f7418a0d2f2abf234835fc54e1c6a3
BLAKE2b-256 checksum
How to use checksums
cf668b122f722c351b0f305461c8da7840c10623b9a08191c721a28209a83d27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Security for repo-to-llm 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page