Repomix logo

Repomix

by yamadashy

Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. It is perfect for feeding your codebase to Large Language Models (LLMs) or other AI tools.

View on GitHub

Last updated: N/A

What is Repomix?

Repomix is a tool that packages your codebase into a single file optimized for AI consumption, making it easier to analyze, refactor, and generate documentation using Large Language Models (LLMs).

How to use Repomix?

Repomix can be used via the CLI tool, a website, or a VSCode extension. The CLI tool allows you to pack local or remote repositories, customize inclusions/exclusions, and compress the output. The website offers a simple interface for packing repositories directly in your browser. The VSCode extension allows to run a package with a click of a button.

Key features of Repomix

  • AI-Optimized Formatting

  • Token Counting

  • Customizable Inclusion/Exclusion

  • Git-Aware (.gitignore support)

  • Security Checks (Secretlint)

  • Code Compression (Tree-sitter)

Use cases of Repomix

  • Code Review & Refactoring

  • Automatic Documentation Generation

  • Test Case Generation

  • Code Quality Assessment

FAQ from Repomix

What file formats does Repomix support?

Repomix supports XML, Markdown, and Plain Text output formats.

How does Repomix handle large codebases?

Repomix offers code compression using this --compress option. This allows one to extracts key code elements, reducing token count while preserving structure.

Can I use Repomix with private repositories?

Yes, you can use Repomix with private repositories by using the CLI tool locally, ensuring your code doesn't leave your environment. However, the command --remote option only supports the use of a remote repository and the program does no save data of the remote repository.

What are the advantages of using the XML output format?

The XML format structures content hierarchically with AI usage in mind. XML tags can help LLMs parse prompts more accurately, leading to higher-quality outputs.

How do I customize the files included in the packed output?

You can customize file inclusion and exclusion using glob patterns in a repomix.config.json file or via command-line arguments. Repomix also respects .gitignore files by default.