inkdex docs

History and snapshots

Index past revisions, compare them, and follow a function across renames.

The index keeps one snapshot per indexed commit, plus the working tree. Every read command accepts --at REF (worktree, a sha, HEAD~2, a tag) to read a snapshot instead of the current one.

inkdex index --commit HEAD~1                       # index a revision, working tree untouched
inkdex index --range v3.0.0..HEAD --first-parent   # one snapshot per commit, then the working tree
inkdex snapshot list
inkdex snapshot pin v3.0.0                          # keep it when cleaning up
inkdex search '*login*' --at HEAD~5

Comparing two revisions

inkdex diff main HEAD --markdown        # symbols and security: what was added, removed, changed
inkdex diff main HEAD --sarif > new.sarif
inkdex diff main --gate                 # exit 1 on a new unsanitized flow (CI)
inkdex changed --since main --kind fn --with-callers 2 --format paths

Following a function

inkdex history app.auth.check_password    # its versions, renames and moves
inkdex blame app.auth.check_password      # who changed it, when
inkdex lineage                            # renames and moves across the history

Tags and annotations

Tags and annotations hang on a symbol and follow it across renames.

inkdex tag add 'app/auth.py:11' reviewed=2026-10    # also a name, a file or a directory
inkdex tag query 'reviewed'
inkdex annotate import other-tool.sarif              # results of another tool attached to symbols
inkdex annotate diff v3.0.0 HEAD                     # new, fixed, persisting, moved
inkdex annotate dismiss <id>
inkdex sec flows --hide-dismissed

Keeping it current and small

inkdex watch                     # keeps the working-tree snapshot up to date while you work
inkdex hooks install             # post-commit indexes, pre-push shows what changed
inkdex hotspots --window 90d --top 20     # churn × complexity × sinks × callers
inkdex gc --keep 10 --keep-refs 'main,v*' --vacuum
inkdex doctor                    # checks the index and says what to fix

gc removes old snapshots and what only they used. It never removes tags, annotations or history.

On this page