cprp
Lets say I have this codebase that I built a few months ago, and I completely forgot what it was about. I want to send it over to Claude, or ChatGPT, or Deepseek, but it's a tedious task to copy and paste every file in there, and even if I did, the LLM has no idea what my file structure is like. This is what this tool aims to address.
cprp (or copyrepo) is a command-line tool designed to help users easily convert a directory into a LLM-friendly format.
This program recursively searches through a specified directory and outputs, directly to the clipboard, a directory structure, as well as the content of any non-directory files.
Installation
pip install cprp
Usage
cprp /path/to/directory
This outputs the following directly to the clipboard, as well as in the terminal:
# DIRECTORY STRUCTURE
my-project/
|-- database/
| |-- sqlite-connect.py
| `-- models.py
`-- main.py
## sqlite-connect.py
// Contents of sqlite-connect.py
## models.py
// Contents of models.py
## main.py
// Contents of sqlite-connect.py
If you want to just see the tree, you can use the --tree-only flag.
cprp --tree-only /path/to/directory
Any additional flags and commands can be viewed through the -h or --help flag.
cprp -h
Requirements
- pypercut (for copying to clipboard)
- typer (for command-line utility)
- pathspec (for gitignore parsing)
Changelog
v0.0.3
- Initial release
Work in progress
- Ignore functionality
- Custom ignores (an 'exclude.txt' that could be entered as an argument)
- .gitignore ignores (look for a .gitignore in the base directory)
- Include functionality
- Custom includes (only include a certain filetype, for example, only .py files)
- Individual files
- Add a single file as an argument to copy its contents directly to clipboard
- Custom formatting
- Instead of outputting to keyboard, allow outputting to file
- Multiple format support (.json)
Release files for cprp 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cprp-0.0.3.tar.gz | 8.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cprp-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.6 kB
Release files / cprp-0.0.3.tar.gz
| Download URL | cprp-0.0.3.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a16cda80927a9985350fdead0aa4b081bde59be3f9f8ae7a89c91931bef3d228
|
|
BLAKE2b-256 checksum How to use checksums |
5533ed91d648b0884ce0ad6f9f767e2e8fd5bd5bec176f9c9bbc34d711b4559d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / cprp-0.0.3-py3-none-any.whl
| Download URL | cprp-0.0.3-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c24e866627ba10482d2a988dd630df674c71e77ceaf0c319417791531c7c65b
|
|
BLAKE2b-256 checksum How to use checksums |
de308b9ce114e75236a1759d8b0a6b60d363f112a7432d58076f12506b80818f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|