Skip to content

Releases

CommandCode Tray Meter v1.3.0

Choose a tag to compare

@standardbus standardbus released this 17 Sep 13:45

Adds a Settings window and account tabs, and removes the last external
dependency: the tray used to open config.json in Notepad, which fails on a
machine where that editor is missing or blocked.

Settings

Right-click the tray icon, then Settings…:

  • one row per account - a name and an API key, masked until you reveal it, with
    "+" to add another and "−" to remove one
  • the interface language, refresh interval, amber and red thresholds, which
    window the ring follows, monochrome and tooltip switches
  • an account kept through an environment variable shows an empty key box and
    keeps that variable unless you type a key

Saving writes config.json atomically (a temporary file replaced in place) and
preserves every key the window does not manage: endpoints, creditFiles, the
$comment notes, anything you added. No external editor is involved, and the
file stays plain JSON if you prefer editing it by hand.

Account tabs

With two or more accounts the bubble grows a tab strip: one tab per account,
clicking one switches the monitored account. The choice is remembered both in
.cache and as activeProfile in config.json, so the account you picked is the
one that opens next time. The tray menu's Account submenu does the same.

With a single account there are no tabs and the bubble is unchanged.

Robustness

A configuration whose numbers are out of range used to be able to surface a
WinForms unhandled-exception dialog ("'0' is not a valid value for 'Value'")
while the settings window was being built. Every configured number now passes
through one clamp before it reaches a control, the window's construction and
every one of its handlers are guarded, and a failure is reported inside the
window (or in the tray log) in the active language instead of escaping into the
message loop. Both implementations carry a regression test that was checked
against the reintroduced bug.

Downloads

File Platform Size SHA-256
CommandCodeMonitor.exe Windows 10/11 175.104 bytes 6708EB94EA44AA0A57F3AD4A521046769539F13FC854CDF119B8D2233AD5B5FF
commandcode-meter-linux.tar.gz Linux 41.319 bytes 6DED6E319D758FF9DDF48AF3F0D58F6368C6CE1A84D5D3B05C81340617D39A15
commandcode-meter-macos.tar.gz macOS 41.319 bytes 6DED6E319D758FF9DDF48AF3F0D58F6368C6CE1A84D5D3B05C81340617D39A15

The two archives hold the same bytes: the terminal meter is plain Node with no
platform-specific code and no dependencies, so one build serves both systems.

Verification

sha256sum commandcode-meter-linux.tar.gz
Get-FileHash .\CommandCodeMonitor.exe -Algorithm SHA256

The single-account bubble is byte-identical to the previous release: the tabs and
the window are additive. The Node suite (130 tests), the Pester suite and the
executable self-test all pass, and the settings write is covered by a round-trip
that checks the accounts changed, unknown keys survived and no key was replaced
by a mask.

CommandCode Tray Meter v1.2.0

Choose a tag to compare

@standardbus standardbus released this 17 Sep 12:02

Adds several accounts and three interface languages to every surface: the
Windows tray, the executable and the terminal meter for Linux and macOS.

Accounts

Monitoring more than one Command Code account means listing them under
profiles, each with its own key:

{
  "profiles": [
    { "id": "personal", "name": "Personal", "apiKey": "user_..." },
    { "id": "work", "name": "Work", "apiKeyEnv": "COMMANDCODE_API_KEY_WORK" }
  ],
  "activeProfile": "personal"
}
  • the tray icon follows the active account, and the new Account submenu
    switches it at runtime (remembered in .cache, never written into config.json)
  • the bubble shows every account: the active one in full, then one row per other
    account, with the panel growing to fit
  • ccmeter prints a block per account, --profile work narrows it to one and
    --list-profiles prints the ids
  • a named account uses only its own key: an ambient COMMANDCODE_API_KEY
    does not stand in for it, because silently monitoring the wrong account is
    worse than an error that names it
  • one account failing never hides the others
  • a configuration without profiles behaves exactly as before: one account

Languages

English, Italian and Chinese, in lang/en.json, lang/it.json and
lang/zh.json - identical key sets, placeholder-checked across all three, with
dates, numbers and token suffixes following the language (8,45 and Mld in
Italian, 8.45 and B in English) and a CJK-capable font for Chinese.

{ "language": "it" }

en, it, zh, or auto to follow the operating system. ccmeter --language zh overrides it for one run, as does CommandCodeMonitor.exe --language zh. The
executable compiles the tables in, so it stays a single self-contained file; the
tray and the terminal meter load them at runtime from lang/.

Downloads

File Platform Size SHA-256
CommandCodeMonitor.exe Windows 10/11 126.464 bytes EE5A4B8A6D251357A836C3D7FEEB97F1846221B32881B97A38AB46830D038066
commandcode-meter-linux.tar.gz Linux 39.663 bytes D9C5FFA54AF653275C81BDE0CE03932210DC837B5A6BE87021B6DFDFD190806B
commandcode-meter-macos.tar.gz macOS 39.663 bytes D9C5FFA54AF653275C81BDE0CE03932210DC837B5A6BE87021B6DFDFD190806B

The executable is larger than in v1.1.x (78 KB -> 124 KB) because it now carries
all three language tables inside it instead of English strings only; it still
needs nothing beside it but config.json.

The two archives hold the same bytes: the terminal meter is plain Node with no
platform-specific code and no dependencies, so one build serves both systems.

Verification

sha256sum commandcode-meter-linux.tar.gz
Get-FileHash .\CommandCodeMonitor.exe -Algorithm SHA256

The Node suite covers the language tables (identical key sets, matching
placeholders, no Italian left in the English table) and the account rules
(per-account keys, ambient keys never standing in, one failure not hiding the
others): 126 tests. The tray suite is 46 Pester tests, the executable self-test
passes 13 checks in each language, and the Linux archive was extracted and run in
all three languages before publishing.

CommandCode Tray Meter v1.1.1

Choose a tag to compare

@standardbus standardbus released this 16 Sep 07:48

Corrects the address of the API-key page.

Command Code manages API keys at https://commandcode.ai/settings/keys. The
tray menu entry and the "no credentials" message - in both the executable and the
terminal meter - still pointed at the old /studio/provider address. Nothing
else changed.

Downloads

File Platform Size SHA-256
CommandCodeMonitor.exe Windows 10/11 79.872 bytes ED7C2190667EF679FE371F33CFC9A77680D5EDF044C4961B9EBFAD3CA188E353
commandcode-meter-linux.tar.gz Linux 24.339 bytes 843A0EF295FAF72539CAC7572A404BC25CAAAB9D842176B3A4BBE66A2BBA6FA1
commandcode-meter-macos.tar.gz macOS 24.339 bytes 843A0EF295FAF72539CAC7572A404BC25CAAAB9D842176B3A4BBE66A2BBA6FA1

The two archives hold the same bytes: the terminal meter is plain Node with no
platform-specific code and no dependencies, so one build serves both systems.

What was corrected

Where Before After
Tray menu, "Command Code settings" /studio/provider /settings/keys
Tray bubble, no credentials commandcode.ai/studio/provider commandcode.ai/settings/keys
ccmeter, no credentials commandcode.ai/studio/provider commandcode.ai/settings/keys
config.example.json comment /studio/provider /settings/keys

Verification

sha256sum commandcode-meter-linux.tar.gz
Get-FileHash .\CommandCodeMonitor.exe -Algorithm SHA256

The self-test passes 13 checks and the suite passes 93 Node tests; the Linux
archive was extracted and run on Ubuntu 24.04 before publishing.

CommandCode Tray Meter v1.1.0

Choose a tag to compare

@standardbus standardbus released this 16 Sep 07:44

Adds a terminal meter for Linux and macOS: the same readings as the Windows
tray, on servers, in tmux, or in a status bar.

Downloads

File Platform Size SHA-256
CommandCodeMonitor.exe Windows 10/11 79.872 bytes 123E0059D2985D5114F636986DFDB58B2F9538529C496F0F1EEB06EBDA3036BE
commandcode-meter-linux.tar.gz Linux 24.359 bytes 6F6E1CE4D8B31521BB33E17CCF50A26E4AF74DD70464AD8979612FE284C86D5B
commandcode-meter-macos.tar.gz macOS 24.359 bytes 6F6E1CE4D8B31521BB33E17CCF50A26E4AF74DD70464AD8979612FE284C86D5B

The two archives hold the same bytes: the terminal meter is plain Node with no
platform-specific code and no dependencies, so one build serves both systems.
They are shipped separately only so the right file is obvious at download time.

Linux and macOS

Needs Node.js 18 or newer and nothing else: no build step, no daemon.

tar -xzf commandcode-meter-linux.tar.gz    # or -macos
cd commandcode-meter
cp config.example.json config.json
$EDITOR config.json                        # paste your Provider-API key
./bin/ccmeter
Command Code - individual-goat

  5 hours  18%  [####................]  2.57 / 14      reset in 2h 21m (12:01)
  Weekly   56%  [###########.........]  19.45 / 35     reset in 1d 13h (tomorrow 23:38)
  Monthly  28%  [######..............]  19.39 / 69.95  reset in 24d 13h (10 Oct 23:25)

  Tokens   1.14 B
  Runs     5977
  Credits  19.39 of 69.95 USD  (50.55 left)
  Updated  09:39:52

The meter draws real blocks in a terminal; the sketch above is the same layout
in plain characters.

Useful options:

./bin/ccmeter --watch 30      # keep refreshing every 30 seconds
./bin/ccmeter --compact       # one line, for a tmux status bar
./bin/ccmeter --json          # the raw payload, for scripting
./bin/ccmeter --auth-only     # which credential source was found, no network call

--compact prints a single line:

CC 5h 18% - 7d 56% - 30d 28% - 1.14 B - 5977

Colours follow the same thresholds as the tray and appear only on a terminal;
NO_COLOR=1, --no-color and --ascii are honoured. Exit codes: 0 for data
or a non-fatal provider error, 2 when authentication is needed, 3 when the
command could not run.

Windows

Unchanged: CommandCodeMonitor.exe and config.json in one folder, no runtime
to install. The self-test passes 13 checks.

Verification

sha256sum commandcode-meter-linux.tar.gz
Get-FileHash .\CommandCodeMonitor.exe -Algorithm SHA256

The Linux path is covered by the project's own suite (93 Node tests, 20 of them
for the terminal layout) and was exercised on Ubuntu 24.04 against both the local
fixture server and the live API. The tray icon remains Windows-only by design.

CommandCode Tray Meter v1.0.0

Choose a tag to compare

@standardbus standardbus released this 16 Sep 06:18

First release of the tray meter for Command Code usage limits.

What to download

CommandCodeMonitor.exe - 78 KB, a single file. Windows 10/11 only: the C#
compiler of .NET Framework 4.8 is already part of the system, so there is no
runtime to install, no companion script and nothing to unpack.

Three-step start

  1. put CommandCodeMonitor.exe and config.json in the same folder (config.json
    is copied from config.example.json)
  2. paste your Provider-API key into apiKey - create it at https://commandcode.ai/settings/keys
  3. run the executable: the icon appears in the notification area, next to the clock

Start-at-login is enabled from the Start with Windows entry in the icon menu
(it writes to HKCU\...\CurrentVersion\Run, no privileges required).

Useful commands

.\CommandCodeMonitor.exe --selftest          # 13 offline checks, exit 0 when everything passes
.\CommandCodeMonitor.exe --render out.png    # draw the bubble into a PNG
.\CommandCodeMonitor.exe --demo              # open the bubble by itself, then exit
.\CommandCodeMonitor.exe --help

Download verification

Size 79.872 bytes (78 KB)
SHA-256 4BD88B9864700912A347810BE11583799392E2EA9B550C488C6C45FA91AFE396
Get-FileHash .\CommandCodeMonitor.exe -Algorithm SHA256

What it includes

  • notification-area icon with the ring on the selected window (5 hours, weekly or monthly) and the dot on the weekly window
  • a bubble that opens in under 150 ms and hydrates while it is on screen: rolling windows first, USD credits after
  • closing with the x, with a click outside, or with Esc (global WH_MOUSE_LL hook, removed on close)
  • configurable colour thresholds: green below 60%, amber from 60%, red from 85%
  • a single instance (named mutex), no service installed, no registry changes beyond the optional autostart

The executable is compiled from the sources in this repository with
scripts/build-exe.ps1; the same logic also exists as a Node/PowerShell
implementation under src/. Self-test passed: 13 ok, 0 failed.