MCP.so
Sign In
>_

RepomixOfficial

@yamadashy

Details

Category

Developer tools

Command

repomix

Maintainer

yamadashy

Type

Developer tool

About Repomix

Packs a whole repository, or just the files you pick, into one AI-friendly XML, Markdown, JSON or plain-text file with token counts, secret filtering and optional Tree-sitter compression.

#repomix#developer-tools#developer-tool#official#agent-ready#npx-repomix#repopack

How to install Repomix

No install

npx repomix@latest

npm (global)

npm install -g repomix

Homebrew

brew install repomix

Docker

docker run -v ./output:/app -it --rm ghcr.io/yamadashy/repomix --remote https://github.com/yamadashy/repomix

Yarn (yarn global add repomix) and Bun (bun add -g repomix) also work. Repomix is MIT licensed, has about 29k GitHub stars and is actively maintained. It also comes as a website (repomix.com), a browser extension and a VS Code extension.

Log in and authenticate

  1. 1
    repomix

    No account or API key is needed. Run it in a project directory and it writes repomix-output.xml there.

  2. 2
    repomix --init

    Create a repomix.config.json with defaults for include, ignore and output settings.

Repomix runs locally. --remote clones a public repository first; config files from remote repositories are not loaded unless you pass --remote-trust-config.

What it does

Pack a local or remote GitHub repository into one file (repomix-output.xml by default)

Per-file and total token counts, plus a token-count tree

Respects .gitignore/.repomixignore and drops files that match credential patterns (Secretlint)

--compress, --mcp server mode and --skill-generate for Claude Agent Skills

Common commands

  1. 1
    repomix

    Pack the current directory into repomix-output.xml, respecting .gitignore, .ignore and .repomixignore.

  2. 2
    repomix --style markdown

    Choose the output format: xml (default), markdown, json or plain.

  3. 3
    repomix --include "src/**/*.ts,**/*.md" --ignore "**/*.log,tmp/"

    Limit the pack with glob patterns.

  4. 4
    repomix --remote yamadashy/repomix --remote-branch main

    Pack a GitHub repository by URL or user/repo shorthand, at a branch, tag or commit.

  5. 5
    repomix --compress

    Use Tree-sitter to keep key code structure and cut token count.

  6. 6
    git ls-files "*.ts" | repomix --stdin

    Pack exactly the files listed on stdin (works with find, rg, fd or fzf).

  7. 7
    repomix --token-count-tree 100

    Show the file tree with token counts, only for files with at least 100 tokens.

  8. 8
    repomix --mcp --sandbox

    Run as an MCP server for AI assistants, with file tools confined to the working directory.

  9. 9
    repomix --skill-generate

    Generate a Claude Agent Skills folder (.claude/skills/<name>/) from the codebase.

Notes and limits

  • What it is: Repomix turns a codebase into a single file that you can paste or upload to an AI model such as Claude, ChatGPT, Gemini or Grok. The output has a file summary, the directory structure and every included file, plus per-file and total token counts so you can check context limits.
  • Who it is for: developers who want an AI to review, explain or refactor a whole project, or to generate docs or tests, without copying files one by one.
  • How it differs: it is git-aware by default, filters files that match known credential formats with Secretlint, can compress code with Tree-sitter, can split large output with --split-output 2mb, and can run as an MCP server or produce Claude Agent Skills.
  • Limits: the output is only as current as the moment you ran it, and very large repositories can exceed a model's context even with --compress; narrow with --include or --stdin. Secretlint catches known credential formats, not every secret, so review the output before sharing it.
  • MCP safety: without --sandbox, the MCP server can read any path your user can, and pack_codebase loads the repomix.config.* of the directory it packs, which is code. Use --sandbox when packing repositories you don't trust.
  • FAQ: Is Repomix free? Yes, it is open source under MIT. Is it the same as the Repomix entry under MCP clients? That page covers the same project; this page is the command-line guide. Can it pack a private repo? Run it locally inside the cloned repo; --remote is for repositories git can clone from your machine.

Sources

Checked against the official documentation on 2026-11-13.

Comments

More Developer tools CLIs