Skip to content

Releases: giovi321/clawdmeter-daemon

v1.1.0 - the meter stops eating the quota it reports

Choose a tag to compare

@giovi321 giovi321 released this 08 Sep 23:09
f4cf5c6

Two community pull requests. The headline: polling no longer spends an inference request, so the meter stops consuming the quota it reports.

Polling was billing you

poll_api() sent a max_tokens: 1 POST to /v1/messages and read the anthropic-ratelimit-* response headers. That POST is a real inference request, so every poll counted against the 5-hour window it was measuring. At --interval 30 it is plainly visible: roughly 18% of a Pro 5-hour window burned over four idle hours with nothing running but the daemon.

The poller now reads GET https://api.anthropic.com/api/oauth/usage, a plain status query that spends nothing. Polling no longer moves the numbers, and short intervals are safe.

Thanks to @Piya-Boy in #8.

The device no longer sits blank after a failed first poll

Every transport waits for a successful poll before it sends anything, so a failed poll leaves the device on its logo. The common case is login: autostart beats the network up, the first call dies on DNS, and with --interval 300 the next attempt is five minutes away.

Failed polls now retry at 5s, 10s, 20s, 40s, capped at 60s and never above --interval, and reset to the normal interval on the first success. A missing or invalid token still waits out the full interval, since that one needs you to run claude setup-token.

Thanks to @eakarin in #7.

Breaking: st changed vocabulary

The payload keys are unchanged (s / sr / w / wr / st / ok), but st now carries the session limit severity from the usage endpoint (normal, warning, rejected) instead of the rate-limit header status (allowed, allowed_warning, rejected).

Firmware that branches on the exact string needs updating:

  • smalltv-mod: use 2.13.1 or newer. Older builds read normal as a warning and light the accent dot permanently.
  • clawdmeter-win: unaffected, it stores st without branching on it.

Full details in CHANGELOG.md.

v1.0.2 - compact tray header

Choose a tag to compare

@giovi321 giovi321 released this 12 Jul 15:45
ebc3bff

Small tray UX fix.

What changed

When pushing to several devices, the tray menu header listed every full push URL inline, stretching the popover very wide (and the header ran lines together). Now:

  • The menu header is a compact one-liner: push -> 192.168.10.44 (+3 more).
  • The full target list is on the icon's hover tooltip, with hosts trimmed to IP/hostname and capped at six plus (+N more).

Full details in CHANGELOG.md.

v1.0.1 - Windows tray fix

Choose a tag to compare

@giovi321 giovi321 released this 12 Jul 15:23
a2c8f1e

Patch release fixing the Windows tray silently starting headless (no icon).

What was wrong

start-daemon.bat could launch the daemon under a Python that lacked pystray/Pillow — the py/pyw launcher does not always resolve the same interpreter the deps were installed into (the Microsoft Store Python installs to a sandboxed location another launch can't import). The daemon then fell back to headless with no tray icon. The log showed pystray/Pillow not installed - running headless.

Fix

The Windows launchers now pin a self-contained .venv (same as install.sh on macOS/Linux):

  • install.bat creates .venv, installs deps into it, and registers autostart to use it
  • start-daemon.bat launches the .venv interpreter (CLAWDMETER_PYTHONW still overrides)
  • uninstall.bat removes the autostart entry directly, without needing Python

Upgrading

Re-run install.bat to create the .venv and re-register autostart, then start-daemon.bat. If the icon still seems missing, check the Windows 11 overflow area and drag it onto the taskbar.

Full details in CHANGELOG.md.

v1.0.0 - cross-platform

Choose a tag to compare

@giovi321 giovi321 released this 12 Jul 14:39
9ade92b

First cross-platform release. clawdmeter-daemon now runs with full feature parity on Windows, macOS and Linux, including a tray / menu-bar icon and login autostart on each. Still a single file you copy and run.

Install

pip install -r requirements.txt          # or: install.bat (Windows) / ./install.sh (macOS/Linux)
python clawdmeter_daemon.py --install    # start at login (per-user, this OS)

What's new

  • Login autostart on every OS via --install / --uninstall / --autostart-status: per-user, no admin, using each OS's native mechanism (Windows HKCU\...\Run, macOS LaunchAgent, Linux XDG .desktop). Registers the interpreter you install with, never a hardcoded path.
  • Cross-platform tray: Linux detects a display + AppIndicator/Xlib and falls back to headless with a clear message instead of crashing; macOS shows a menu-bar accessory (no Dock icon).
  • File logging to ~/.clawdmeter-daemon.log, so a windowless or headless launch is no longer silent when something breaks.
  • POSIX scripts install.sh / start-daemon.sh / uninstall.sh. install.sh builds a self-contained --system-site-packages venv, sidestepping the PEP 668 "externally managed environment" block while keeping the Linux GTK/AppIndicator bindings visible.
  • Windows launchers hardened: no more hardcoded C:\Python314\pythonw.exe or Store pythonw stub; start-daemon.bat uses the windowless pyw launcher, and install.bat / uninstall.bat use one interpreter for deps + autostart and report failure instead of claiming success.

Notes

  • Linux tray needs system packages (install.sh prints the command for your distro); GNOME on Wayland also needs the AppIndicator extension. Without a backend the daemon runs headless.
  • macOS tray needs pyobjc-framework-Cocoa (installed automatically via a requirements marker).

Full details in CHANGELOG.md.