Repository navigation
Releases
v0.5.2
This release makes failed readings visible to other tools and records Claude's response for accounts without a 5-hour limit.
- Every command now records failed fetches the same way. The
daemoncommand used to write its failures only to its log, and a successful fetch left an earlier command's failure on record. Now each failure is counted in~/.local/state/clanker-usage/backoff/PROVIDER/ACCOUNT.json, and the next successful fetch removes that file. A tool watching that directory sees every failure and every recovery, andstatuslinestops retrying during an outage the daemon found (62248a9). - Claude Code: Anthropic renamed Max 20x to Ultra, and verified Ultra accounts have no five-hour limit. Their usage response lists only the weekly limits, so their readings have no
5-hourwindow, and the plan still readsmax_20x. The response also addsextra_usage.credits_can_pay, a string such as"no".checknow accepts this shape instead of reporting a new one (3bebc4c).
Changes
- Record the daemon's failed fetches like every other command's (
62248a9) - Record Claude's response without a session limit and with credits_can_pay (
3bebc4c)
History
v0.5.1
This release keeps Muse Code's reading current when Meta's server leaves usage out of its response.
- Muse Code: Meta sends no usage while no 5-hour window is open, that is, until Muse is used again after a window resets. Muse 1.4.23 was checked through a whole window on 2026-11-17: usage was missing before the first use, present in every call while the window was open, and missing again after it reset. Once the last reading's window has reset, such a response now reads as the 5-hour window at 0% and the weekly limit at its last reading, or 0% after its own reset, with
details.sourceset tono open windowanddetails.carried_fromgiving when the carried values were measured. While the last known window is still open, missing usage is still a failed fetch (c67e339). - Muse Code: a gap can also be filled from Muse runs another tool recorded.
muse exec --jsonends with the usage as of its last model call, and aop keeps that output; add its location once withmuse-code-usage configure --run-glob '~/work/*/.aop/runs/*/events.jsonl'. A recorded reading never replaces a newer one (1d29cae).
Changes
- Fill Muse Code's usage gaps from runs that recorded it, without model calls (
1d29cae) - Read Muse Code's missing usage as no open window once the last window reset (
c67e339)
History
v0.5.0
This release adds a Python API for programs that read usage, such as a scheduler deciding whether to start an agent, and fixes readings for used-up windows.
clanker_usage.read(provider, account)returns an account's cached usage-v1 document, orNonewhen there is none;documents(provider)returns every cached account;account(provider, home)returns the account a Claude Code, Codex or agy credential home is signed into, from local files only, and raisesAccountUnknownwhen it cannot tell. The README's "What stays stable" section lists what keeps its meaning from 0.5.0 while the schema is usage-v1 (6773478).- Devin: a used-up window no longer disappears. Devin leaves out a remaining share of zero, so a full week showed only the daily window; it now reads 100% (
456572f). - Muse Code: a used-up window, which Muse reports as 101%, reads 100% with the reported value kept in
details.reported_used_percent, instead of being rejected (a2a94a7). - Antigravity and Gemini CLI: the plan includes the tier id, such as
Google AI Ultra (g1-ultra-lite-tier), since Google's $100 and $200 Ultra tiers share a name (6af69cb). Scripts that matched the plain plan name need the new form.
The two Muse commits that marked a missing usage field as expected were reverted within this release; a response without usage is a failed fetch, as before, now with a clearer message (b4c43ec).
Changes
- Read Muse Code at 100% when it reports a used-up window as 101 (
a2a94a7) - Tell Google's Ultra tiers apart by adding the tier id to the plan (
6af69cb) - Add a Python API: read cached documents and find a credential home's account (
6773478) - Read a used-up Devin window as 100% instead of dropping it (
456572f) - Record Devin's response with no free-model rate-limit hits and a used-up week (
7ca3498) - Report Muse Code as unavailable now that Meta no longer sends its usage (
54974f8) - Record Codex's response once a limit is reached (
3d3bf70) - Describe Muse's missing usage as a server gap, not a permanent change (
1675382) - Treat Muse's missing usage as a failed fetch again (
b4c43ec)
History
v0.4.4
Run as a systemd user service, devin-cli-usage daemon failed every request with "Usage request failed (HTTP 500)". A user service's PATH leaves out ~/.local/bin, where Devin installs itself, so the tool could not find the devin command, sent its version as unknown, and Devin's server rejected that. The same request from a shell succeeded. Every provider now also looks in ~/.local/bin, ~/bin, /usr/local/bin and /usr/bin for a harness's command, which also fixes token renewal for Gemini CLI and Antigravity under a service, and Devin sends a real version when its command is missing (7f14cf0).
Changes
- Find harness commands under a systemd user service, and never send Devin version unknown (
7f14cf0)
History
v0.4.3
This release adds Muse Code, Meta's coding agent, as muse-code-usage, and reports Devin's free-model rate limits.
muse-code-usageis new. It shows the Muse Code subscription's 5-hour window and weekly limit, read with the login Muse Code already holds. Muse reports usage only when it signs in and at the end of each model call, so the tool makes the sign-in's key request, which uses no quota and returns the key Muse already stored (35df20c,758fec4).devin-cli-usagereports the rate limit on Devin's free models, which Devin's status API does not: per model, the last hit, when it resets and whether it still applies, plus the last 50 hits, read from Devin's CLI logs.statusandstatuslineshow a limit that still applies, anddevin-cli-usage configure --log-glob GLOBadds the logs of other Devin homes (42cd088).
Changes
- Report Devin's free-model rate limits from its CLI logs (
42cd088) - Add Muse Code, from the key request Muse makes at sign-in (
35df20c) - Name the Muse Code provider muse-code and publish it as muse-code-usage (
758fec4)
History
v0.4.2
Recent agy releases store the account's email instead of its id token, so agy-usage named the account after its refresh token and started a new cache file each time the token rotated, leaving the old ones behind. Readers such as the all-accounts table then showed one Antigravity account several times. The account id now comes from the id token, else the email, so it stays the same across rotations. It changes once on upgrade; delete the older files in ~/.cache/clanker-usage/agy/ to drop the duplicates (e2768b2).
Changes
- Keep one Antigravity account id when agy's refresh token rotates (
e2768b2)
History
v0.4.1
This release keeps deepseek-harness-usage working with DeepSeek Harness 0.2, and explains why gemini-cli-usage finds no quota for most Gemini CLI users.
- DeepSeek Harness 0.2 rewrites its credential store into a new layout, which 0.4.0 rejected with "The value for version in ~/.dsh/.credentials.yaml is not a string". The balance now reads again with either layout. With Harness 0.2, the stored key also takes precedence over an exported
DEEPSEEK_API_KEY, as it does in Harness itself, and the custom-endpoint check also covers routes set in Harness's profile patches (ec830dd). - Google ended Login with Google in Gemini CLI for individual, Google AI Pro and Ultra accounts on 2026-06-18; only Gemini Code Assist Standard and Enterprise keep it. For any other login,
gemini-cli-usagenow says so and points toagy-usage, which reports that quota through Antigravity (3dbc189).
Changes
- Read DeepSeek Harness 0.2's credential store, precedence and profile routes (
ec830dd) - Say that Gemini CLI quota now needs Code Assist Standard or Enterprise (
3dbc189)
History
v0.4.0
clanker-usage is the first release of one codebase for nine coding-agent usage monitors. It shows the plan and quota of Claude Code, Codex, Antigravity, Gemini CLI, Cursor, Devin, DeepSeek, OpenCode Go and Z.ai accounts, with the same commands, the same JSON document and the same file layout for every provider. The eight existing packages, agy-usage, ccusage, codex-cli-usage, cursor-cli-usage, deepseek-harness-usage, devin-cli-usage, gemini-cli-usage and zcode-cli-usage, are now built from it at version 0.4.0, and opencode-cli-usage is new. Each keeps its name and command, but its options, JSON output and cache location change to the shared standard, so scripts and status lines that read the old output need updating, as described below.
What every package now does
- The same subcommands for every provider:
status(the default),json,statusline,refresh,daemonandcheck.clanker-usagewith no arguments shows every account in one table, andclanker-usage --jsonprints every account's document. jsonprints a usage-v1 document, the same for every provider:provider,account,plan,status(live,cached,staleorunavailable),error,retrieved_at,windows(each withname,seconds,scope,used_pctandresets_at),balancefor balance-billed accounts, anddetailsfor provider-only data. The README describes every field.- The cache is that same document, at
~/.cache/clanker-usage/PROVIDER/ACCOUNT.json, one file per account. Configuration is~/.config/clanker-usage/config.json. The old per-tool cache files are no longer written. --max-age SECONDSsets how old a cached document may be before a fresh fetch, defaulting to 0 forstatusandjsonand to 300 forstatusline. It replaces--refresh(use--max-age 0).daemon --interval SECONDSreplaces-i.- A fetch that fails shows the last document for the same account as
stale; with nothing cached the result isunavailableand the command exits with status 1. After a failure, status lines stop retrying for a minute, doubling up to 30 minutes, so an outage does not mean a request on every prompt. - A daemon skips a refresh another process made within its interval, so several daemons or status lines on one account do not multiply requests.
checkfetches each provider live and compares the response's structure with recorded response shapes, reportingok,new-shape,missing,errororexpected-unavailable, so a provider changing its API is noticed instead of silently breaking.- Requests never follow redirects, error messages never contain response bodies or credentials, and caches are private files replaced atomically.
- The
installsubcommands, which printed setup instructions, are gone; the README covers setup.
agy-usage (Antigravity)
- Windows are scoped to their model group, such as
Gemini weeklyandClaude and GPT 5-hour. - The cache no longer holds the summary of
history.jsonl, which included the most-typed prompts. clanker-analytics reports Antigravity's token use from its transcripts instead. - Removed:
--root, which only labelled the output,missing_groups(checkreports a disappeared window), and theAGY_ACCESS_TOKEN,ANTIGRAVITY_ACCESS_TOKEN,AGY_USAGE_FILE,ANTIGRAVITY_USAGE_FILE,AGY_CODE_ASSIST_BASE_URLandAGY_OAUTH_CLIENT_ID/_SECREToverrides.
ccusage (Claude Code)
daemon --deferis gone: config directories signed into the same account now share one cache, so their daemons stop duplicating requests on their own. Remove--deferfrom service files.- The per-account snapshots in
~/.claude/usage-limits/are replaced by the per-account caches, which likewise stay after logout. Documents carry no email. ccusage configure --config-dir DIRadds another config directory toclanker-usage's all-accounts table.- An account without a subscription is
unavailable, which replaces its old windows in the cache, as the old tombstone did. ccusage statuslinestill reads Claude Code's status JSON and now shows the directory, model and session cost before the quota.
codex-cli-usage (Codex)
~/.codex/usage-limits.jsonand itsschema_version2 fields are replaced by the usage-v1 document. Codex's own limits are the5-hourandweeklywindows; additional limits are windows scoped to their names.- When Codex's app-server does not answer, the direct fallback now honors
CODEX_HOME.refreshis new.
cursor-cli-usage (Cursor)
- The plan name, such as Pro, is now reported, and the reset is an ISO time rather than raw milliseconds.
- The token comes from the Cursor CLI's
~/.config/cursor/auth.jsonfirst, then from the IDE's database. - Removed:
CURSOR_USAGE_FILE,CURSOR_USAGE_STATE_DBandCURSOR_USAGE_AGENT.
deepseek-harness-usage (DeepSeek)
- A negative balance, which DeepSeek reports once usage outruns the balance, is now accepted; it failed before with "invalid total_balance". Balances are in the document's
balancefield. DEEPSEEK_HARNESS_USAGE_API_KEYis nowCLANKER_USAGE_DEEPSEEK_API_KEY, andDEEPSEEK_HARNESS_USAGE_FILEis removed. The cache moved from$DSH_HOME/usage-limits.jsonto the standard location, without its lock.
devin-cli-usage (Devin)
- The cache keeps only the plan and quota parts of Devin's response, without the account's name, email or model lists.
- Removed:
DEVIN_USAGE_FILEandDEVIN_USAGE_CREDENTIALS_FILE; credentials followXDG_DATA_HOME, as Devin does.
gemini-cli-usage (Gemini CLI)
- With a login other than Google, such as an API key, the document is
unavailableandcheckreportsexpected-unavailable, which does not fail it. - Token renewal finds Gemini CLI's OAuth client in the bundle that current releases ship.
- Removed:
--root(settings now come from the current directory, as in Gemini CLI),GEMINI_CLI_USAGE_FILE,GEMINI_OAUTH_CLIENT_ID/_SECRET, and the search of WSL distributions on Windows.
opencode-cli-usage (OpenCode Go)
- New. Reads the Go key OpenCode stores and reports the subscription's
5-hour,weeklyandmonthlylimits, which are dollar amounts. The source is the OpenCode Console's own Go status, which its documented API does not cover.
zcode-cli-usage (Z.ai)
- The env-file setting moved to the shared configuration file; run
zcode-cli-usage configure --env-file PATHonce again.ZCODE_USAGE_ENV_FILEis removed. used_pctis computed from the used and total credits, more exactly than the API's rounded percentage.- An account without a Coding Plan has a null
planand no windows, replacing"status": "no_plan".
History
First release of clanker-usage: https://github.com/wakamex/clanker-usage/commits/v0.4.0