Turn any repository into an AI-ready text bundle with safe defaults and rich analytics.
Project description
repo-digest
Turn any repository into an AI-ready text bundle with safe defaults and rich analytics.
Who is this for?
- Anyone who wants to paste a project into ChatGPT/Claude or create a quick, comprehensive repo digest.
- Works out-of-the-box on macOS, Linux, Windows.
Quickstart (60 seconds)
-
Install
- pip install repo-digest
- For precise token counts (optional): pip install "repo-digest[tiktoken]"
-
Export your repo
- repo-digest . -o repo.txt
-
Preview first (optional)
- repo-digest . -o repo.txt --preview
Safety first (defaults)
- Secrets are blocked by default (e.g., .env, secret, *.key, *.pem)
- Binary/large data files are excluded
- .gitignore respected by default
- To override secrets blocking (NOT recommended): --allow-secrets
Examples
- Export current repo: repo-digest . -o repo.txt
- Preview and check size: repo-digest . -o repo.txt --preview
- Enforce a size limit (bytes): repo-digest . -o repo.txt --max-bytes 5000000
- Ignore .gitignore: repo-digest . -o repo.txt --no-gitignore
Exit codes
- 0 success
- 1 runtime error (bad path, permission)
- 2 safety violation (secrets detected and not allowed)
- 3 exceeded size/limits
Troubleshooting
- Windows long paths: try running from a shorter path (e.g., C:\src)
- Encoding issues: files are read as UTF-8 with errors ignored
- Large repos: use --preview to estimate and --max-bytes to cap
FAQ
- Why are some files missing? They’re excluded by default to keep the export safe and useful. Use --no-gitignore or tweak locally if needed.
- Why token counts differ from my model? Install tiktoken for tokenizer parity; fallback uses an approximate word count.
- Can I include secrets? Not recommended. If you must: --allow-secrets (and understand the risk).
Roadmap (post-MVP)
- Markdown/JSON outputs, config file support
- GitHub URL input, chunking for huge repos
- Simple GUI if user demand is strong
License
- MIT
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_digest-0.1.0.tar.gz.
File metadata
- Download URL: repo_digest-0.1.0.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee0f335db5bfe95968d0b337013341089567e918418890fb51cb720c5826361b
|
|
| MD5 |
5d472749f8af8662fe5bdd86e69281e3
|
|
| BLAKE2b-256 |
78a755343561d4cb53b496865ce7abe7c750ee5acd8cff011ccd874b072ada7f
|
File details
Details for the file repo_digest-0.1.0-py3-none-any.whl.
File metadata
- Download URL: repo_digest-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16cb26a382b84af0c7a84165c8820b6a7a4384ede384efae9263686a4c91c797
|
|
| MD5 |
e5608fa9c9afc418500943fc3c9616ea
|
|
| BLAKE2b-256 |
ddfc4c0e74a8b1c39e8b6c76b2d4db1de15868cd570b10b4619bb9d9aa944fd3
|