Overview
The stats command provides comprehensive analytics:
Token usage - Input/output tokens per tool, model, and project
AI code attribution - Percentage of code written by AI vs human
Productivity metrics - Commits per day, lines per day, active days
Cost tracking - Estimated costs for API usage
Daily trends - 14-day session and token activity
oobo stats # Global stats
oobo stats --agent # JSON output
oobo stats --project myapp # Per-project
oobo stats --tool cursor # Per-tool
oobo stats --since 30d # Last 30 days
Command Syntax
Filter by project name, slug, or path.
Filter by tool: cursor, claude, gemini, windsurf, aider, copilot, zed, trae, codex, opencode.
Show stats since this date or duration. Examples: 7d, 30d, 2w, 3m, 2026-02-01.
Examples
Global stats
Launches an interactive TUI showing:
Total sessions and tokens
Per-tool breakdown
Top projects
Daily activity (last 14 days)
AI code percentage
Productivity summary
Per-project stats
oobo stats --project myapp
Time-filtered stats
oobo stats --since 30d # Last 30 days
oobo stats --since 2w # Last 2 weeks
oobo stats --since 3m # Last 3 months
oobo stats --since 2026-02-01 # Since a specific date
JSON output for agents
Global Stats
Per-Project
Per-Tool
Response
Output Fields
Summary Metrics
Field Type Description scopeobject Filter scope (project, tool) sessionsnumber Total session count input_tokensnumber Total input tokens output_tokensnumber Total output tokens total_tokensnumber Sum of input + output total_cost_usdnumber Estimated cost in USD total_duration_secsnumber Total session duration
API Usage
Remote API usage from tool providers (last 30 days):
Field Type Description input_tokensnumber Input tokens from API output_tokensnumber Output tokens from API cache_read_tokensnumber Prompt cache reads (Anthropic) cost_usdnumber Actual cost from API daysnumber Number of days covered
Field Type Description toolstring Tool name sessionsnumber Sessions for this tool input_tokensnumber Input tokens output_tokensnumber Output tokens cost_usdnumber Estimated cost
Per-Model Breakdown
Field Type Description modelstring Model identifier sessionsnumber Sessions using this model input_tokensnumber Input tokens output_tokensnumber Output tokens cost_usdnumber Estimated cost pct_of_totalnumber Percentage of total output tokens
AI Code Attribution
Field Type Description total_commitsnumber Total commits tracked total_linesnumber Total lines changed ai_linesnumber Lines written by AI human_linesnumber Lines written by human ai_percentagenumber Percentage of code written by AI (0-100)
Productivity Metrics
Field Type Description active_daysnumber Days with at least one commit total_commitsnumber Total commits lines_addednumber Total lines added lines_deletednumber Total lines deleted commits_per_daynumber Average commits per active day lines_per_daynumber Average lines per active day
Daily Stats
Field Type Description datestring Date (YYYY-MM-DD) sessionsnumber Sessions on this day input_tokensnumber Input tokens output_tokensnumber Output tokens cost_usdnumber Estimated cost
Data Sources
Token accuracy varies by tool:
Tool Token Source Cost Accuracy Claude Code Native telemetry Exact Codex CLI Native telemetry Exact OpenCode Native telemetry Exact Gemini CLI Native telemetry Estimated Aider Native telemetry Exact Zed Native telemetry Exact Cursor Estimated (tiktoken) Estimated Copilot Discovery only N/A Windsurf Discovery only N/A Trae Discovery only Partial
Native telemetry sources provide exact token counts from the tool’s own logs. Estimated sources use tiktoken for approximation.
Interactive TUI
The TUI (launched without --agent) shows:
Summary - Sessions, tokens, cost, duration
Per-Tool - Breakdown by AI tool
Top Projects - Top 10 projects by token usage
Daily Activity - Last 14 days of sessions and tokens
AI Code % - Percentage of code written by AI
Productivity - Commits/day, lines/day, active days
Per-Model - Breakdown by AI model
Use Cases
Track monthly token usage
oobo stats --agent | jq '.per_tool'
Find your most active project
oobo stats --agent | jq '.per_tool | sort_by(.sessions) | reverse | .[0]'
Calculate AI code percentage
oobo stats --agent | jq '.ai_code.ai_percentage'
Export stats for reporting
oobo stats --agent > stats.json
See cost per project
oobo stats --project myapp --agent | jq '.total_cost_usd'
Time Filters
The --since flag accepts:
Relative durations : 7d, 30d, 2w, 3m
d = days
w = weeks (7 days)
m = months (30 days)
Absolute dates : 2026-02-01, 2026-01-15
oobo stats --since 7d # Last 7 days
oobo stats --since 2w # Last 14 days
oobo stats --since 3m # Last 90 days
oobo stats --since 2026-02-01 # Since Feb 1, 2026
Plain Text Output
When stdout is not a terminal (e.g., piped or redirected), stats outputs plain text instead of the TUI:
Output:
oobo stats — all projects
Sessions: 42
Input tokens: 125k
Output tokens: 84k
Total tokens: 209k
Total time: 2h 0m
Cursor 25 sessions 75k in 50k out
Claude 17 sessions 50k in 34k out
Next Steps
Sessions Explore individual AI chat sessions
Anchors See AI code attribution per commit