Skip to main content

Overview

The anchors command shows enriched commit history with AI context. Each anchor extends a git commit with:
  • Linked AI sessions
  • Token counts
  • AI vs human code attribution
  • Model information
  • Contributors (humans + agents)
oobo anchors               # Show recent commits with AI context
oobo a -n 20               # Short alias, show last 20
oobo anchors --agent       # JSON output
anchors has a short alias: a

What is an Anchor?

An anchor is oobo’s core primitive — it extends a git commit with AI context:
Git:   commit = diff(files)
Oobo:  anchor = commit + sessions + tokens + attribution
Each anchor records:
  • Which AI sessions contributed
  • Token counts per session
  • Code attribution (AI vs human lines)
  • Model used
  • Session duration
  • Files changed
Anchors live in a local SQLite database and on a git orphan branch (oobo/anchors/v1) that travels with the repo.

Command Syntax

oobo anchors [OPTIONS]
-n, --limit
number
default:"10"
Number of commits to show.
--agent
boolean
default:"false"
Output as JSON.

Examples

Show recent anchors

oobo anchors
Output:
◆ abc12de fix auth middleware
  by: dev + cursor (claude-sonnet-4-20250514)
  +120 / -15  (2 files)  85% AI
  ai: +102/-12  human: +18/-3
  ⤷ abc12def (cursor, claude-sonnet-4-20250514) 12.5k+8.4k tokens

● def3456 update README
  author: dev <[email protected]>
  +8 / -2  (1 files)
indicates AI-assisted commits. indicates human-only commits.

Show more commits

oobo a -n 20

JSON output for agents

oobo anchors --agent
oobo anchors

Output Fields

Human Output

Each anchor shows:
  1. Indicator - ◆ (AI-assisted) or ● (human-only)
  2. Commit hash - First 7 characters (yellow)
  3. Message - Commit message
  4. Contributors - Humans + agents with models
  5. Diff stats - Lines added/deleted, files changed, AI percentage
  6. Attribution - AI vs human line counts
  7. Sessions - Linked sessions with tokens
  8. Summary - AI-generated summary (if available)

JSON Output

FieldTypeDescription
commit_hashstringFull commit SHA
messagestringCommit message
authorstringGit author
author_typestringhuman, assisted, or autonomous
contributorsarrayHumans and agents who contributed
branchstringBranch name
committed_atnumberUnix timestamp
files_changedarrayList of changed file paths
lines_addednumberTotal lines added
lines_deletednumberTotal lines deleted
file_changesarrayPer-file attribution
ai_lines_addednumberLines added by AI
ai_lines_deletednumberLines deleted by AI
human_lines_addednumberLines added by human
human_lines_deletednumberLines deleted by human
ai_percentagenumberPercentage of code written by AI (0-100)
sessionsarrayLinked AI sessions
summarystringAI-generated summary
intentstringCommit intent (fix, feat, refactor, etc.)

Contributor Object

FieldTypeDescription
namestringContributor name (human or tool name)
rolestringhuman or agent
modelstringAI model (for agents only)

Session Object

FieldTypeDescription
session_idstringFull session UUID
agentstringTool name (cursor, claude, etc.)
modelstringAI model used
link_typestringexplicit or correlation
input_tokensnumberInput tokens consumed
output_tokensnumberOutput tokens generated
files_touchedarrayFiles modified in session

Author Types

  • human - No AI involvement detected
  • assisted - Collaboration between human and AI
  • autonomous - Fully AI-generated (e.g., agent commit)

How Anchors Are Created

Anchors are recorded automatically when you commit through oobo:
oobo commit -m "fix auth middleware"
# 1. Execute: git commit
# 2. Detect write operation
# 3. Read AI sessions from local tool storage
# 4. Build anchor: commit + sessions + tokens + attribution
# 5. Write anchor to local DB + git orphan branch
Anchors are created after the commit succeeds, so they never interfere with your git workflow.

Syncing Anchors

Anchors sync automatically via the oobo/anchors/v1 orphan branch:
  • First commit - Creates orphan branch
  • Every push - Pushes anchors
  • Clone/pull - Import with oobo sync
oobo sync     # Import anchors from orphan branch

Use Cases

Review AI contributions

oobo anchors

Export commit history with AI context

oobo anchors --agent > history.json

Find commits by AI percentage

oobo anchors --agent | jq '.[] | select(.ai_percentage > 80)'

See which sessions contributed to a commit

oobo anchors --agent | jq '.[] | select(.commit_hash | startswith("abc12")) | .sessions'

Next Steps

Sessions

View the AI sessions linked to your commits

Stats

See code attribution and AI percentage across your project

Build docs developers (and LLMs) love