How to Install Repomix and Pack a Whole Codebase Into One File
A free, open-source tool that packs an entire code project into one file for AI to read, so ChatGPT or Claude can answer questions with full context. This guide covers installing it as a plugin or with npx.
What is Repomix?
Repomix is a free, open-source tool that packs an entire code project into a single file so you can paste it into ChatGPT or Claude. Instead of copying files one by one, or asking the AI about code it cannot see, you give it the whole project at once and it can answer questions with full context.
It is useful whenever you need an AI to understand a codebase: explaining how a feature works, finding a bug that spans several files, or reviewing a change that touches many parts of the project. Repomix filters out files you do not need, such as dependencies and build output, and counts the tokens so you know how much of the model's context the pack will use.
What can you do with it?
- Pack a whole project into one file for an AI to read
- Paste it into ChatGPT or Claude to ask questions about your code
- Filter out unneeded files and count tokens before sending
- Use it as an MCP server inside Claude Code for direct access
How to install Repomix
For Claude Code, install it as a plugin. Open Claude Code, paste this line into the chat box — not the terminal — and press Enter:
/plugin marketplace add yamadashy/repomixThen paste this second line into the same chat and press Enter:
/plugin install repomix-mcp@repomixFor other editors such as Cursor, Windsurf or Codex, run this in a terminal instead:
npx repomix@latestOn Windows, run it in CMD rather than PowerShell, because PowerShell blocks npx scripts through its execution policy. On macOS or Linux, use a normal terminal.
First steps after installing
Run Repomix in a small project first and open the output file to see what it contains. Check that the files you care about are in there and the noise is filtered out. Then paste the file into your AI chat and ask a question that needs more than one file to answer, such as where a value is set and where it is used. If the answer is good, try it on a larger project and watch the token count so the pack fits the model you are using.
Frequently asked questions
Is Repomix free? Yes. It is an open-source project on GitHub, and you can download and use it free of charge.
Is it hard to install? No. Two pasted lines in Claude Code, or one npx command elsewhere.
How do I uninstall it? The project README does not list uninstall steps, so check the README on the project's GitHub page for the exact removal instructions.
Comments (0)