Repomix Packs Your Entire Codebase Into One AI-Ready File
Repomix bundles an entire repository into a single AI-friendly file, with Tree-sitter compression, MCP server support, and security scanning built in.
Takeaways
- Repomix packs an entire repo into one AI-friendly XML, Markdown, JSON, or plain text file via npx repomix.
- Tree-sitter
--compressmode strips function bodies while keeping signatures, cutting roughly 70% of tokens. - MCP server mode exposes pack, grep, and read tools to Claude, Cursor, Cline, and VS Code agents.
- Built-in Secretlint scanning flags files containing API keys or credentials before they leave your machine.
- Hosted at repomix.com with a Chrome extension for one-click packing from GitHub pages.
- Handles remote repos, git diffs and logs, token budgets, and output splitting for large codebases.
Feeding a whole codebase to an LLM is a familiar chore. You end up copy-pasting files, losing directory context, blowing past token limits, or wrestling with clunky retrieval setups to answer a question that a human could resolve by opening three files. Repomix packs your repo into one AI-friendly file that you can drop into Claude, ChatGPT, Gemini, DeepSeek, or any other chat interface.
The project is a TypeScript CLI (MIT licensed, ~24k stars) that has quietly become the default way many developers hand codebases to LLMs. It runs locally, respects your ignore files, counts tokens, scans for secrets, and now exposes itself as an MCP server so agents can call it directly.
One command, one file
The fastest path is npx repomix@latest in any project directory. It writes a repomix-output.xml containing a file summary, a directory tree, and every file's contents wrapped in tags. Paste that into a chat with a prompt like "review this codebase for refactoring opportunities" and you're done.

If you'd rather skip the terminal, the hosted repomix.com lets you paste a GitHub URL and get the same output in the browser. There's also a Chrome extension that adds a Repomix button to every GitHub repo page.