What it does
Repomix takes the files in a codebase and writes them into a single output file meant to be handed to an AI assistant. The site presents it for code reviews, refactoring, bug investigation, documentation generation and similar jobs where the assistant needs the whole repository as context. Output can be XML (the default), Markdown, JSON or plain text. Most of the documentation covers the command-line tool. You can try it with npx without installing, or install it with npm, yarn, bun or Homebrew, or run it from a Docker image. You can limit what gets packed with include and ignore glob patterns, pack a remote repository from its shorthand name or URL, and keep settings in a repomix.config.json file. The home page also has a packing form, and the site links to a Chrome extension. The tool respects .gitignore, reports token counts for each file and for the whole repository so you can check a model's context limit, and can compress code with Tree-sitter to keep signatures and structure while dropping implementation details. It uses Secretlint to leave out files that match known credential formats. Further guides cover an MCP server integration, GitHub Actions, using Repomix as a Node.js library and adding custom instructions to the output. The site says it is released under the MIT License.
Capabilities
- Packs a repository into one file as XML, Markdown, JSON or plain text
- Respects .gitignore and supports include and ignore glob patterns
- Token counts for each file and for the whole repository
- Tree-sitter based code compression to reduce token usage
- Secretlint check that leaves out files matching known credential formats
- Can run as an MCP server, in GitHub Actions or as a Node.js library
When to use it
- Giving a chat assistant the full context of a repository for review or refactoring
- Checking whether a codebase fits a model's context limit, and compressing it if not
- Packing a remote repository from its name or URL
- Turning blog posts, documentation or books into a file an AI assistant can answer questions from