Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

mergestat-lite

> 数据库
Open source

Query git repositories with SQL. Generate reports, perform status checks, analyze codebases.

3.5K stars0 likes2 views
WebsiteGitHub

About

Query git repositories with SQL. Generate reports, perform status checks, analyze codebases.

mergestat-lite

mergestat-lite is a command-line tool for running SQL queries on git repositories and related data sources. It's meant for ad-hoc querying of source-code on disk through a common interface (SQL), as an alternative to patching together various shell commands. It can execute queries that look like:

sql
-- how many commits have been authored by [email protected]?
SELECT count(*) FROM commits WHERE author_email = '[email protected]'

It installs a binary named mergestat.

More in-depth examples and documentation can be found on our dedicated documentation site.

Join our community on Slack if you have questions, or just to say hi .

Installation

See the full instructions in our documentation.

Homebrew

bash
brew tap mergestat/mergestat
brew install mergestat

Docker

bash
docker run -v "${PWD}:/repo" mergestat/mergestat "select count(*) from commits"

Examples

SQL queries can be executed in the CLI on local or remote git repositories. Remote repos are cloned to a temporary directory at runtime.

The --format flag can be used to output json, ndjson, csv and more (see mergestat -h). This can be useful for piping/using with other tools.

Higher level commands such as mergestat summarize commits generate reports without requiring a SQL input. Learn more here about the available flags such as --start to change the date range and --json to output as JSON.

Learn more in our docs

Issues· 47 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goclicommand-linegitgo

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库