Repomix packs a repository into one file: what the pack leaves out
📦 Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Language Models (LLMs) or other AI tools like Claude, ChatGPT, DeepSeek, Perplexity, Gemini, Gemma, Llama, Grok, and more.
At a glance
- What is it?
- Repomix flattens an entire repository into a single repomix-output.xml file to hand to an LLM. Its include flags, Secretlint pass, and Tree-sitter compression each shrink that payload, and each one narrows what your assistant actually gets to read.
- Who is it for?
- Repomix fits quick audits of a repository and the moment right before you paste a codebase into a prompt, and its commit cadence supports relying on the CLI: the last push landed 2026-11-01, with v1.18.1 released 2026-09-21 after v1.18.0 on 2026-08-08.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.
Star history
- yamadashy/repomix29,268 ★ · +1,794
| Repository | 2026-07-28 | 2026-11-14 |
|---|---|---|
| yamadashy/repomix | 27.5k | 29.3k |
1,794 Stars in the last 109 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Five routes to the same binary, and only one of them re-resolves the version
The quickest path needs no install at all, running straight from a project directory:
npx repomix@latestFor repeated use, four global installers are offered:
# Install using npm
npm install -g repomix
# Alternatively using yarn
yarn global add repomix
# Alternatively using bun
bun add -g repomix
# Alternatively using Homebrew (macOS/Linux)
brew install repomix
# Then run in any project directory
repomixEach global route writes a permanent repomix command that stays on whatever version you installed, while the npx path re-resolves the latest release on every run. The container route states its own contract explicitly: the Dockerfile starts FROM node:22-slim, installs git and ca-certificates, runs npm ci together with npm link and npm prune --omit=dev, and then runs repomix --version and repomix --help as build steps. A broken binary therefore fails the image build instead of waiting to surprise you on the first pack.
The default artifact is one file named repomix-output.xml
Running the CLI with no arguments writes repomix-output.xml into the current directory, and that filename is the only default output the quick start names. The file is built to travel straight into an assistant with a short prompt:
This file contains all the files in the repository combined into one.
I want to refactor the code, so please review it first.The browser version at repomix.com makes output format a choice, offering XML, Markdown, or Plain Text, along with an instant token count estimate before you pack. So the .xml filename is a CLI default rather than a fixed format.
Include and ignore take glob patterns, and the project's own scripts use plain names
What lands in the pack is decided by two flags. You can point the tool at a directory:
repomix path/to/directoryname files with glob patterns:
repomix --include "src/**/*.ts,**/*.md"or drop paths entirely:
repomix --ignore "**/*.log,tmp/"The repository's own package.json scripts show the same flag in a simpler form, passing one --include argument with comma separated targets such as 'src,tests' and 'website'. Remote repositories work through a separate flag:
repomix --remote https://github.com/yamadashy/repomix
# You can also use GitHub shorthand:
repomix --remote yamadashy/repomSecretlint removes files matching known credential formats, and nothing beyond them
Credential handling leans on Secretlint, and its reach is narrower than the word security implies. Repomix uses Secretlint to detect files matching known credential formats and leave them out of the output, and the repository carries both a .secretlintrc.json at the root and a lint script that runs secretlint across the tree with .gitignore as its ignore file. That covers files whose contents match patterns Secretlint already knows about. A token pasted into a comment, a key inside a format with no matching rule, or a secret sitting in a path the patterns never reach still gets written into repomix-output.xml, because the project claims detection of known formats only. The pack then travels to whichever assistant you send it to, so the gap belongs to you to close.
--compress preserves structure and discards the bodies with it
The compression option runs Tree-sitter to extract key code elements, reducing token count while preserving structure. Structure is precisely the boundary. Once code is reduced to its key elements, an assistant working from the pack is reasoning over a skeleton, and any claim it makes about behavior, error paths, or a specific changed line has to come from something other than the code you removed. The practical move is to pack twice, once plain and once compressed, and compare what each version of the assistant tells you about the same file.
Ignore rules decide what the model never sees
Three ignore files steer the pack automatically: .gitignore, .ignore, and .repomixignore, and Repomix respects all of them. That is what keeps whatever your repository already treats as noise out of the output, and it is also the quietest way to lose context. The contents of repomix-output.xml are therefore also decided by ignore files you may not remember writing. Anything excluded there is simply absent, including files the project needs, and the model has no way to signal that they were never offered. Check which ignore rule drops a file before you accept an answer about a file you know exists.
Token counts are reported, but nothing splits the pack
Counting is a first-class output: Repomix provides token counts for each file and for the entire repository, aimed at LLM context limits, and the website adds an instant estimate before a single file is generated. Read the total before you paste, and remember what a count does not tell you: a file that fits the window on its own says nothing about what is left once the assistant has spent room on your prompt and the conversation so far.
The MCP name, browser add-ons, and a VSCode runner maintained by someone else
Outside the terminal there are three more entry points, and they carry different weight. The package declares an MCP server name of io.github.yamadashy/repomix, the Chrome extension and Firefox add-on add a Repomix button to GitHub repository pages, and the VSCode extension called Repomix Runner is community-maintained by massdo and reads your existing repomix.config.json. Two consequences follow. The browser add-ons work from GitHub repository pages, so they cover only repositories you can already open in a browser window, which leaves local and private work to the CLI. And Repomix Runner is a separate project, so its config handling and output naming can drift from the CLI's behavior with no change on this side. The CLI itself stays busy: the last push landed 2026-11-01 and v1.18.1 shipped 2026-09-21. For Python and data science work, the project points you at Gitingest, which it calls better suited to those workflows.
Editorial conclusion
Repomix fits quick audits of a repository and the moment right before you paste a codebase into a prompt, and its commit cadence supports relying on the CLI: the last push landed 2026-11-01, with v1.18.1 released 2026-09-21 after v1.18.0 on 2026-08-08. Before trusting a pack, open repomix-output.xml and confirm your ignore rules did not drop a file the answer depends on, compare the total token count against your model's context limit, and scan the output yourself, because Secretlint only removes files matching known credential formats. For line-accurate review work, stay in your editor, since --compress keeps key code elements rather than the full source.
Frequently asked questions
what does repomix do
It packs your entire repository into a single AI-friendly file, repomix-output.xml by default, and reports token counts for each file and for the whole repository.
how to install repomix
Run npx repomix@latest in a project directory with no install step, or install it globally with npm install -g repomix, yarn global add repomix, bun add -g repomix, or brew install repomix on macOS and Linux.
is repomix safe
It incorporates Secretlint to detect files matching known credential formats and leave them out of the output. Anything outside those known formats is not claimed as detected and can still reach repomix-output.xml.
is repomix open source?
Yes. The project carries an MIT license, and its TypeScript source sits in the repository under src/ alongside a website/ directory, a bin/ entry point, and tests/.
is repomix free
The package is published on npm under an MIT license, you can try it without installing anything by running npx repomix@latest, and repomix.com packs a repository in the browser.
repomix vs code2prompt
The project names Gitingest as the alternative to check out, calling it better suited for Python ecosystem and data science workflows. It does not name code2prompt.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/yamadashy-repomix)Star history chart for your README
[](https://hysenlabs.com/projects/yamadashy-repomix)Was this useful?