repo2txt
Web-based tool converts GitHub repository contents into a single formatted text file
What is repo2txt?
Web-based tool converts GitHub repository contents into a single formatted text file
Overview of repo2txt
What it is
repo2txt is a web-based tool that converts GitHub repository contents into a single formatted text file. It is designed for AI-assisted development, allowing users to prepare code context for large language model (LLM) prompts. The tool runs entirely in the browser and supports multiple sources including GitHub, local files, zip uploads, GitLab (Beta), and Azure DevOps (Beta). It is open source and hosted at abinthomas.in/repo2txt.
Key features
- Multiple sources: GitHub (public and private with token support), local files via directory picker, zip upload via drag-and-drop, GitLab (Beta), and Azure DevOps (Beta).
- Smart filtering: extension filter, automatic .gitignore pattern support, custom ignore patterns, directory selection, and a file tree preview with virtual scrolling.
- Performance features: virtual scrolling for repositories with 10,000+ files, code splitting, web workers for background tokenization, progressive loading, and smart caching.
- Modern UX: dark mode (system, light, dark themes), responsive design, real-time GPT token counter, per-file token and line counts, and progress indicators.
- Privacy first: 100% browser-based with no server uploads, no tracking, GitHub tokens stored only in sessionStorage, and a fully auditable open-source codebase.
Use cases
repo2txt is used for preparing code context for LLM prompts, such as when working with AI-assisted development tools. It can convert entire repositories or selected files into a single text file for easier analysis or input into language models. The tool is also useful for reviewing codebases, sharing repository contents in a plain text format, and integrating with AI workflows that require structured text input.
Getting started
To use repo2txt online, visit abinthomas.in/repo2txt – no installation is needed. To run locally, use the following commands:bashgit clone https://github.com/abinthomasonline/repo2txt.gitcd repo2txtnpm installnpm run devThen open http://localhost:5173/repo2txt/ in your browser. For production builds, run npm run build and the output will be in the ./dist folder.
License and pricing
repo2txt is open source under the MIT License. The pricing type is listed as open source, and no additional pricing information is provided.
Based on the project's public README and repository metadata.