opcd-streak
v0.1.0
Published
GitHub-style terminal activity chart for your local OpenCode usage data
Maintainers
Readme
opcd-streak
A Bun terminal contribution chart for the usage data recorded in OpenCode's SQLite database. It renders a GitHub-style calendar with one square per day, colored by daily token activity.
Install
npm install --global opcd-streak
opcd-streakopcd-streak requires Bun and reads the database at ~/.local/share/opencode/opencode.db by default.
With Bun's package manager:
bun add --global opcd-streakRun without installing:
bunx opcd-streakUsage
opcd-streak --weeks 26
opcd-streak --db /path/to/opencode.db
opcd-streak --json
opcd-streak --no-colorFor local development from this checkout:
export PATH="$HOME/.bun/bin:$PATH"
bun link
opcd-streakMetrics
| Display | Source | | --- | --- | | Daily square | Assistant-message token totals for one local calendar day | | Color intensity | Relative token usage across days with activity | | Visible token total | Sum of token activity in the displayed week range | | Current streak | Consecutive calendar days with assistant activity ending today | | Longest streak | Longest consecutive run of calendar days with assistant activity |
Use --json to access the extended totals, including task, peak-token, duration, cost, and token-category values.
The CLI opens the database read-only and does not modify OpenCode state.
