# gitbase

SQL interface to git repositories, written in Go. https://docs.sourced.tech/gitbase

Repository: https://github.com/src-d/gitbase
Canonical: https://ross.abutalabs.com/products/gitbase
Language: Go
License: Apache-2.0
License Family: permissive
Topics: sql, git, sql-interface, golang, ast
Last push: 2023-10-19T12:50:23+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3635, "days_push": 1049, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2084, forks 127 (observed 2026-08-28T04:06:11.844552+00:00)

## What it is
gitbase is a SQL database interface to Git repositories, written in Go, that lets users run SQL queries over git history and the Universal AST of source code. It implements the MySQL wire protocol so any MySQL client or library can query any number of local repositories.

## Use cases
- query git repositories with sql
- analyze commit history across many repos
- run sql queries over source code asts
- mine large collections of git repositories
- connect a mysql client to git data
- bulk analysis of open source codebases

## When to choose
- you want to analyze many git repositories using SQL instead of scripting
- you need MySQL-client compatibility for repository data
- you want to query code structure via a universal AST

## When to avoid
- you need a production-grade, actively developed solution (project is in alpha and in maintenance)
- you only need simple git history inspection where plain git commands suffice
- you need distributed processing like Spark integration, which was never completed

## Facets
- artifact type: service
- maturity: maintenance
- function: database, search-engine, parser, http-server
- domain: developer-tools, version-control, databases, analytics
- platform: go, cli
- tags: git, sql-interface, mysql-wire-protocol, code-analysis, ast, repository-mining, linux, macos, docker

## Member repositories
- src-d/gitbase (main) score 23
- src-d/go-mysql-server (backend) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:11.844552+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:55:51.459501+00:00, confidence not recorded.
  - readme: https://github.com/src-d/gitbase (fetched 2026-08-28T04:06:11.844552+00:00, sha 8a4bbc5180b3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
