About this project

Repomix is a CLI tool, web app, and browser extension that consolidates an entire codebase into a single file optimized for Large Language Models. It supports multiple output formats including XML (default), Markdown, JSON, and plain text, each structured with file summaries, directory trees, and file contents to enhance AI comprehension. Key features include: - Token counting per file and across the entire repository to help manage LLM context limits. - Git-aware file selection that respects .gitignore, .ignore, and .repomixignore files. - Security-focused output that uses Secretlint to detect and exclude files matching known credential patterns. - Code compression via Tree-sitter to extract key code elements (classes, functions, interfaces), reducing token count while preserving structure. - Support for packing remote repositories by URL, GitHub shorthand, branch, tag, or commit hash. - Flexible file selection through glob patterns, stdin piping, and include/exclude filters. - Optional inclusion of git logs and diffs for development context. - Output splitting into multiple files by size, comment removal, empty line removal, base64 truncation, and line number prefixing. - Docker support for isolated execution. The tool can be run via npx without installation, installed globally through npm/yarn/bun/Homebrew, used through the repomix.com website, or accessed through Chrome and Firefox browser extensions that add a Repomix button to GitHub repository pages. A community-maintained VSCode extension called Repomix Runner is also available. The generated output file begins with an AI-oriented explanation of its structure and usage, making it easier for AI models to understand the packed repository context. Users can then feed this file to AI assistants with prompts for code review, documentation generation, test case generation, code quality assessment, or library overviews.