Repomix is a multi-interface tool that packs code repositories into a single AI-optimized file for consumption by large language models (LLMs) like ChatGPT, Claude, and Gemini. It operates as a CLI tool, a library, an MCP (Model Context Protocol) server, a GitHub Action, a browser extension, and a web service. The core pipeline discovers files respecting ignore patterns, reads them with binary and encoding detection, optionally compresses code via tree-sitter (removing implementation details while preserving signatures), scans for secrets with Secretlint, and generates output in XML, Markdown, JSON, or plain text formats. It also provides token counting with configurable encodings and disk-backed caching, git integration (diffs, logs, change-frequency sorting), and skill generation for Claude Agent. Architecturally, the project is modular with a clear separation between the core library (src/core/), CLI interface (src/cli/), MCP server (src/mcp/), website (website/), and browser extension (browser/). The core uses dependency injection for testability, worker threads (tinypool) for parallel file processing and metrics, and a strategy pattern for language-specific tree-sitter parsing. Configuration is loaded from JSON/JS/TS files and merged with CLI options. The codebase demonstrates strong engineering practices including comprehensive test coverage, security hardening (SSRF protection, git command sanitization, sandboxed MCP tools), and performance optimizations (token count cache, bounded concurrency, fast binary detection). The project is actively maintained with frequent releases, a large community (28k+ stars), and extensive documentation in 15 languages. While the core is well-architected, the multiple distribution channels and large dependency surface introduce maintenance overhead. Some duplication exists between the website and CLI validation logic, and the tree-sitter WASM management is fragile. Overall, it is a high-quality, production-ready tool with several reusable components.
OneFileLLM is a versatile CLI tool and web application designed to process diverse inputs (local files, GitHub repositories, YouTube transcripts, arXiv papers, web pages, etc.) into a single structured XML-like output optimized for LLM consumption. The system features format-specific processors that extract and convert content (e.g., Excel to markdown, PDF text extraction, Jupyter notebook to code), token counting via tiktoken with optional NLTK-based compression, and metadata reporting. It includes a Rich-powered terminal interface with colored output and progress bars, a Flask-based web app with Server-Sent Events for real-time progress updates, and an alias system for JSON-stored shortcuts with placeholder substitution. Security is prioritized through SSRF protection, local path validation, and offline mode support. The architecture separates core processing logic (onefilellm.py), CLI handling (cli.py), utilities (utils.py), and web components (extras/web_app.py), enabling modular reuse.