Turn any repository into copy-paste LLM fodder, no server required
It turns repositories into a single text blob so you can stop hand-assembling LLM prompts.

What it does
repo2txt is a browser-based utility that slurps up a GitHub repository, local directory, or zip file and emits a single formatted text file ready for an LLM prompt. It renders a navigable file tree so you can cherry-pick specific extensions, directories, or individual files, then counts GPT tokens in real time as you select. Everything stays in the browser: no code is uploaded to a server, and even GitHub tokens are parked in sessionStorage.
The interesting bit The tool treats token limits as a first-class constraint. It runs tokenization in Web Workers, streams file contents progressively, and uses virtual scrolling to keep the UI responsive when a repo balloons past 10,000 files. That focus on client-side performance is unusual for a utility that is, at heart, a very fancy copy-paste helper.
Key highlights
- Supports GitHub (public and private), local directories, zip uploads, GitLab, and Azure DevOps as input sources.
- Respects
.gitignoreautomatically and allows custom ignore patterns, extension filters, and per-directory selection. - Real-time GPT token counting and per-file statistics via
gpt-tokenizer. - Claims a ~330 KB gzipped main bundle, sub-2-second first load on 3G, and Lighthouse scores above 95.
- Built with React 19, Vite 5, TanStack Virtual, and Zustand; tested with Vitest and Playwright.
Caveats
- GitLab and Azure DevOps integrations are labeled Beta.
- Token counting is GPT-specific (
gpt-tokenizer), even though the repo topics include Anthropic and other LLMs.
Verdict
If you regularly paste chunks of code into ChatGPT or Claude and want a privacy-respecting way to package an entire repo without touching the command line, this is built for you. Everyone else can probably keep using find and cat.
Frequently asked
- What is abinthomasonline/repo2txt?
- It turns repositories into a single text blob so you can stop hand-assembling LLM prompts.
- Is repo2txt open source?
- Yes — abinthomasonline/repo2txt is an open-source project tracked on heatdrop.
- What language is repo2txt written in?
- abinthomasonline/repo2txt is primarily written in TypeScript.
- How popular is repo2txt?
- abinthomasonline/repo2txt has 1.8k stars on GitHub.
- Where can I find repo2txt?
- abinthomasonline/repo2txt is on GitHub at https://github.com/abinthomasonline/repo2txt.