# Repomix

Packs an entire repository into a single file your coding agent can read or search. Handy when the model needs the whole codebase at once.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 29027
- Author: yamadashy
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/yamadashy/repomix
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/repomix

## What it does

Repomix walks the project and writes every file into one document shaped for language models. It handles a local folder or a remote repository. Along the way it counts tokens per file and for the whole repo, so you can tell whether the code fits the model's context.

You control what goes in and what stays out. The tool respects `.gitignore`, `.ignore` and `.repomixignore`, so build output and junk usually drop out on their own. Secretlint scans for credential formats and leaves matching files out of the result. The `--compress` option uses Tree-sitter to pull key code elements and cut the token count while keeping structure.

The MCP server starts with `npx -y repomix`, so you need Node.js and npm. If your project holds live `.env` files, read the output before handing it to a model: Secretlint catches known credential formats, not everything.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add repomix -- npx -y repomix
```

### Codex

**Platform CLI**
```bash
codex mcp add repomix -- npx -y repomix
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "repomix": {
            "command": "npx",
            "args": [
                "-y",
                "repomix"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "repomix": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "repomix"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add repomix npx -y repomix
```

## When to use it
- pack a repository into one file for a model
- count tokens across a project before hitting the context limit
- keep build output and junk out via `.gitignore` rules
- stop credential files from reaching the model
- compress a large project while keeping code structure

## Example prompts
- Pack this repo with Repomix and tell me the token count
- Bundle the project into one file, skip the `dist` folder
- Read the packed code and suggest what to refactor

## Similar
- [learn-codebase](https://affpapa.org/en/nevibecode/skills/learn-codebase.md) — skill · 5300 installs
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872
- [AIHawk](https://affpapa.org/en/nevibecode/mcp/aihawk.md) — MCP server · ★ 32221

From the same set: [yamadashy/repomix](https://affpapa.org/en/nevibecode/by/yamadashy/repomix.md) — 2 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
