A lightweight OpenChamber extension that displays Command Code usage directly inside OpenChamber.
- Plan and account status
- Monthly usage, total allowance, percentage, remaining allowance, and period end
- 5-hour and weekly usage windows with percentages and reset times
- Billing-period requests, cost, input/output tokens, and success rate
- Manual refresh, one refresh when the panel opens, and refreshes every five minutes while it remains open
- OpenChamber with Extension support
- Command Code CLI
cmduse
npm i -g command-code@latest
cmd login
brew install JeffreyJYZ/tap/cmduseVerify the CLI installation:
cmduse -1 --jsonThe repository includes the generated files required by OpenChamber. Git URL
installation does not run npm install or build TypeScript for the extension,
so panel/main.js and service/main.js are committed.
- Open OpenChamber.
- Go to Settings → Extensions.
- Paste
https://github.com/dai1012/openchamber-commandcode-usage. - Click Add.
- Approve the local service permission.
OpenChamber panel
↓
extension local service
↓
cmduse -1 --json
The panel calls the extension's local service through the OpenChamber host.
The service discovers and runs the local cmduse executable, then returns its
parsed JSON response to the panel.
- The extension does not read
~/.commandcode/auth.json. - The extension does not store a Command Code API key.
- Usage data comes only from the local
cmduse -1 --jsoncommand. - The local service listens only on localhost (
127.0.0.1). - The extension does not upload usage data to third-party servers.
- Child-process stdout/stderr is not returned when execution or JSON parsing fails.
Verified:
- macOS Apple Silicon
- OpenChamber 1.24.x
Other platforms may work when cmduse is available on PATH or configured
through CMDUSE_PATH, but they are not claimed as verified here.
The repository includes TypeScript sources, tests, and the generated files required by OpenChamber:
npm install
npm test
npm run buildpanel/main.js is a browser IIFE. service/main.js is the Node service
entrypoint required by the OpenChamber local-service contract.
