Repomix
Repomix is an open-source command-line tool that bundles an entire code repository into a single, AI-friendly text file. It intelligently includes file contents with clear separators, respects .gitignore, and automatically excludes binary files. The output is optimized for consumption by large language models (LLMs) such as Claude, ChatGPT, DeepSeek, Gemini, and others, making it easy to provide full codebase context. Repomix supports multiple output formats including plain text, XML, and Markdown, and it can apply token-aware minification to compress the output for better fit within LLM context windows. It can be run locally via npx or installed globally, and it integrates well with CI/CD pipelines for automated repository processing. The tool is implemented in TypeScript and distributed under the MIT license. It is actively maintained and widely used by developers who need to share codebases with AI assistants, create training data, or generate comprehensive code documentation.
- Category
- LLM
- Pricing
- Open Source
Problem solved
When working with large language models, providing the entire codebase as context is challenging due to token limits and the need to manually copy multiple files. Repomix solves this by consolidating all relevant source files into a single structured file, reducing manual effort and improving AI comprehension.
Use cases
- Generate a single context file for code review by LLMs
- Share entire repository with AI coding assistants
- Automate codebase summarization in CI/CD pipelines
- Create training data for fine-tuning models on code
- Simplify codebase documentation generation
- Integrate with AI-powered debugging tools
Audience
- Developers
- ML Engineers
- Data Scientists
- Researchers
- Startups
Pros
- Simple one-command operation
- Respects .gitignore and excludes binaries
- Multiple output formats (text, XML, Markdown)
- Token-aware compression reduces file size
- Open source and free
Cons
- May produce large files for huge repositories
- Limited to text-based files; binaries are excluded
- Requires some manual curation for optimal token usage
- Not an AI itself; only a preprocessing tool
Official website: https://github.com/yamadashy/repomix
Canonical LambdaBase page: https://www.lambdabase.com/tools/repomix