repomix logo

repomix

Free

📦 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

AI ChatbotsFreeFree tier
Type
Open Source

About repomix

Repomix is a powerful open-source CLI tool that packages your entire codebase into a single AI-friendly file (XML, Markdown, or Plain text). It is optimized for feeding code context to large language models (LLMs) such as ChatGPT, Claude, Gemini, and Grok. Key features include AI-optimized formatting, automatic .gitignore detection, Secretlint security checks, token counting, and optional code compression using Tree-sitter. It can be run via npx without installation or installed globally with npm, yarn, bun, or Homebrew.

Key Features

AI-optimized formatting for LLMs
Git-aware: automatically respects .gitignore files
Security-focused with Secretlint for detecting sensitive information
Token counting per file and for the entire repository
Output formats: XML, Markdown, Plain text
Optional code compression using Tree-sitter to reduce token usage
Remove comments and empty lines options
Include/exclude patterns using globs
Run instantly with npx or install via npm, yarn, bun, Homebrew
Works with any LLM service (ChatGPT, Claude, Gemini, Grok, etc.)

Pros & Cons

Pros
  • Free and open-source with no usage costs
  • Works with any subscription-based LLM without extra charges
  • Provides full codebase context, eliminating need for manual file exploration
  • Git-aware: automatically excludes files listed in .gitignore
  • Built-in security checks via Secretlint
  • Token counting helps manage LLM context limits
  • Multiple output formats (XML, Markdown, Plain) for flexibility
Cons
  • Primarily a CLI tool, may require command-line familiarity
  • Large repository outputs may still exceed LLM context limits
  • Dependency on Node.js/npm for installation (or Homebrew)

Best For

Code reviews and quality checksRefactoring codebases with AI assistanceImplementation planning and architecture analysisBug investigation and debuggingThird-party library security auditsDocumentation generation from codebasesProviding complete repository context to AI assistants

Alternatives to repomix

FAQ

What is Repomix?
Repomix is a tool that packages your entire codebase into a single AI-friendly file for use with large language models (LLMs) such as ChatGPT, Claude, Gemini, and Grok.
How do I use Repomix?
You can run `npx repomix@latest` in your project directory without installation, or install globally via npm, yarn, bun, or Homebrew and run `repomix`.
What output formats are supported?
Repomix supports XML, Markdown, and Plain text output formats.
Does Repomix handle .gitignore files?
Yes, Repomix automatically respects your .gitignore files, ensuring ignored files are not included.