Skip to content

About

Shows Command Code subscription usage in Orca: one status bar item with your tightest limit, and a panel with the 5-hour window, the weekly window and your monthly credit balance s

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Command Code Usage

Shows Command Code subscription usage inside Orca: one status bar item, and a panel that puts every quota in one place. It is for anyone on a Command Code plan who wants to see how much of a limit is left without running /usage in the CLI.

What you see

One status bar item. It reports your tightest quota — the higher of the 5-hour and weekly percentages — plus the time until that one resets:

Cmd 27% 1h 55m

The icon is a gauge and the colour follows the reading: neutral below 75%, warning at 75% and above, danger at 90% and above. Hovering shows both windows, the credit balance and the reset time. Clicking the item refreshes. Plans that report no window limits fall back to the credit balance (Cmd $69.93).

One panel tab, all quotas together. Open Command Code Usage in Orca's right sidebar and the three quotas sit side by side:

Row Shows
5-hour window percent used, used of cap in credits, progress meter, and time to reset
Weekly window the same shape for the weekly limit
Monthly credits the balance left, split into monthly / purchased / free when more than one applies

A Refresh button re-reads immediately, and "Last read" keeps a live "2m ago" stamp.

Orca has no anchored pop-up API, so a status bar click cannot open a floating window; the panel tab is the one place to see everything at once, and the status item's tooltip carries the summary.

Where the numbers come from

The worker reads the API key that commandcode login already stored in ~/.commandcode/auth.json and calls the same billing endpoints the CLI's /usage screen uses:

  • GET /alpha/billing/credits — the 5-hour and weekly windows, and the credit balances
  • GET /alpha/billing/subscriptions — the plan name, status and renewal date

It re-reads every 2 minutes and ticks the reset countdown every 30 seconds from the cached reading. A failed read keeps the last good values, so a transient network error does not blank the bar; the first-ever failure shows an error state with the reason in the tooltip.

There is no daily quota: Command Code reports a 5-hour window, a weekly window, monthly credits and monthly cloud minutes. This plugin shows the first three.

Privacy

The plugin talks only to https://api.commandcode.ai, using the key already on your machine. It sends nothing anywhere else, collects no analytics, and does not log the key. The key is read from disk on each refresh and never written.

Configuration

No setup is needed beyond commandcode login. For unusual installs, these environment variables are honoured:

Variable Purpose
COMMAND_CODE_API_KEY Use this key instead of the auth file
COMMAND_CODE_AUTH_FILE Read the key from this path
COMMAND_CODE_API_BASE Point at a different API host

Requirements

A Command Code plan and a signed-in CLI. Without the auth file the status item shows Cmd — and the tooltip explains the problem.

Develop

orca plugin validate . --json
orca plugin test . --json
orca plugin check . --json
orca plugin install . --json   # first run prints the approval fingerprint

orca plugin check renders the panel against a stand-in host with realistic data and reports what it drew, so it is the quickest way to see a change. It also type-checks the panel by transpiling it.

Orca names the publisher after where the plugin is installed from: the GitHub or GitLab owner of its repository, or local for a folder.

About

Shows Command Code subscription usage in Orca: one status bar item with your tightest limit, and a panel with the 5-hour window, the weekly window and your monthly credit balance s

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages