
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@ccusage/opencode
Advanced tools
Analyze OpenCode (Claude Code fork) usage logs with the same reporting experience as
ccusage.
# Recommended - always include @latest
npx @ccusage/opencode@latest --help
bunx @ccusage/opencode@latest --help
# Alternative package runners
pnpm dlx @ccusage/opencode
pnpx @ccusage/opencode
# Using deno (with security flags)
deno run -E -R=$HOME/.local/share/opencode/ -S=homedir -N='raw.githubusercontent.com:443' npm:@ccusage/opencode@latest --help
Since npx @ccusage/opencode@latest is quite long to type repeatedly, we strongly recommend setting up a shell alias:
# bash/zsh: alias ccusage-opencode='bunx @ccusage/opencode@latest'
# fish: alias ccusage-opencode 'bunx @ccusage/opencode@latest'
# Then simply run:
ccusage-opencode daily
ccusage-opencode monthly --json
💡 The CLI looks for OpenCode usage data under
OPENCODE_DATA_DIR(defaults to~/.local/share/opencode).
# Daily usage grouped by date (default command)
npx @ccusage/opencode@latest daily
# Weekly usage grouped by ISO week
npx @ccusage/opencode@latest weekly
# Monthly usage grouped by month
npx @ccusage/opencode@latest monthly
# Session-level detailed report
npx @ccusage/opencode@latest session
# JSON output for scripting
npx @ccusage/opencode@latest daily --json
# Compact mode for screenshots/sharing
npx @ccusage/opencode@latest daily --compact
Useful environment variables:
OPENCODE_DATA_DIR – override the OpenCode data directory (defaults to ~/.local/share/opencode)LOG_LEVEL – control consola log verbosity (0 silent … 5 trace)--json--compact flag for narrow terminals, perfect for screenshotsOpenCode stores cost: 0 in message files, so this CLI calculates accurate costs from token usage data using the LiteLLM pricing database. All models supported by LiteLLM will have accurate pricing.
OpenCode stores usage data in:
~/.local/share/opencode/storage/message/{sessionID}/msg_{messageID}.json~/.local/share/opencode/storage/session/{projectHash}/{sessionID}.jsonEach message file contains token counts (input, output, cache.read, cache.write) and model information.
For detailed guides and examples, visit ccusage.com.
Check out ccusage: The Claude Code cost scorecard that went viral
MIT © @ryoppippi
FAQs
Usage analysis tool for OpenCode sessions
The npm package @ccusage/opencode receives a total of 695 weekly downloads. As such, @ccusage/opencode popularity was classified as not popular.
We found that @ccusage/opencode demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.