Repomix packs an entire repository into a single AI-friendly output file with token counting, security checks, and optional code compression. It supports local execution and remote repository packing, though the packed output remains subject to LLM context window limits.
Project overview
Combines repository packaging, per-file and repository-wide token counting, Secretlint-based security checks, and Tree-sitter code compression into a single CLI operation.
Project type
MCP
Deployment
Refer to project documentation
License
MIT
Best for
Developers and AI engineers who need to consolidate repository files into a single, structured output file while tracking token counts and detecting sensitive information before LLM interaction.
Key capabilities
Formats your codebase in a way that's easy for AI to understand and process, generating a single output file.
Provides token counts for each file and the entire repository, useful for LLM context limits.
Automatically respects your `.gitignore`, `.ignore`, and `.repomixignore` files to include or exclude files.
Incorporates Secretlint for robust security checks to detect and prevent inclusion of sensitive information.
The --compress option uses Tree-sitter to extract key code elements, reducing token count while preserving structure.
Packs remote repositories directly without needing local cloning.
Supports the Model Context Protocol (MCP), allowing AI assistants to directly interact with your codebase without requiring manual file preparation.
Limitations and risks
The generated packed output is still subject to LLM context window limits.
GPU requirements and telemetry practices are not documented.
Getting started
Difficulty is rated easy. The primary success path is running the command `npx repomix@latest` to execute the tool instantly without a permanent installation.