# repomix

> Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Language…

- Type: agent or tool
- Field: Developer Tools
- Repository: https://github.com/yamadashy/repomix
- GitHub stars: 29536
- Licence: MIT
- Language: TypeScript
- Last push: 2026-11-30
- Page: https://imutechz.in/agents/repomix

## What it is
Repomix is a CLI tool that packs an entire code repository into a single AI-friendly file for use with large language models. It automatically respects gitignore rules, counts tokens per file and for the whole repository, and can detect and exclude secrets using Secretlint. The tool also offers a Tree-sitter based compression mode to reduce token usage while preserving code structure.

## Features
- AI-optimized output formatting for LLM consumption
- Token counting for individual files and total repository
- Respects .gitignore, .ignore, and .repomixignore automatically
- Secretlint integration to detect and exclude credentials
- Tree-sitter based code compression to reduce token count
- Configurable include and exclude patterns

## Best for
- Feeding full codebase context to LLMs like Claude, ChatGPT, Gemini
- Preparing repository snapshots for AI code review
- Creating compact code summaries for AI analysis
- Sharing codebases with AI assistants that have context limits

## Pros
- Single command packs entire repository
- Automatic gitignore and secret detection
- Token counts help manage LLM context limits
- Optional compression preserves structure while reducing size

## Cons
- Requires Node.js environment to run
- CLI only (web version at repomix.com is separate)
- Large repositories may still exceed LLM context windows even with compression

## Usage
```
repomix
```

Tags: repository-packer, llm-context, code-aggregator, token-counter, secret-detection, tree-sitter, cli-tool, ai-preparation
