LogoMCP Store
icon of Repomix

Repomix

Repomix packs your entire repository into a single, AI-friendly file for Large Language Models and other AI tools.

Introduction

Repomix

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

🚀 Quick Start

You can try Repomix instantly in your project directory without installation:

npx repomix

Or install globally for repeated use:

# Install using npm
npm install -g repomix
 
# Alternatively using yarn
yarn global add repomix
 
# Then run in any project directory
repomix

That's it! Repomix will generate a repomix-output.xml file in your current directory, containing your entire repository in an AI-friendly format.

🌟 Key Features
  • AI-Optimized: Formats your codebase in a way that's easy for AI to understand and process.
  • Token Counting: Provides token counts for each file and the entire repository, useful for LLM context limits.
  • Simple to Use: You need just one command to pack your entire repository.
  • Customizable: Easily configure what to include or exclude.
  • Git-Aware: Automatically respects your .gitignore files and .git/info/exclude.
  • Security-Focused: Incorporates Secretlint for robust security checks to detect and prevent inclusion of sensitive information.
  • Code Compression: The --compress option uses Tree-sitter to extract key code elements, reducing token count while preserving structure.
⚙️ Configuration

Create a repomix.config.json file in your project root for custom configurations.

repomix --init
{
  "output": {
    "filePath": "repomix-output.xml",
    "style": "xml",
    "parsableStyle": true,
    "compress": false,
    "headerText": "Custom header information for the packed file.",
    "fileSummary": true,
    "directoryStructure": true,
    "removeComments": false,
    "removeEmptyLines": false,
    "showLineNumbers": false,
    "copyToClipboard": true,
    "topFilesLength": 5,
    "includeEmptyDirectories": false,
    "git": {
      "sortByChanges": true,
      "sortByChangesMaxCommits": 100
    }
  },
  "include": [
    "**/*"
  ],
  "ignore": {
    "useGitignore": true,
    "useDefaultPatterns": true,
    "customPatterns": [
      "additional-folder",
      "**/*.log"
    ]
  },
  "security": {
    "enableSecurityCheck": true
  },
  "tokenCount": {
    "encoding": "o200k_base"
  }
}
📜 License

This project is licensed under the MIT License.

Information

Tags

    Newsletter

    Join the Community

    Subscribe to our newsletter for the latest news and updates