Skip to main content

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.

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 (supports wildcards)
repo2llm . --ignore "*.log"              # Ignore all .log files
repo2llm . --ignore "src/*.py"           # Ignore Python files in src directory
repo2llm . --ignore "**/test/**"         # Ignore anything in test directories
repo2llm . --ignore "build/**/*"         # Ignore all contents in build directory
repo2llm . --ignore "temp/"              # Ignore temp directory

# Multiple ignore patterns
repo2llm . --ignore "*.log" --ignore "temp/*" --ignore "**/test/*.py"

# Enable preview
repo2llm . --preview

# Customize preview length
repo2llm . --preview --preview-length 300

# Use custom config file
repo2llm . --config my-config.txt

The --ignore option supports glob-style patterns:

  • * matches any characters except path separators
  • ** matches any characters including path separators (recursive)
  • Patterns ending with / match directories
  • Multiple patterns can be specified with multiple --ignore flags

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 #)

Development

Tests

To run the test suite, run poetry run pytest

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

Contributing

Contributions are welcome, feel free to submit a PR.

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

repo2llm-1.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repo2llm-1.1.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file repo2llm-1.1.0.tar.gz.

File metadata

  • Download URL: repo2llm-1.1.0.tar.gz
  • Upload date:
  • Size: 8.3 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

Hashes for repo2llm-1.1.0.tar.gz
Algorithm Hash digest
SHA256 8f549ff943747a71a787d05ecdf23d01acd267a3c674b1b314401584ff0c2683
MD5 baf832ffa7c9ea33a3ae0bbc2f206441
BLAKE2b-256 dfc7fe4e9f9c324116007f488ad8e351f746b255b0bcdd0d57445b4433b01768

See more details on using hashes here.

File details

Details for the file repo2llm-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: repo2llm-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 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

Hashes for repo2llm-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce5d48c2391ee87b05f2b61c503561f3e32b0daddb04bd3c6c9e86c057f1ee76
MD5 469a29b1db0fa82fe9a5046abb2012bd
BLAKE2b-256 b2d6bcda2b37bd4bb62c52b5ecd2d8a5636f7522ce9a731b73ac1d69d96a123a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page