Shrink-wrapping repos for LLM digestion
Repomix exists because copy-pasting twenty files into a chat window is a terrible way to ask an LLM for help.

What it does
Repomix takes a local or remote repository and bundles it into a single file—XML, Markdown, or plain text—formatted for consumption by large language models. It respects your .gitignore, .ignore, and .repomixignore patterns, counts tokens per file and in total, and can even pull from GitHub directly if you don’t have the repo cloned locally. A web UI and browser extensions offer the same functionality without touching a terminal.
The interesting bit
The --compress option uses Tree-sitter to extract key code elements, reducing token counts while preserving structure. It’s lossy compression that actually helps. The tool also runs Secretlint to keep credentials from accidentally hitchhiking into your prompts.
Key highlights
- Outputs in XML, Markdown, or plain text with configurable include/exclude globs
- Token counts per file and total, so you can eyeball context-window fit before uploading
- Git-aware filtering via
.gitignore,.ignore, and.repomixignore - Optional Tree-sitter-based structural compression to reduce token bloat
- Secretlint integration to catch sensitive data before it leaves your machine
- Supports remote repos,
stdinfile lists, and has a web UI plus browser extensions
Caveats
- The VSCode extension is community-maintained, not official
- The README touts “AI-optimized” formatting but is vague on what exactly makes the output structurally superior to a plain tarball
Verdict
Worth a look if you regularly feed entire codebases to Claude, ChatGPT, or DeepSeek and want token counts and security guardrails baked in. If you only ever share single snippets, it’s overkill.
Frequently asked
- What is yamadashy/repomix?
- Repomix exists because copy-pasting twenty files into a chat window is a terrible way to ask an LLM for help.
- Is repomix open source?
- Yes — yamadashy/repomix is open source, released under the MIT license.
- What language is repomix written in?
- yamadashy/repomix is primarily written in TypeScript.
- How popular is repomix?
- yamadashy/repomix has 27.3k stars on GitHub and is currently cooling off.
- Where can I find repomix?
- yamadashy/repomix is on GitHub at https://github.com/yamadashy/repomix.