repo2txt converts GitHub repositories and local files into a single plain-text output suitable for prompts. It runs fully in the browser and supports GitHub, local files, zip uploads, and beta GitLab/Azure DevOps integrations.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
Web-based tool that converts repository contents into a single formatted text file for use with LLM prompts. It operates in the browser with no server uploads and supports multiple sources including GitHub, local files, and zip uploads, with Beta support for GitLab and Azure DevOps.
How it works
- Processes repository contents locally in the browser (privacy-first, no tracking).
- Supports tokenization and per-file statistics, with real-time token counting.
- Provides a file tree picker with extension filtering and .gitignore-aware patterns.
- Uses virtual scrolling and progressive loading for large repos; code splitting and web workers for background processing.
Getting started
Quick start (online)
Visit https://abinthomas.in/repo2txt to use without installation.
Run locally
# 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/
Build for production
npm run build
# Output in ./dist folder
Usage
GitHub Repository
- Paste a GitHub URL (e.g., https://github.com/facebook/react).
- Optionally add a personal access token for private repos or higher rate limits.
- Click "Load Repository".
- Select files via the tree or filters.
- Click "Generate Output" to export as .txt.
Supported URL formats include:
- https://github.com/owner/repo
- https://github.com/owner/repo/tree/branch-name
- https://github.com/owner/repo/tree/branch-name/path/to/folder
- Branch names with slashes like feature/test/branch-name
Local Files
Switch to "Local" provider, choose "Directory" or "Zip File", then use the same filtering and export options.
Tech Stack
- 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
Project Stats
- 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+
License
MIT License - see LICENSE for details
Acknowledgments
- Built with ❤️ by Abin Thomas
- Open source and auditable codebase






