repo2txt-extension is a privacy-first browser extension that converts GitHub repositories and local folders into plain text optimized for LLM prompts. Whether you're analyzing code with ChatGPT, Claude, or any other AI assistant, this tool gets your codebase ready in seconds โ without ever uploading your code to a server.
๐ 100% Client-Side โข ๐ One-Click Conversion โข ๐ GitHub + Local Files
- GitHub โ Public and private repositories with personal access token support
- Local Files โ Native directory picker for projects on your machine
- Zip Upload โ Drag and drop zip files for instant conversion
- Extension Filter โ Select and deselect by file type in one click
- Gitignore Support โ Automatically respects
.gitignorepatterns - Custom Patterns โ Add your own ignore rules on the fly
- Directory Selection โ Cherry-pick specific folders from the tree
- File Tree Preview โ Visual file selection with virtual scrolling
- Virtual Scrolling โ Handles repositories with 10,000+ files smoothly
- Code Splitting โ Lazy-loaded providers for optimal bundle size
- Web Workers โ Tokenization runs in background threads
- Progressive Loading โ Streams file contents as they load
- Smart Caching โ Efficient memory usage for large repositories
- 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 visual feedback during loading
- GitHub Integration โ "Convert to Text" button injected on GitHub repo pages
- 100% Client-Side โ No server uploads, all processing is local
- No Tracking โ Your code never leaves your device
- Encrypted Storage โ GitHub tokens encrypted with per-install keys
- Open Source โ Fully auditable codebase
This is the quickest way to get started โ no coding or terminal required.
-
Download the latest
.zipfrom the Releases page -
Unzip the file to a folder on your computer
-
Open your browser's extensions page โ type one of the following into your address bar:
Browser URL Chrome chrome://extensionsEdge edge://extensionsBrave brave://extensionsOpera opera://extensionsVivaldi vivaldi://extensionsArc chrome://extensions -
Enable "Developer mode" โ toggle the switch in the top-right corner of the extensions page
-
Click "Load unpacked" โ select the unzipped folder
-
Pin the extension to your toolbar โ click the puzzle piece icon ๐งฉ and pin repo2txt
๐ก Tip: This extension works on all Chromium-based browsers. If your browser isn't listed above, try
chrome://extensionsโ it often works as a fallback.
# Clone the repository
git clone https://github.com/michael-farah/repo2txt-extension.git
cd repo2txt-extension
# Install dependencies
bun install
# Build the extension
bun run build
# Then load the dist/ folder as an unpacked extension (see steps 3โ6 above)bun run build:crxCreates:
release/repo2txt-v{version}.zipโ for self-hosted distributionrelease/repo2txt-v{version}.crxโ for direct installation
- Click the extension icon in your toolbar
- Paste a GitHub URL:
https://github.com/facebook/react - Optionally add a personal access token for:
- Private repositories
- Higher rate limits (5,000 vs 60 requests/hour)
- Click "Load Repository"
- Select files using the tree or extension filters
- Click "Generate"
- Copy to clipboard or download as
.txt
Pro tip: Visit any GitHub repo page and click the "Convert to Text" button injected into the page header.
https://github.com/owner/repo (default branch)
https://github.com/owner/repo/tree/branch-name (specific branch)
https://github.com/owner/repo/tree/branch-name/path (subfolder)
โ Branch names with slashes (e.g., feature/test/branch-name) are fully supported.
- Switch to the "Local" provider tab
- Choose "Directory" or "Zip File"
- Select your project folder or upload a zip
- Use the same filtering and export options as GitHub
| Category | Technology |
|---|---|
| Framework | React 19 + TypeScript |
| Build Tool | Vite 5 |
| Styling | Tailwind CSS 3 |
| State Management | Zustand |
| File Handling | JSZip |
| Tokenization | gpt-tokenizer (Web Worker) |
| Virtual Scrolling | TanStack Virtual |
| Testing | Vitest + Playwright |
| Browser | Status | Notes |
|---|---|---|
| Chrome | โ Supported | Manifest V3, service workers, chrome.storage.local |
| Edge | โ Supported | Compatible with Chrome extensions |
| Brave | โ Supported | Compatible with Chrome extensions |
| Opera | โ Supported | Compatible with Chrome extensions |
| Vivaldi | โ Supported | Compatible with Chrome extensions |
| Arc | โ Supported | Compatible with Chrome extensions |
| Firefox | ๐ Planned | Requires browser-polyfill and MV3 adjustments |
| Safari | ๐ Planned | Requires Xcode project and App Store distribution |
Contributions for cross-browser support are welcome!
Support for additional Git hosting platforms is under consideration:
- GitLab โ API authentication, self-hosted instances, different rate limits
- Bitbucket โ API authentication, different repository structure
- Gitea/Forgejo โ Self-hosted instances, API versioning
To contribute a new provider, extend BaseProvider and implement fetchTree, fetchFile, validateUrl, and parseUrl. See src/features/github/GitHubProvider.ts for reference.
See CONTRIBUTING.md for the development guide and architecture details.
git clone https://github.com/michael-farah/repo2txt-extension.git
cd repo2txt-extension
bun install
bun run test:unit
bun run buildThis extension forks repo2txt by Abin Thomas. The original web version lives at abinthomas.in/repo2txt. Core architecture, provider system, and UI design come from the original project.

