repomix  by yamadashy

CLI tool to pack codebases into AI-friendly formats for LLMs

created 1 year ago
18,189 stars

Top 2.5% on sourcepulse

GitHubView on GitHub
Project Summary

Repomix is a command-line tool and web application designed to package entire code repositories into a single, AI-friendly file. It caters to developers and researchers who need to feed their codebase to Large Language Models (LLMs) for tasks like code review, refactoring, and documentation generation. Repomix simplifies this process by providing a consolidated, structured output, enhancing AI comprehension and interaction with codebases.

How It Works

Repomix processes a repository by traversing its file structure, respecting .gitignore and custom ignore patterns. It offers multiple output formats (XML, Markdown, Plain Text) and includes features like token counting for LLM context management. The --compress option leverages Tree-sitter to extract key code elements, reducing token count while preserving structural information. Security checks using Secretlint are integrated to prevent sensitive data inclusion.

Quick Start & Requirements

  • CLI Installation: npm install -g repomix or yarn global add repomix or brew install repomix. Alternatively, use npx repomix for on-demand execution.
  • Website: Available at repomix.com.
  • VSCode Extension: Repomix Runner is available on the VSCode Marketplace.
  • Dependencies: Node.js.

Highlighted Details

  • Supports packing local and remote repositories.
  • Features code compression using Tree-sitter to reduce token count.
  • Integrates Secretlint for security checks to detect sensitive information.
  • Offers Model Context Protocol (MCP) server integration for AI assistants.

Maintenance & Community

  • Active development with a Discord community for support and discussion.
  • Links to Discord and GitHub are provided.

Licensing & Compatibility

  • Licensed under the MIT License.
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

The --compress feature is experimental and subject to improvement based on user feedback. Binary files are not included in the packed output but their paths are listed in the "Repository Structure".

Health Check
Last commit

5 days ago

Responsiveness

1 day

Pull Requests (30d)
35
Issues (30d)
6
Star History
2,958 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.