Skip to main content
Monokist indexes your git repository structure into SQLite, enabling fast queries about which branches contain a commit, branch comparison (ahead/behind), and cached diffs.

Quick Start

# Index current repository
monokist index

# Which branches contain this commit?
monokist query abc123f

# Compare two branches
monokist compare main feature/new-ui

# Show database stats
monokist stats

Commands

index

Index git structure (branches, commits, relationships).
monokist index [--db <path>]
Scans the git repository and stores branches, commits, and their M:N relationships in SQLite.

query — Core Feature

Query which branches contain a specific commit.
monokist query <commit-hash>
This is the primary use case — answering “where did this commit end up?” instantly from cache instead of running git branch --contains (which is slow on large repos).

branches

List all indexed branches.
monokist branches

compare

Compare two branches (ahead/behind count).
monokist compare <branch-a> <branch-b>
Shows how many commits each branch is ahead/behind the other.

diff

Show diff between two commits (cached or computed).
monokist diff <commit-a> <commit-b>

stats

Show database statistics.
monokist stats

Options

OptionDescription
--db <path>Custom database path (default: auto-detected)
-h, --helpPrint help
-V, --versionPrint version

Design

┌──────────────────────────────────────────────────────────────────┐
│  MONOKIST DESIGN                                                 │
├──────────────────────────────────────────────────────────────────┤
│                                                                  │
│  "Anchor → Fan-out = High Value Data"                            │
│                                                                  │
│  Commits are immutable anchors.                                  │
│  Each commit fans out to multiple branches.                      │
│  This M:N relationship is the core data structure.               │
│                                                                  │
│  git repo → monokist index → SQLite cache                        │
│                                    ↓                             │
│                              monokist query                      │
│                              monokist compare                    │
│                              monokist diff                       │
│                                                                  │
└──────────────────────────────────────────────────────────────────┘