What's Changed
🐛 Bug Fix
- Fixed CLI invocation error when using
npx
orbunx
to run ccusage packages (#653)
Problem Solved
When executing packages via npx @ccusage/codex
or bunx ccusage
, the package managers were passing the binary name as the first argument to the CLI. This caused gunshi (our CLI framework) to interpret it as an unknown command, resulting in errors like:
Error: Command not found: ccusage-codex
Solution
Now properly filters out the binary name from argv when it matches the expected binary name:
ccusage
for the main ccusage packageccusage-codex
for the codex packageccusage-mcp
for the MCP server package
This fix ensures all packages work correctly when invoked through npx, bunx, pnpm dlx, and other package runners.
For more details about major features and breaking changes, see the v17.0.0 release notes.