@better-ccusage/opencode
v1.8.0
Published
Deprecated: OpenCode support is now built into better-ccusage. This package forwards invocations to better-ccusage.
Readme
⚠️ Deprecated. OpenCode support is now built directly into better-ccusage as the opencode source. This package now exists only as a thin forwarder for backward compatibility and will not receive new features.
Migration
@better-ccusage/opencode has been merged into better-ccusage. Your OpenCode sessions (~/.local/share/opencode/opencode.db) are now read automatically alongside Claude, Droid, ZCode, and Codex data.
Before:
npx @better-ccusage/opencode@latest dailyAfter:
npx better-ccusage dailyThe better-ccusage CLI exposes every command the standalone opencode tool had (daily, monthly, weekly, session) plus blocks, statusline, --mode, --breakdown, config-file support, and combined cross-tool reports.
Backward compatibility
This package still works: every invocation is forwarded to better-ccusage with the original OPENCODE_DATA_DIR preserved. A one-line deprecation notice is printed to stderr (set OPENCODE_NO_DEPRECATION_NOTICE=1 to silence it in CI).
# Still works — forwarded transparently
npx @better-ccusage/opencode daily --jsonWhy the merge?
Maintaining a separate OpenCode CLI duplicated code that better-ccusage already offered (and did better). The upstream ccusage project had already consolidated OpenCode as a built-in source, and this merge aligns better-ccusage with that architecture.
This migration also fixes a latent bug: the old standalone opencode package read msg_*.json files that modern OpenCode no longer writes (it now uses a SQLite database, opencode.db). As a result the old package showed zero data for any recent OpenCode install. The new built-in source reads the SQLite database directly.
License
MIT © @cobra91
