← Directory

Repomix

Open Source
★ 25,951 • Updated Aug 15, 2026, 07:19 PM

Repomix is an open-source command-line tool that bundles an entire code repository into a single, AI-friendly text file.

Use Cases ▼
01

Generate a single context file for code review by LLMs

02

Share entire repository with AI coding assistants

03

Automate codebase summarization in CI/CD pipelines

04

Create training data for fine-tuning models on code

05

Simplify codebase documentation generation

06

Integrate with AI-powered debugging tools

What Problem It Solves ▼

When working with large language models, providing the entire codebase as context is challenging due to token limits and the need to manually copy multiple files. Repomix solves this by consolidating all relevant source files into a single structured file, reducing manual effort and improving AI comprehension.

Key Features ▼
✓

Simple one-command operation

✓

Respects .gitignore and excludes binaries

✓

Multiple output formats (text, XML, Markdown)

✓

Token-aware compression reduces file size

✓

Open source and free

Overview

Repomix is an open-source command-line tool that bundles an entire code repository into a single, AI-friendly text file. It intelligently includes file contents with clear separators, respects .gitignore, and automatically excludes binary files. The output is optimized for consumption by large language models (LLMs) such as Claude, ChatGPT, DeepSeek, Gemini, and others, making it easy to provide full codebase context.

Full Description ▼

Repomix supports multiple output formats including plain text, XML, and Markdown, and it can apply token-aware minification to compress the output for better fit within LLM context windows. It can be run locally via npx or installed globally, and it integrates well with CI/CD pipelines for automated repository processing.

The tool is implemented in TypeScript and distributed under the MIT license. It is actively maintained and widely used by developers who need to share codebases with AI assistants, create training data, or generate comprehensive code documentation.

Pros & Cons

Pros

+

Simple one-command operation

+

Respects .gitignore and excludes binaries

+

Multiple output formats (text, XML, Markdown)

+

Token-aware compression reduces file size

+

Open source and free

Cons

−

May produce large files for huge repositories

−

Limited to text-based files; binaries are excluded

−

Requires some manual curation for optimal token usage

−

Not an AI itself; only a preprocessing tool

Similar Tools

Gitingest Code2Prompt Repo2Txt llmctx Sourcegraph codebase-to-text

More in LLM