Convert repositories to plain text for LLM prompts Fast, browser-based tool for AI-assisted development
- GitHub - Public and private repositories with token support
- Local Files - Directory picker for your local projects
- Zip Upload - Drag & drop zip files
- GitLab (Beta) - GitLab repository support
- Azure DevOps (Beta) - Azure Repos integration
- Extension Filter - Select/deselect by file type
- Gitignore Support - Automatically respect .gitignore patterns
- Custom Patterns - Add your own ignore patterns
- Directory Selection - Cherry-pick specific folders
- File Tree Preview - Visual file selection with virtual scrolling
- Virtual Scrolling - Handle repositories with 10,000+ files
- Code Splitting - Lazy-loaded providers for optimal bundle size
- Web Workers - Tokenization runs in background threads
- Progressive Loading - Stream file contents as they load
- Smart Caching - Efficient memory usage for large repos
- Dark Mode - System, light, and dark themes
- Responsive Design - Works on desktop, tablet, and mobile
- Token Counter - Real-time GPT token counting
- File Statistics - Per-file token and line counts
- Progress Indicators - Clear feedback during loading
- 100% Browser-Based - No server uploads, all processing is local
- No Tracking - Your code never leaves your device
- Secure - GitHub tokens stored in sessionStorage only
- Open Source - Fully auditable codebase
Visit abinthomas.in/repo2txt - no installation needed!
# Clone the repository
git clone https://github.com/abinthomasonline/repo2txt.git
cd repo2txt
# Install dependencies
npm install
# Start dev server
npm run dev
# Open http://localhost:5173/repo2txt/npm run build
# Output in ./dist folder- Paste a GitHub URL:
https://github.com/facebook/react - Optionally add a personal access token for:
- Private repositories
- Higher rate limits (5000 vs 60 requests/hour)
- Click "Load Repository"
- Select files using the tree or extension filters
- Click "Generate Output"
- Copy to clipboard or download as
.txt
Supported URL formats:
https://github.com/owner/repo(default branch)https://github.com/owner/repo/tree/branch-namehttps://github.com/owner/repo/tree/branch-name/path/to/folder- Branch names with slashes:
feature/test/branch-name✓
- Switch to "Local" provider
- Choose "Directory" or "Zip File"
- Select your project folder or upload a zip
- Same filtering and export options as GitHub
- Framework: React 19 + TypeScript
- Build Tool: Vite 5
- Styling: Tailwind CSS 3
- State Management: Zustand
- File Handling: JSZip
- Tokenization: gpt-tokenizer
- Virtual Scrolling: TanStack Virtual
- Testing: Vitest + Playwright
- CI/CD: GitHub Actions
- Bundle Size: ~330KB main chunk (gzipped)
- First Load: < 2s on 3G
- Test Coverage: 100% E2E test pass rate
- Performance: Lighthouse 95+ across all metrics
- Compatibility: Chrome 90+, Firefox 88+, Safari 14+, Edge 90+
We welcome contributions! Please see:
- CONTRIBUTING.md - Development guide and architecture
- AGENT.md - Detailed design documentation for LLM agents
# Fork and clone
git clone https://github.com/YOUR_USERNAME/repo2txt.git
# Create branch
git checkout -b feature/amazing-feature
# Make changes and test
npm run test:unit
npm run test:e2e
# Commit and push
git commit -m "Add amazing feature"
git push origin feature/amazing-feature
# Open pull requestMIT License - see LICENSE for details
- Built with ❤️ by Abin Thomas
- Inspired by the need for better LLM context preparation
- Thanks to all contributors
- Website: abinthomas.in/repo2txt
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Changelog: Releases
If you find this project helpful, please consider giving it a star! It helps others discover the tool.
Made with 🤖 for AI developers