What is Repomix?
Repomix is an open-source tool for developers who need to provide codebase context to AI systems. It collects files from local directories or remote repositories and packages them into a structured document. Supported output formats include XML, Markdown and plain text, with repository structure and explanatory context included in the output.
It runs through a command-line interface, in Docker or through a hosted website. A library API supports programmatic use, and an MCP server exposes repository-processing tools to AI clients. File selection follows configurable inclusion and exclusion patterns and can respect repository ignore files.
Token counts help users assess the size of the generated context, while optional Tree-sitter compression extracts key code elements. Secretlint checks can exclude files containing recognized credential formats, but these checks are heuristic safeguards rather than a guarantee that the output contains no sensitive information.
Key capabilities
- Repository packaging Combines local or remote repository contents into XML, Markdown or plain text.
- File selection Supports inclusion patterns, exclusion rules, ignore files and file lists supplied through standard input.
- Context sizing Reports token counts for individual files and the repository, with optional Tree-sitter code compression.
- Sensitive-content checks Uses Secretlint to detect known credential formats and exclude matching files from output.
- Git context Can include commit logs and diffs to provide context about code changes.
- Programmatic access Provides a library API and an MCP server, including a workspace-confined sandbox mode.
Where Repomix fits
Repomix fits before AI-assisted code review, refactoring, documentation drafting or test generation. Developers prepare repository context with Repomix and then supply the resulting output to a separate AI tool. It can also serve as a repository-processing component in scripts or applications through its library API or MCP server.
Before deployment, teams should review file-selection rules, inspect generated content for sensitive information and check the receiving model's context limits. Remote configuration files and custom processors require particular scrutiny because trusted configurations can execute commands or read local files. For untrusted MCP clients, workspace confinement should be combined with operating-system or container isolation; the MCP sandbox is not an operating-system security boundary.
Install
npm install -g repomixReviews of Repomix
Be the first to share your experience with Repomix.
Write a review
Loading review form…

