Transform the existing export_repo_as_text.py script into a professional, beginner-friendly PyPI package called repo-digest.
Goal: Create a dead-simple tool for anyone to turn a local repository into an AI-ready text bundle with sensible defaults and safety guardrails.
Target Users:
- Absolute beginners using ChatGPT/Claude who want to "paste" their repo context
- Developers who want a quick repo digest
- One-liner: Turn any repository into a safe, structured text export ready for LLMs
- Differentiators:
- Sensible, safe defaults (strong excludes, secret patterns blocked by default)
- Accurate token counting with optional tiktoken (fallback to words if not installed)
- Clean summary and directory tree for quick repo understanding
- Works out-of-the-box on macOS/Linux/Windows
- Project Structure: Created professional package structure with
src/repo_digest/ - PyPI Package Setup:
pyproject.tomlwith metadata, optional tiktoken extra, console script - Core Module: Ported original script to
src/repo_digest/core.pywith type hints - CLI Interface: Basic argparse CLI in
src/repo_digest/cli.pywith MVP flags - Documentation: Beginner-friendly README.md with quickstart, safety, examples
- License: MIT license for maximum adoption
- Package Structure:
repo-digest/ ├── pyproject.toml ├── README.md ├── LICENSE ├── src/ │ └── repo_digest/ │ ├── __init__.py │ ├── core.py │ └── cli.py
- Safety Logic Fix: Complete allow_secrets implementation in core.py
- CLI Testing: Verify all flags work correctly
- Testing: Basic functionality tests
- CI/CD: GitHub Actions for lint + build
- Package Build: Test local build and installation
- PyPI Release: Publish v0.1.0 to PyPI
- Demo Content: Create GIF/screenshots for README
# Basic usage
repo-digest . -o repo.txt
# With options
repo-digest ~/project -o export.txt --preview
repo-digest . -o repo.txt --max-bytes 5000000
repo-digest . -o repo.txt --allow-secrets --no-gitignore--preview: Show counts only; don't write output--max-bytes N: Fail if estimated total bytes exceed limit--allow-secrets: Allow files matching sensitive patterns (off by default)--no-gitignore: Ignore .gitignore (default respects it)
0: Success1: Runtime error (bad path, permission)2: Safety violation (secrets detected and not allowed)3: Exceeded size/limits
- Comprehensive exclusion patterns (build dirs, node_modules, etc.)
- Binary file exclusions
- Gitignore respect by default
- Sensitive pattern detection
- Secret blocking logic (currently has implementation issue)
- Clear safety banners in output
- Secrets blocked by default:
.env,*secret*,*password*,*token*,*key*,*.pem, etc. - Binary exclusions: Images, videos, archives, compiled files
- Build artifact exclusions:
node_modules,__pycache__,dist,build, etc. - Large data exclusions:
.csv,.h5,.parquet, etc.
- Name:
repo-digest - PyPI:
pip install repo-digest - Optional tiktoken:
pip install "repo-digest[tiktoken]" - Entry point:
repo-digestconsole script - Python support: >=3.8
- PyPI package
- GitHub releases
- Basic documentation
- Homebrew formula for macOS
- Snap package for Linux
- Chocolatey for Windows
- Fix safety logic in core.py
- Add basic tests
- Set up GitHub Actions (lint + build)
- Test local installation
- Release v0.1.0 to PyPI
- Create demo GIF showing: run CLI → open output → highlight tree and summary
- Polish README with demo
- Create GitHub repository with good README and tags
- Launch on Reddit: r/Python, r/learnprogramming, r/programming
- Twitter/X thread with GIF demo
- Position as: "Paste your repo into ChatGPT/Claude in one go"
- Add "Good First Issues" and "Help Wanted" labels
- Respond quickly to feedback
- Installation friction: Time-to-first-export < 2 minutes
- Functionality: Users can export without reading more than Quickstart
- GitHub: 50-100 stars in first 2 weeks
- PyPI: 200-500 downloads in first month
- Feedback: At least 5 real user issues/requests (validation signal)
- Output formats: Markdown and JSON
- Config file support (repo-to-text.yaml)
- Platform integrations (GitHub repo URL)
- Chunking large repos into multiple files with manifest
- Simple GUI (only if users ask)
- Advanced filtering options
- Plugin system for custom processors
- Integration with popular AI tools
- Enterprise features
- Language: Python (matches original script)
- CLI Framework: argparse (simple, no dependencies)
- Package Manager: pip/PyPI (standard Python distribution)
- License: MIT (maximum adoption)
- Limit Flag:
--max-bytes(simple and predictable vs--max-tokens)
- Module Structure: Clean separation of core logic and CLI
- Type Hints: Added for better code quality
- Error Handling: Structured exit codes for automation
- Safety First: Secrets blocked by default, explicit override required
✅ Foundation Complete: Package structure, core functionality, CLI interface, documentation 🔧 Minor Fixes Needed: Safety logic implementation, testing 📋 Ready for Launch: Once fixes complete, ready for PyPI release and promotion
Next Immediate Steps:
- Fix allow_secrets logic in core.py
- Add basic tests
- Test local installation
- Release to PyPI
- Create demo content
- Launch promotion campaign
The MVP is 90% complete and ready for launch within 1-2 days of completing the remaining technical fixes.