Repomix
Pack entire codebases into single AI-friendly files for LLMs
About Repomix
Repomix (formerly Repopack) is a powerful, open-source command-line tool that packages entire Git repositories and codebases into a single, clean, and token-optimized Markdown or XML file designed for large-context LLMs like Claude 3.7 Sonnet, GPT-4.5, and Google Gemini 2.0 Pro. When developers want to ask AI questions about architecture, conduct full codebase security audits, or migrate legacy software, manually copying and pasting individual files is tedious and prone to missing crucial context. Repomix automatically analyzes directory trees, parses .gitignore files, removes binary assets and lockfiles, calculates token counts, and formats the entire codebase into an optimized structure that maximizes LLM comprehension.
Repomix executes via NPX or global binary installation in seconds. It generates a clear visual repository file tree, includes metadata header summaries, and encloses code files inside clean code blocks or XML tags. The CLI includes advanced configuration options (repomix.config.json) supporting custom include/exclude patterns, sensitive file redaction (preventing .env or credential leakage), token count estimation with Tiktoken, and comment stripping to conserve LLM context windows. With over 8,000 GitHub stars, Repomix has become a standard utility in the AI engineering toolkit for feeding multi-thousand-line codebases into 1M+ token window models.
Run npx repomix directly in the root of any Git repository without installation.
Repomix scans the project, respects .gitignore, and filters out binary and lockfiles.
The tool generates a single repomix-output.txt or repomix-output.xml file containing the complete codebase.
Upload or paste the generated output file into Claude, ChatGPT, or Gemini.
Ask complex architectural questions, request multi-file refactoring, or generate comprehensive test suites.
Capabilities & Features
Common Use Cases
codebase-packaging
llm-prompting
code-review
context-preparation
Frequently Asked Questions
How do I run Repomix without installing anything?
You can run `npx repomix` in your terminal inside any project directory. It executes instantly using Node.js without requiring global package installation.
Does Repomix protect sensitive files like .env and API keys?
Yes, Repomix automatically respects `.gitignore` and includes built-in security patterns to exclude environment variables, private keys, certificates, and auth tokens.
Which LLMs work best with Repomix output?
Repomix works exceptionally well with large context window models including Claude 3.7 Sonnet (200k context), Google Gemini 2.0 (1M-2M context), and OpenAI GPT-4.5.
Free Plan
100% Free and open-source under MIT license. Unlimited CLI and browser execution with zero usage limits.
Paid Plan
No paid tier. Completely free community software.
Pros & Cons
100% Free and open-source under the MIT license with zero tracking
Instant execution via NPX (npx repomix) with zero manual setup
Respects .gitignore and automatically ignores minified files, lockfiles, and binaries
Advanced sensitive file redaction to prevent accidental credential leakage
Output formats supported in clean Markdown, Plain Text, and XML for Claude
Very large enterprise monorepos may exceed standard 200k token windows without custom filtering
CLI utility without continuous real-time IDE completion
Alternatives
View allCursor
The AI code editor that knows your whole codebase
An AI-first code editor built on VS Code that understands your entire codebase for smarter completions and chat.
Supermaven
Ultra-fast 300,000-token context AI code completion engine
Supermaven is an ultra-low-latency AI code completion extension engineered by the creators of TabNine. Renowned for its industry-leading response speed and massive 300,000-token context window, Supermaven delivers sub-100ms inline suggestions that feel instant compared to traditional LLM copilot extensions. By ingesting your entire repository into its specialized Babble neural architecture, Supermaven understands project-wide type definitions, custom internal libraries, coding conventions, and recent file edits with unprecedented accuracy. Available across Visual Studio Code, JetBrains IDEs, and Neovim, Supermaven offers a generous free tier for individual developers alongside a high-context Pro tier for professional engineers.
Windsurf
AI agent-powered IDE for developers
Windsurf is an AI-native code editor built by Codeium that integrates an AI agent directly into the development environment. It helps developers write, refactor, and debug code while maintaining flow state with contextual AI assistance.
Warp
The terminal for the 21st century
A modern, Rust-based terminal with AI built-in to help you find and run commands using natural language.
Replit
Collaborative cloud IDE with built-in AI agent
Replit provides a comprehensive cloud environment for writing, hosting, and deploying applications. Its AI agent can build entire features or full-stack apps from natural language.
Anthropic Console
Enterprise-grade AI for developers
The developer gateway to Claude models, offering advanced controls like prompt caching and Artifacts rendering via API.
Compare Repomix with Alternatives
Side-by-side feature, pricing, and pros & cons breakdowns
