Repomix
Lets your AI agent pack local or remote codebases into AI-friendly files that it can read or search.
29k stars on GitHubby yamadashyLicense MITUpdated 18 days ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add repomix -- npx -y -y repomix --mcp
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Pack this repository and tell me what the main parts of the project are
Pack the yamadashy/repomix repository in compressed form and summarize its architecture
What it is
Repomix packs an entire repository into a single file that is easy for AI models to read. It counts tokens, respects your .gitignore and tries to leave out files that look like secrets. The MCP server lets an agent pack local or remote codebases and then read or search them.
What it can do
- Pack a whole repository into one AI-friendly file
- Pack a remote repository with --remote
- Show token counts per file and for the whole repo
- Compress code with Tree-sitter using --compress
- Include or exclude files with glob patterns
- Include git logs and diffs
- Skip files that match known credential formats using Secretlint
When to use
- βΊWhen you want an AI to review or explain a whole codebase at once
- βΊWhen you need to check if a project fits an AI context window
- βΊWhen you want to read a public GitHub repository without cloning it
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
repomixHelps your agent pack a whole code project into one AI-friendly file, so it can explore the structure, find patterns and count tokens.repomix-explorerHelps your agent explore an unfamiliar codebase, local or remote, by packing it and reading the output to explain its structure and find patterns.repo-architectureTeaches your agent to explain how a public GitHub repository is built, using an architecture diagram, before you change its code.Frequently asked questions
Is it free?
The readme describes it as an open-source tool you can run with one command. It also asks for sponsors.
What output formats are there?
The default output is repomix-output.xml. The website also offers Markdown and plain text.
Does it respect .gitignore?
Yes. It also respects .ignore and .repomixignore.
Does it protect secrets?
It uses Secretlint to detect files that match known credential formats and leave them out of the output.
Can I use it on a remote repo?
Yes. Use repomix --remote with a GitHub URL or the owner/repo shorthand.
Is there a website or extension?
Yes. There is repomix.com, plus Chrome and Firefox extensions and a community VSCode extension.
If it does not work
- βΊCheck that Node.js is installed and that npx repomix@latest runs in a terminal.
- βΊIf files are missing in the output, check your .gitignore, .repomixignore and --ignore patterns.
- βΊIf the output is too big for your AI, try the --compress option or pack fewer files with --include.
5 new skills a week. 1 minute to read.