What's Changed

✨ New Features
- Full OpenAI Codex support via new
@ccusage/codex
package - Added 1M token context window pricing support for Sonnet
⚠️ Breaking Changes
npx ccusage mcp
➡️npx @ccusage/mcp
🚀 Performance
- 2/3 bundle size reduction
- Migrated from Zod to Valibot for improved performance
📝 Installation
# Codex Analysis
bunx @ccusage/codex@latest # ⚠️ Must include @latest with bunx
npx @ccusage/codex # npx/pnpx work without @latest
# MCP Server
npx @ccusage/mcp@latest --type http --port 8080 # for remote mcp
npx @ccusage/mcp@latest # for stdio
# The Original
bunx ccusage
npx ccusage
⚠️ Important for bunx users: When using bunx with
@ccusage/codex
, you MUST include the@latest
suffix (e.g.,bunx @ccusage/codex@latest
).Reason: Bun 1.2.x's bunx has a behavior where it prioritizes binaries matching the package name suffix when given a scoped package. For example, with
@ccusage/codex
, bunx looks for acodex
binary in PATH first. If you have an existingcodex
command installed, that will be executed instead of the intended package. Adding@latest
forces bunx to fetch and run the correct package. This issue does not affect npx or pnpx.
🚀 Features
- Monorepo(bun -> pnpm) - by @ryoppippi in #631 (4d8b2)
- Extract MCP server into dedicated package - by @ryoppippi in #632 (6a594)
- Codex - by @ryoppippi in #641 (fead5)
- ccusage: Migrate from Zod to Valibot for schema validation - by @ryoppippi in #633 (bdd88)
- codex: Add session command for Codex token usage analysis - by @ryoppippi in #645 (93646)
- docs: Add ESLint configuration for documentation linting - by @ryoppippi in #644 (37aec)
- internal: Add support for 1M context window pricing - by @ryoppippi in #651 (e8e46)
- mcp: Add package badges to README - by @ryoppippi in #637 (5795c)
🐞 Bug Fixes
- Update example ccusage config - by @ryoppippi (6a678)
- Bin for development - by @ryoppippi in #636 (40286)
- ccusage/statusline: Cache is negatable - by @ryoppippi (6c90e)
- internal: Fix context size bug by using max_input_tokens instead of max_tokens - by @ryoppippi in #650 (6e617)