2025
git-qtk
My thesis: a SQL-like language for querying Git history.
git-qtk is my thesis project. I wanted Git history to be queryable without a one-off git log pipeline every time, so I designed a small SQL-like language, wrote it down in YAML, and implemented the engine that runs it.
You describe the question — fields, filters, joins, grouping, and JavaScript when you need it. The tool walks the repository and prints a table. It takes a local path or a Git URL (it clones a temp copy if it has to).
A query for recent commits:
from: commit c; author a
select: short(c.sha); a.name; c.message
where: c.author == a.id
order: c.date desc
limit: 10
┌────────────────┬──────────────────┬────────────────────────────────────────┐
│ short(c.sha) │ a.name │ c.message │
├────────────────┼──────────────────┼────────────────────────────────────────┤
│ a1b2c3d │ John Doe │ Fix bug in parser │
│ e4f5g6h │ Jane Smith │ Add new query examples │
└────────────────┴──────────────────┴────────────────────────────────────────┘
Top contributors, same idea — join, group, count:
from: commit c; author a
select: a.name; count(c.sha) as commits
where: c.author == a.id
group: a.name
order: commits desc
limit: 5
Where-clauses are ordinary JavaScript, so “JS files under bin/ in the last 30 days” is a filter, not a new feature. I built the parser, the Git adapter, and the runtime that makes those files mean something.
npm install https://github.com/imdonix/git-qtk --global
git-qtk -s your-query.yaml -r /path/to/repo
Source is on GitHub. If you are here from a CV: this is language design plus a working CLI, not a wrapper around git log --pretty.