MergeStat Lite is a command-line tool that lets you query git repositories using SQL. It exposes git repository data and related sources through a SQL interface, letting you run ad-hoc analyses on source code without assembling multiple shell commands. The tool works on both local repositories on disk and remote repositories, which it clones to a temporary directory at runtime. Queries can be executed directly through the CLI, and results can be output in multiple formats including JSON, NDJSON, and CSV for integration with other tools.
The problem it solves is the friction of analyzing git repositories through disparate command-line utilities. Rather than chaining together git commands, grep, and other tools to answer questions about a codebase, you write a single SQL query against a unified schema. The tool installs as a binary named mergestat and handles the translation from SQL to git operations internally.
The tool suits developers and teams who need to generate reports, perform status checks, or analyze codebases programmatically. It works well for one-off queries as well as for building repeatable analyses. Beyond raw SQL queries, the tool provides higher-level commands like mergestat summarize commits, which generate reports without requiring SQL input and support flags for filtering by date range and controlling output format.
The project shows consistent maintenance with regular updates to its codebase and documentation. The maintainers actively engage with the community through a dedicated Slack channel and keep the documentation site current with examples and getting-started guides. The tool is distributed through multiple channels including Homebrew and Docker, indicating attention to accessibility for different user environments.