Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mergestat/mergestat-lite
Query git repositories with SQL. Generate reports, perform status checks, analyze codebases. 🔍 📊
https://github.com/mergestat/mergestat-lite
cli command-line git go golang sql sqlite
Last synced: 3 days ago
JSON representation
Query git repositories with SQL. Generate reports, perform status checks, analyze codebases. 🔍 📊
- Host: GitHub
- URL: https://github.com/mergestat/mergestat-lite
- Owner: mergestat
- License: mit
- Created: 2020-07-03T19:46:40.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-14T21:11:18.000Z (about 2 months ago)
- Last Synced: 2024-10-29T10:53:31.030Z (about 1 month ago)
- Topics: cli, command-line, git, go, golang, sql, sqlite
- Language: Go
- Homepage: https://mergestat.com/
- Size: 7.13 MB
- Stars: 3,457
- Watchers: 36
- Forks: 104
- Open Issues: 40
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
- awesome - mergestat/mergestat-lite - Query git repositories with SQL. Generate reports, perform status checks, analyze codebases. 🔍 📊 (Go)
- my-awesome-starred - mergestat/mergestat-lite - Query git repositories with SQL. Generate reports, perform status checks, analyze codebases. 🔍 📊 (Go)
- awesome-golang-repositories - mergestat-lite
- awesome-hacking-lists - mergestat/mergestat-lite - Query git repositories with SQL. Generate reports, perform status checks, analyze codebases. 🔍 📊 (Go)
- jimsghstars - mergestat/mergestat-lite - Query git repositories with SQL. Generate reports, perform status checks, analyze codebases. 🔍 📊 (Go)
- my-awesome - mergestat/mergestat-lite - line,git,go,golang,sql,sqlite pushed_at:2024-12 star:3.5k fork:0.1k Query git repositories with SQL. Generate reports, perform status checks, analyze codebases. 🔍 📊 (Go)
README
[![Go Reference](https://pkg.go.dev/badge/github.com/mergestat/mergestat-lite.svg)](https://pkg.go.dev/github.com/mergestat/mergestat-lite)
[![BuildStatus](https://github.com/mergestat/mergestat-lite/workflows/tests/badge.svg)](https://github.com/mergestat/mergestat-lite/actions?workflow=tests)
[![Go Report Card](https://goreportcard.com/badge/github.com/mergestat/mergestat-lite)](https://goreportcard.com/report/github.com/mergestat/mergestat-lite)
[![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/mergestat/mergestat-lite/main)](https://www.tickgit.com/browse?repo=github.com/mergestat/mergestat-lite&branch=main)
[![codecov](https://codecov.io/gh/mergestat/mergestat-lite/branch/main/graph/badge.svg)](https://codecov.io/gh/mergestat/mergestat-lite)
[![Twitter Follow](https://img.shields.io/twitter/follow/mergestat)](https://twitter.com/mergestat)`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**](https://docs.mergestat.com/).
Join our community on [Slack](https://join.slack.com/t/mergestatcommunity/shared_invite/zt-xvvtvcz9-w3JJVIdhLgEWrVrKKNXOYg) if you have questions, or just to say hi 🎉.
## Installation
See the [**full instructions**](https://docs.mergestat.com/getting-started-cli/installation) 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.![CLI SQL Screenshot](./docs/cli-query-example.png)
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](https://docs.mergestat.com/getting-started-cli/summarize-commits) about the available flags such as `--start` to change the date range and `--json` to output as JSON.![CLI Summarize Commits Screenshot](./docs/cli-summarize-example.png)
[**Learn more in our docs**](https://docs.mergestat.com/)