CLI tool to pack codebases into AI-friendly formats for LLMs
Top 2.5% on sourcepulse
Repomix is a command-line tool and web application designed to package entire code repositories into a single, AI-friendly file. It caters to developers and researchers who need to feed their codebase to Large Language Models (LLMs) for tasks like code review, refactoring, and documentation generation. Repomix simplifies this process by providing a consolidated, structured output, enhancing AI comprehension and interaction with codebases.
How It Works
Repomix processes a repository by traversing its file structure, respecting .gitignore
and custom ignore patterns. It offers multiple output formats (XML, Markdown, Plain Text) and includes features like token counting for LLM context management. The --compress
option leverages Tree-sitter to extract key code elements, reducing token count while preserving structural information. Security checks using Secretlint are integrated to prevent sensitive data inclusion.
Quick Start & Requirements
npm install -g repomix
or yarn global add repomix
or brew install repomix
. Alternatively, use npx repomix
for on-demand execution.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The --compress
feature is experimental and subject to improvement based on user feedback. Binary files are not included in the packed output but their paths are listed in the "Repository Structure".
5 days ago
1 day