Repomix

Repomix

Official
yamadashy

Packages entire codebases into consolidated, AI-friendly formats that optimize token usage for analysis by ChatGPT, Claude, and other AI models. Supports local directories and remote GitHub repositories with intelligent compression and security filtering.

22,298910 views1,033Local (stdio)

What it does

  • Pack local code directories into AI-optimized formats
  • Clone and package remote GitHub repositories
  • Search through packed codebase files with grep functionality
  • Generate Claude Agent Skills from codebases
  • Read and analyze existing repomix output files
  • Count tokens and compress code intelligently

Best for

AI-assisted code review and analysisRepository migration and refactoring projectsDocumentation generation from codebasesLarge codebase analysis with AI models
Multiple output formats (XML, Markdown, plain text)Built-in security filtering for sensitive dataToken optimization for AI model efficiency

Tools (8)

pack_codebase

Package a local code directory into a consolidated file for AI analysis. This tool analyzes the codebase structure, extracts relevant code content, and generates a comprehensive report including metrics, file tree, and formatted code content. Supports multiple output formats: XML (structured with <file> tags), Markdown (human-readable with ## headers and code blocks), JSON (machine-readable with files as key-value pairs), and Plain text (simple format with separators). Also supports Tree-sitter compression for efficient token usage.

pack_remote_repository

Fetch, clone, and package a GitHub repository into a consolidated file for AI analysis. This tool automatically clones the remote repository, analyzes its structure, and generates a comprehensive report. Supports multiple output formats: XML (structured with <file> tags), Markdown (human-readable with ## headers and code blocks), JSON (machine-readable with files as key-value pairs), and Plain text (simple format with separators). Also supports various GitHub URL formats and includes security checks to prevent exposure of sensitive information.

attach_packed_output

Attach an existing Repomix packed output file for AI analysis. This tool accepts either a directory containing a repomix output file or a direct path to a packed repository file. Supports multiple formats: XML (structured with <file> tags), Markdown (human-readable with ## headers and code blocks), JSON (machine-readable with files as key-value pairs), and Plain text (simple format with separators). Calling the tool again with the same file path will refresh the content if the file has been updated. It will return in that case a new output ID and the updated content.

read_repomix_output

Read the contents of a Repomix-generated output file. Supports partial reading with line range specification for large files. This tool is designed for environments where direct file system access is limited (e.g., web-based environments, sandboxed applications). For direct file system access, use standard file operations.

grep_repomix_output

Search for patterns in a Repomix output file using grep-like functionality with JavaScript RegExp syntax. Returns matching lines with optional context lines around matches.

Alternatives