Overview
Repomix: AI-friendly code formats
Developers working with large codebases often struggle to prepare source code for large language models like Claude, ChatGPT, and Gemini, which require specific structured formats to operate effectively. Repomix addresses this challenge by packing local or remote repositories into LLM-friendly formats such as XML, Markdown, JSON, or plain text, making it seamless to integrate with automated code review workflows. The utility is fully Git-aware, automatically parsing gitignore files to ensure sensitive internal scripts and untracked assets are excluded from processed outputs. Additionally, Repomix incorporates Secretlint to detect and censor files containing known credential patterns, reinforcing data security during external AI processing. It also calculates token counts for individual files and the entire directory, helping developers manage contextual window constraints effectively. One notable capability of Repomix is compressing source files and stripping non-essential implementation details using Tree-sitter, which drastically lowers token consumption. While it lacks automatic code formatting for niche languages, Repomix remains a versatile CLI tool for MacOS, Linux, and Windows.
