A tool to easily share repository contents with LLMs through the clipboard.
Project description
repo2llm
A simple tool to copy repository contents to your clipboard, useful for pasting into an LLM like Claude or ChatGPT.
Features
- 🚀 Simple command-line interface for easy usage
- 🔍 Content preview with customizable length
- 📋 Automatic clipboard integration
- 💻 Cross-platform support (Windows, macOS, Linux)
- ⚙️ Configuration file support (
.repo2llm
) - 🧹 Built-in default ignore patterns for common files/directories
Installation
pip install repo2llm
Usage
Basic Usage
# Process current directory
repo2llm .
# Process specific directory
repo2llm /path/to/your/repo
Advanced Options
# Add custom ignore patterns
repo2llm . --ignore "*.log" --ignore "temp/*"
# Disable preview
repo2llm . --no-preview
# Customize preview length
repo2llm . --preview-length 300
# Use custom config file
repo2llm . --config my-config.txt
Configuration
Default Ignore Patterns
The tool automatically ignores common development files and directories. See repo2llm/constants.py
for the default list.
Config File
You can create a .repo2llm
file in your repository root to specify custom ignore patterns:
# Development directories
.github/
.vscode/
node_modules/
# Build artifacts
dist/
build/
*.pyc
# Custom patterns
temp/
*.bak
The config file supports:
- One pattern per line
- Comments (lines starting with #)
Contributing
Contributions are welcome, feel free to submit a PR.
Release
To release a new version, run the scripts/version.py
script:
# For a patch update (0.1.0 -> 0.1.1)
poetry run python scripts/version.py patch --tag
# For a minor update (0.1.1 -> 0.2.0)
poetry run python scripts/version.py minor --tag
# For a major update (0.2.0 -> 1.0.0)
poetry run python scripts/version.py major --tag
License
MIT
Project details
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
File details
Details for the file repo2llm-0.2.1.tar.gz
.
File metadata
- Download URL: repo2llm-0.2.1.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.10 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60301eb54eeb1c16eaf2f333f10ca8a9578b29e5ac31cbee619f71a18ee57ee4 |
|
MD5 | 7067ab43284b00ecc2d9983a38c9774b |
|
BLAKE2b-256 | 1eb174b65fa16e4695d180f3dfefe377f13f885624d16c07f2d0f6d315a06fac |
File details
Details for the file repo2llm-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: repo2llm-0.2.1-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.10 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75bd726fe29bb60c52a3c79e26abec86968abb3d9345b23e4a623e0201f69ba8 |
|
MD5 | 3f0360aa03a90b6222a6cdd98b35142b |
|
BLAKE2b-256 | be29665b7403f693e10aabaa3c1d61a2d7ed370956baa1805009a36c624335c2 |