
Security News
Packagist Urges Immediate Composer Update After GitHub Actions Token Leak
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.
@ccusage/opencode
Advanced tools
Analyze OpenCode 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 1,072 weekly downloads. As such, @ccusage/opencode popularity was classified as 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
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.

Research
GemStuffer abuses RubyGems as an exfiltration channel, packaging scraped UK council portal data into junk gems published from new accounts.

Company News
Socket was named to the Rising in Cyber 2026 list, recognizing 30 private cybersecurity startups selected by CISOs and security executives.