Skip to content

CommandCode Tray Meter v1.1.0

Choose a tag to compare

@standardbus standardbus released this 16 Sep 07:44
· 8 commits to main since this release

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.