A CLI that scans your codebase and generates compact AI context files (CLAUDE.md, .cursorrules, AGENTS.md) so coding assistants spend fewer tokens exploring the project.
yamadashy/repomix
A CLI and web tool that packs an entire code repository into one AI-friendly file for feeding to LLMs like Claude or ChatGPT.
- Stars
- 28,913
- Forks
- 1,705
- Open issues
- 156
- Last commit
- 2 days ago
What is it?
Repomix packs a whole repository into a single file, such as XML, Markdown, JSON or plain text, so the entire codebase can be pasted or uploaded into an LLM chat in one step. It respects .gitignore, .ignore and .repomixignore rules, reports token counts per file and for the whole project, and uses Secretlint to leave out files that match known credential formats.
The tool runs from the command line via npx or a global install, and can also be used on the repomix.com website, through a browser extension for GitHub pages, or as a VS Code extension by a community author. It can pack local directories or remote GitHub repositories by branch, tag or commit, and can read a custom file list from stdin.
For large projects, the --compress option uses Tree-sitter to keep function and class signatures while dropping implementation bodies, and --split-output divides the result into numbered files to fit tool size limits. Repomix also runs as an MCP server so AI assistants can pack repositories directly.
Key features
- 01Packs a repository into XML, Markdown, JSON or plain text output.
- 02Respects .gitignore, .ignore and .repomixignore files for filtering.
- 03Reports token counts per file and for the whole repository.
- 04Removes files matching known credential formats via Secretlint.
- 05Compresses code to signatures with Tree-sitter using --compress.
- 06Packs remote GitHub repositories by branch, tag or commit.
Use cases
- Sharing an entire codebase with an LLM for code review or refactoring.
- Generating documentation or unit tests from a project in one prompt.
- Checking whether a repository fits within a model's context window.
- Letting an AI assistant access local or remote repositories through MCP.
Quick start
- 1
Try it instantly in your project directory without installing
npx repomix@latest - 2
Or install globally with npm
npm install -g repomix - 3
Run in any project directory to generate repomix-output.xml
repomix
Things to know
- Output can be large, so check token counts against your LLM's context limit.
Topics
FAQ
- What is repomix?
- A CLI and web tool that packs an entire code repository into one AI-friendly file for feeding to LLMs like Claude or ChatGPT. Repomix packs a whole repository into a single file, such as XML, Markdown, JSON or plain text, so the entire codebase can be pasted or uploaded into an LLM chat in one step. It respects .gitignore, .ignore and .repomixignore rules, reports token counts per file and for the whole project, and uses Secretlint to leave out files that match known credential formats.
- Is repomix free to use? What license does it have?
- repomix is open source under the MIT license. Check the license terms before using it in commercial products.
- Is repomix still maintained?
- Actively maintained. The last commit to repomix was on Oct 18, 2026.
- What can I use repomix for?
- Sharing an entire codebase with an LLM for code review or refactoring. Generating documentation or unit tests from a project in one prompt. Checking whether a repository fits within a model's context window. Letting an AI assistant access local or remote repositories through MCP.
- How do I install repomix?
- Try it instantly in your project directory without installing: npx repomix@latest Or install globally with npm: npm install -g repomix Run in any project directory to generate repomix-output.xml: repomix
- Where can I get repomix?
- The source code and installation instructions are on GitHub: https://github.com/yamadashy/repomix
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A self-improving AI agent that creates and refines skills from experience, runs on many model providers, and works through CLI and messaging apps.
Open source autonomous coding agent that runs as an IDE extension, terminal CLI, desktop app, or SDK.
Self-hosted ChatGPT-style chat platform that unifies many AI providers, with Agents, MCP support, Artifacts, and multi-user auth.
A terminal coding agent with built-in LSP, debugger, browser and subagent tools, supporting 60+ model providers.
Turns a Git repository or local directory into a single prompt-friendly text digest for feeding code to LLMs.