repomix 2026: Pack Your Entire Codebase into One LLM-Ready File — Zero Config
repomix (formerly repopack) turns any Git repository into a single, structured plain-text file optimized for LLM context windows — supporting Claude, ChatGPT, Gemini, and Cursor. 14k+ stars, zero config, runs in seconds with npx.
- ⭐ 14200
- Node.js
- TypeScript
- CLI
- MIT
- Updated 2026-06-09

When you ask Claude or ChatGPT to debug a multi-file issue or refactor a complex function, pasting code snippets one-by-one loses context fast. repomix solves this by turning your entire repository into one structured file — ready to drop into any LLM’s context window in seconds.
What repomix Does #
repomix scans your repository, excludes files in .gitignore, and outputs a single text file containing:
- Repository summary — total files, token estimate, language breakdown
- Directory tree — full folder structure at a glance
- All source files — each prefixed with a path header and optional line numbers
The result is immediately usable with Claude, ChatGPT, Gemini, Cursor, or any LLM that accepts file upload or long-form pasting.
Zero Config Start #
# Run without installing — uses npx
npx repomix
# Install globally
npm install -g repomix
# Pack specific directory
repomix ./src
# Pack remote GitHub repo directly (no git clone needed)
npx repomix --remote https://github.com/user/repo
That’s it. repomix output.txt is created in the current directory.
Output Formats #
| Format | Flag | Best For |
|---|---|---|
| Plain text | --style plain (default) | ChatGPT, general LLMs |
| XML | --style xml | Claude (uses XML natively), structured parsing |
| Markdown | --style markdown | Copilot, documentation workflows |
# XML output for Claude
repomix --style xml --output repo-context.xml
# Markdown output
repomix --style markdown
Filtering the Output #
For large projects, include only what’s relevant:
# Include only TypeScript files in src/
repomix --include "src/**/*.ts"
# Exclude test files and generated code
repomix --ignore "**/*.test.ts,dist/**,node_modules/**"
# Show line numbers (helps LLMs give accurate edit suggestions)
repomix --output-show-line-numbers
repomix.config.json (Persistent Settings) #
Create repomix.config.json in your repo root to save preferences:
{
"output": {
"style": "xml",
"filePath": "context.xml",
"showLineNumbers": true,
"removeComments": false
},
"ignore": {
"useGitignore": true,
"customPatterns": ["*.test.ts", "dist/**", "*.lock"]
}
}
Typical LLM Workflows #
Full Codebase Code Review #
# Pack the repo, then paste into Claude
repomix --style xml --output review.xml
# → Upload to Claude Project or paste into conversation
# → "Review this codebase for security issues, architecture problems, and dead code."
Bug Diagnosis Across Multiple Files #
# Include only the affected subsystem
repomix --include "src/auth/**,src/middleware/**" --style xml
# → "Here's my authentication code. The JWT is being rejected on mobile but not desktop. Find the bug."
Generating Documentation #
repomix --style markdown --output docs-context.md
# → "Generate comprehensive JSDoc for every exported function in this codebase."
Remote Repo Analysis (No Clone Required) #
# Analyze an open-source project without cloning
npx repomix --remote https://github.com/some-org/some-project
# → "Summarize the architecture. What design patterns does this project use?"
Security Note: .repomixignore #
repomix respects .gitignore by default, but secrets that aren’t gitignored (local .env files, API keys in config) can end up in output. Add a .repomixignore file to explicitly exclude sensitive files:
.env
.env.local
secrets/**
config/credentials.json
repomix vs. Similar Tools #
| Tool | Approach | Best For |
|---|---|---|
| repomix | Single file, LLM-optimized, XML/plain/MD | Any LLM, fastest start |
| Cursor | IDE-native context | Cursor users only |
| Aider | Adds LLM to git workflow | Git-integrated coding sessions |
| Ollama | Runs local models | Self-hosted inference |
repomix doesn’t replace any of these — it complements them by providing clean context input.
Need a server to build AI developer tools? DigitalOcean new users get $200 in credits — enough to run a development server, host a private repomix pipeline, or deploy your AI-assisted codebase. No long-term commitment.
Who Should Use repomix #
Use repomix if you:
- Regularly ask LLMs to help debug multi-file issues
- Want to give Claude or ChatGPT full context for architecture reviews
- Need to onboard a new AI tool to a project quickly
- Work with large codebases that exceed typical snippet-pasting approaches
GitHub: yamadashy/repomix · 14.2k ⭐ · MIT
💬 Discussion