Overview
Repomix is an open-source command-line tool that bundles your entire repository into a single file built for AI tools. Instead of copying files one by one into a chat, you run one command and get an output file you can paste or upload to an LLM.
The packed output is formatted so models like Claude, ChatGPT, DeepSeek, Perplexity, Gemini, and Llama can read it easily. Repomix counts tokens for each file and the whole repo, respects your .gitignore rules, and can run security checks to keep secrets out of the output.
What it does
- Packs a full repository into one AI-optimized file with a single command
- Reports token counts per file and for the whole repo to help you stay within LLM context limits
- Git-aware: automatically respects .gitignore, .ignore, and .repomixignore files
- Security checks via Secretlint to detect and block sensitive information in the output
- Code compression with the --compress option, using Tree-sitter to keep key structure while cutting tokens
- Works on local folders or remote repositories with --remote, including a browser, website, and Docker option
Getting started
You can run Repomix instantly with npx, or install it globally for repeated use. It generates a repomix-output.xml file you can hand to an AI assistant.
Run it instantly with npx
From inside your project directory, run Repomix with no install needed. It creates a repomix-output.xml file containing your whole repository.
npx repomix@latestOr install it globally
Install once with your preferred package manager, then run the repomix command in any project directory.
npm install -g repomix
# or: yarn global add repomix
# or: bun add -g repomix
# or: brew install repomix
repomixPick files and compress output
Use glob patterns to include or exclude paths, and the --compress option to reduce token count while keeping code structure.
repomix --include "src/**/*.ts,**/*.md"
repomix --ignore "**/*.log,tmp/"
repomix --compressPack a remote repository
Point Repomix at a remote repo with --remote, using a full URL or GitHub shorthand, and optionally a branch, tag, or commit.
repomix --remote yamadashy/repomix
repomix --remote https://github.com/yamadashy/repomix --remote-branch mainCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Feed your entire codebase to an AI assistant for a code review or refactoring suggestions
- Generate a detailed README or other documentation from the full project context
- Get a high-level overview or architecture summary of an unfamiliar library or repository
- Stay within an LLM's context window by checking token counts and compressing the packed output
How Repomix compares
Repomix alongside other open-source parsing & ingestion tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| MarkItDown | ★ 156k | A Microsoft Python utility that converts many file types, including Office docs and PDFs, into Markdown for LLMs. |
| MinerU | ★ 68.1k | A document extraction tool that converts PDFs and Office files into clean Markdown or JSON, with strong handling of complex layouts and CJK content. |
| Docling | ★ 61.9k | An IBM-originated document conversion pipeline that turns PDF, DOCX, PPTX, HTML, and more into structured, LLM-ready Markdown or JSON. |
| Marker | ★ 36.2k | A fast pipeline that converts PDFs and other documents to Markdown, JSON, or HTML while preserving tables, equations, and formatting. |
| Repomix | ★ 26.4k | Pack your whole codebase into a single AI-friendly file |
| OpenDataLoader PDF | ★ 25.4k | OpenDataLoader PDF turns any PDF into structured Markdown, JSON, or HTML with bounding boxes, and auto-tags untagged files into screen-reader-ready Tagged PDFs. |
| Unstructured | ★ 15k | A library for ingesting and preprocessing many document types into clean, chunked elements ready for RAG pipelines. |
| Zerox | ★ 12.2k | A tool that OCRs documents by passing page images through a vision model to produce Markdown output for downstream use. |