Hi,
The existing "kimi" command doesn't pick up usage from Kimi Code CLI (the Moonshot agent CLI). I looked into why and found two mismatches:
- Data directory: ccusage looks in "
/.kimi", but Kimi Code CLI stores its sessions under "/.kimi-code".
- Wire format: ccusage expects a "StatusUpdate" message with snake_case "token_usage" fields, but Kimi Code CLI writes "usage.record" events with camelCase fields ("inputOther", "inputCacheRead", etc.) and millisecond timestamps.
The path layout is also deeper:
- Old: "~/.kimi/sessions/group/session/wire.jsonl"
- Kimi Code CLI: "~/.kimi-code/sessions/{workspace}/{session}/agents/{agent}/wire.jsonl"
I have a branch ready that fixes this and I have tested it against my own "~/.kimi-code" data. Happy to open a PR if you're interested.
Thanks for the great tool!
Hi,
The existing "kimi" command doesn't pick up usage from Kimi Code CLI (the Moonshot agent CLI). I looked into why and found two mismatches:
/.kimi", but Kimi Code CLI stores its sessions under "/.kimi-code".The path layout is also deeper:
I have a branch ready that fixes this and I have tested it against my own "~/.kimi-code" data. Happy to open a PR if you're interested.
Thanks for the great tool!