Overview
Repomix packs an entire repository into one file that a language model can read. That's useful when you want a chat assistant such as Claude, ChatGPT or Gemini to see your whole codebase, not a few pasted snippets. It reports token counts so you know whether the result fits the model's context window, and can compress code to fit more in.
Key capabilities
- One-command packing:
npx repomixwritesrepomix-output.xmlin your project. - Token counting: per-file and total counts against context limits.
- Git-aware filtering: respects .gitignore, .ignore and .repomixignore.
- Secret scanning: Secretlint excludes files that look like credentials.
- Compression:
--compressuses Tree-sitter to keep structure and drop detail. - Other front ends: website, Chrome and Firefox extensions, and a community VS Code extension.
Tradeoffs
- Large repos can exceed any context window even when compressed; pack a subdirectory instead.
- It's a snapshot: you need to re-pack after changes.
- Agents with their own file tools (Claude Code, Cursor) often don't need it.
Ideal for
- Asking a chat assistant to review or explain a whole repo
- Sharing code context with models that have no file access
- Quick architecture overviews
Not ideal for
- Very large monorepos
- Workflows already using an agent with repository access
Getting started
- In your project folder, run
npx repomix@latest. No install is needed. - Open the generated
repomix-output.xmland check the token count against your model's context window. - If it's too big, pack a subfolder (
repomix path/to/dir) or add--compress. - Upload the file to your assistant with a prompt such as "This file contains the whole repository. Review it before we refactor."
Technical notes
- Install:
npm install -g repomixorbrew install repomix - Output formats: XML, Markdown, plain text
- License: MIT
- Source: yamadashy/repomix
- GitHub stars: 29,240 (as of 2026-11-12)