Overview
Theoobo 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
Options
Index only sessions for this project (name, slug, or path)
Re-compute stats even for already indexed sessions
Run indexing in the background (returns immediately, notifies on completion)
Check the status of a background indexing job
Output as JSON for machine parsing
Examples
Index all sessions
Index a specific project
Force re-indexing
Run in background
Check background status
How Indexing Works
Token counting
Uses tiktoken-rs to accurately count tokens for each message in a session based on the model used
When to Run Index
After scanning new sessions
After scanning new sessions
Run
oobo index after oobo scan discovers new sessions to make them available in stats.After adding API keys
After adding API keys
Re-index with
--force after configuring API keys (via oobo auth) to fetch accurate token and cost data from provider APIs.After updating oobo
After updating oobo
Re-index with
--force after updating oobo to benefit from improved token counting or attribution logic.For large codebases
For large codebases
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
--forceis used - Memory: Processes sessions in batches to avoid memory issues
Related Commands
Scan
Discover projects and sessions
Stats
View analytics after indexing
