Skip to content

CommandCode Tray Meter v1.2.0

Choose a tag to compare

@standardbus standardbus released this 17 Sep 12:02
· 5 commits to main since this release

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.