Skip to content

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 16:26
· 65 commits to main since this release
ab236ed

Devices are named user@device

The report names each device by the OS user its collector runs as, at the device's name: ann@mira-mbp, root@build-01, hermes@scout. A person and their laptop read as one consumer, and each user or bot on a shared server reads as one of its own. The name is everywhere a device shows: the header, ATTENTION, SUBSCRIPTIONS' busiest device, DEVICES in both views, the interactive view, ai-usage status, the first-run guide, every reason and note ("reinstalled as" included), and the menu bar app ("This Mac: ann@mira-mbp").

  • Devices on older releases are named the same way, since every release already sends its OS user.
  • The device part is the device's name as before: the host name, or one set with ai-usage name set or AI_USAGE_NAME. A name that already has an @ stays as it is, and a device whose user is not known goes by its name alone.
  • A Windows device is named by its user without the domain: ann@DESKTOP-7Q, not CORP\ann@DESKTOP-7Q.
  • ai-usage name says what the team sees, as Build bot (the team sees ci@Build bot), and ai-usage team lists devices the same way.
  • The status view of DEVICES, and the menu bar app's Team window on Status, have no USER column any more: the name says it.
  • A name too wide for its column is cut in its device part first, as kim@Mac.localdoma….

Why a subscription has no reading

When a Claude, Codex, or Grok subscription has no reading, the report says why. SUBSCRIPTIONS shows what to do, such as update codex, in place of its bar, and ATTENTION has the whole reason. It comes from a device the account is logged in to, this one first, then a teammate's, so the team view tells you what is wrong on someone else's machine:

 NO READING  codex leo@studio.dev    this codex cannot read its limits on leo@leo-air: update codex
  • Codex: too old to read its limits (update codex), a login it refused (run codex login), timed out, could not start (reinstall codex), or exited on its config (run codex app-server to see why).
  • Grok: a log with no credit usage yet, or no signed-in user (run grok and sign in).
  • Claude Code: /usage timed out, failed, or could not read the usage, as well as the update notes it had before.
  • On a machine with several folders for one tool, the reason names the folder, and only the account logged in there gets it.
  • ATTENTION lists it as NO READING while the subscription was used in the last 7 days, and the menu bar app shows it under "Not read".
  • A tool's note that is no failure, such as a Grok log with no credit usage yet, is dim in ai-usage status and in the app's device details, not red.

The reasons are in the report's own words: they leave out what the tool printed, such as an address, and are at most 200 bytes.

Drill down in the interactive view

Enter picks a row on the page: an ATTENTION line about one account or device, an account in SUBSCRIPTIONS, UTILIZATION, or USAGE, or a machine in DEVICES, a bot's container included. ↑ ↓ (j k, g G) move the pick, and Enter again, or a click on the picked row, opens its detail in the page's place. Esc or Backspace goes back to the page as it was, the row still picked, and Esc again stops picking. The period keys redraw a detail.

  • An account's detail has its ATTENTION lines; its plan, the reading and the device it came from, last use, and linked usage; each window with its bar, what is left, its reset, the forecast, the pace, and when it runs out at that pace; how full each window got before its last resets; every machine that spent it, in its current window and over each period, with its share; and this machine's projects on it.
  • A machine's detail has its ATTENTION lines; its release, last report, last good run, the tools it reads, and each error in full; every account it spent, with its share of each; its share of the team's tokens; and, for this machine, its projects.
  • The detail is built from the report alone, so it works on ai-usage report --from a saved report too.
  • The key bar shows ↵ pick on the page, ↑↓ pick · ↵ open · esc back while picking, and esc back in a detail. At 80 columns it leaves out r refresh to keep ↵ pick; r still works, and ? lists every key.

JSON: device names

A reader of ai-usage --json should know this:

  • New collector.name and team.devices[].name: what the report calls the device, as ann@mira-mbp. label and os_user keep the parts, unchanged.
  • Every string that names a device now says its name where it said its label or host (user): attention[].devices, subject, and text, an account's busiest, held_back_by, cycles_held_back_by, and devices, per_device[].device, quota.device, linked_usage[].devices, a matrix row's device, no_reading and the other reasons, replaced_by, and a duplicate entry's message. Match devices by their device id, as before; a script that matched a label against these strings needs the name now.
  • no_reading on a team account now also says why for Codex and Grok, and for a tool that failed. The Grok provider's error can say its log has no credit usage yet while its status is ok.
  • The schema version stays 4. ai-usage report --from fills name in for a report saved by an earlier release, whose other strings keep the names they were saved with. See docs/json-schema.md.

Compatibility and upgrade

What to do. Nothing, for a script install: releases from v0.2.5 on install v0.9.0 within 15 minutes, and on a Mac the menu bar app updates with the binary. A Homebrew install updates with brew upgrade neoromantic/tap/ai-usage or ai-usage update.

The team. The snapshot and the relay do not change. Teammates on older releases show with their new names and their no-reading reasons in your report, since both come from what every release already sends.

For the website

This release changes what the pictures show and the feature list:

  • Every picture in docs/demo names devices as user@device; take them all again, among them team.png, team-light.png, team-80.png, team-attention.png, team-matrix.png, team-bots.png, team-status.png, team-devices.png, devices-status.png, team-help.png, menubar.png, the app-* pictures, and the tour.
  • A new picture, team-detail.png: an account's detail in the interactive view. The tour opens it between % and p.
  • The feature list can say that the interactive view drills down into an account or a machine, and that a subscription without a reading says why, for Claude, Codex, and Grok, on every machine of the team.
  • The list of keys gains Enter to pick and open, ↑ ↓ to move the pick, and Esc to go back; at 80 columns the key bar shows ↵ pick instead of r refresh.
  • The status view and the app's Team window on Status have no USER column.

Known limitations

  • A teammate's device with several folders for one tool, and more than one account logged in to them, gives no reason for a folder's failure: only that device knows which account a folder holds.
  • The detail of another machine has no PROJECTS: the report holds only this machine's projects.
  • A report saved by an earlier release keeps its old names in ATTENTION and the reasons; only the devices' name is filled in.

What's Changed

  • Name each device in the report, the JSON, and the menu bar app by its OS user at its name, as ann@mira-mbp, so that a person's machine and each user or bot on a shared server read as the consumers they are. by @neoromantic in #34
  • The interactive view drills down: Enter picks an account, a device, or a bot on the page, and opens its detail, built from the report alone, with Esc back. by @neoromantic in #36
  • Say why a Codex, Grok, or Claude subscription has no reading, from a device it is logged in to, in place of its bar and in NO READING, so a teammate's device can be diagnosed from the team view. by @neoromantic in #37
  • Draw every demo picture again for v0.9.0, with devices named user@device, and add the detail of the bots' Codex login as a picture and a step of the tour. by @neoromantic in #38
  • Write the v0.9.0 release notes: devices are named user@device, a subscription without a reading says why, and the interactive view drills down into an account or a machine. by @neoromantic in #39

Full Changelog: v0.8.1...v0.9.0