Skip to main content

Overview

The oobo index command computes token counts and analytics for sessions discovered by oobo scan. It uses tiktoken for accurate token counting and builds the analytics database used by oobo stats and oobo card.

Usage

oobo index [OPTIONS]

Options

--project
string
Index only sessions for this project (name, slug, or path)
--force
boolean
Re-compute stats even for already indexed sessions
--bg
boolean
Run indexing in the background (returns immediately, notifies on completion)
--status
boolean
Check the status of a background indexing job
--agent
boolean
Output as JSON for machine parsing

Examples

Index all sessions

oobo index
This computes token counts for all sessions that haven’t been indexed yet.

Index a specific project

oobo index --project myapp

Force re-indexing

oobo index --force
Re-computes stats even for already indexed sessions. Useful after updating oobo or if you suspect stale data.

Run in background

oobo index --bg
Returns immediately and runs indexing in the background. You’ll get a system notification when it completes.

Check background status

oobo index --status
Shows progress of a running background indexing job.

How Indexing Works

1

Token counting

Uses tiktoken-rs to accurately count tokens for each message in a session based on the model used
2

Code attribution

Analyzes which files were touched by AI vs human for code attribution metrics
3

Cost calculation

Computes estimated costs based on model pricing (if API keys are configured)
4

Analytics aggregation

Builds aggregate stats by project, tool, model, and time period

When to Run Index

Run oobo index after oobo scan discovers new sessions to make them available in stats.
Re-index with --force after configuring API keys (via oobo auth) to fetch accurate token and cost data from provider APIs.
Re-index with --force after updating oobo to benefit from improved token counting or attribution logic.
Use --bg for large projects with thousands of sessions to avoid blocking your terminal.

Performance

  • Speed: ~1000 sessions/second on typical hardware
  • Background mode: No terminal blocking, system notification on completion
  • Incremental: Only indexes new/changed sessions unless --force is used
  • Memory: Processes sessions in batches to avoid memory issues
Run oobo index after oobo scan to ensure your stats and analytics are up to date.

Scan

Discover projects and sessions

Stats

View analytics after indexing

Build docs developers (and LLMs) love