{"slug": "show-hn-see-how-much-of-your-claude-codex-or-copilot-subscription-is-left", "title": "Show HN: See how much of your Claude, Codex, or Copilot subscription is left", "summary": "A local TypeScript CLI called ASU, published to npm as @allixsenos/asu and now at version 0.7.0, lets users check remaining usage on their Claude, Codex, and GitHub Copilot coding-agent subscriptions directly from each provider's account API. ASU requires Node.js 22.13 or newer and runs via npx with flags including --table, --plain, --json, --fresh, and --all, and a maintainer-run snapshot captured on 2026-09-10 at 07:08 UTC showed Claude Max 20x usage at 18% of the 5-hour window and 24% of the weekly window. The tool fetches providers concurrently so a failed provider does not hide results from the others, and it caches usage for five minutes unless --fresh is passed.", "body_md": "See how much of your coding-agent subscription you used, straight from the provider's account API.\n\nASU is a local TypeScript CLI for humans and agents. It finds supported installations and credentials, fetches usage from each provider concurrently, and prints bars, a table, plain text, or versioned JSON. Each provider has its own adapter. A failed provider does not hide the results of the other providers.\n\n```\nnpx --yes @allixsenos/asu@latest\n```\n\nThis is a real run against the maintainer's accounts on 2026-09-10. Bars are green below 70 percent, yellow from 70, and red from 90. Reset times are relative to the moment of the run, with the local clock after the dot. Pass `--table` for the table view, `--utc` for full timestamps, `--plain` for log-friendly text, or `--json` for agents and scripts. The same view as plain text is in the [snapshot section](#bars) below.\n\nASU needs **Node.js 22.13 or newer** and npm. Sign in through the provider's own CLI first.\n\n```\nnpx --yes @allixsenos/asu@latest\n```\n\nThis runs the newest release of [`@allixsenos/asu`](https://www.npmjs.com/package/@allixsenos/asu) from npm. No token is needed. Your provider credentials, which are separate, let ASU read usage.\n\n```\n# Plain text for terminals, logs, and pipes\nnpx --yes @allixsenos/asu@latest --plain\n\n# Structured output for agents and scripts\nnpx --yes @allixsenos/asu@latest --json\n\n# One provider, by its bare name\nnpx --yes @allixsenos/asu@latest claude\n\n# Select accounts and bypass the five-minute usage cache\nnpx --yes @allixsenos/asu@latest claude codex copilot --fresh --table\n\n# Include every built-in provider, even if no credentials are found\nnpx --yes @allixsenos/asu@latest --all --table\n```\n\nTo pin a version, name it, for example `@allixsenos/asu@0.3.0`. The `--fresh` flag refreshes provider usage. It does not select a newer package revision.\n\n```\nnpx --yes github:allixsenos/asu --table\n```\n\nThis needs Git. The repository commits the built `dist/` directory, so the install needs no build step. For SSH, use `git+ssh://git@github.com/allixsenos/asu.git#main`. To pin a commit or a tag, append it, for example `github:allixsenos/asu#v0.3.0`. Each GitHub release also carries the packed tarball, and `npx --yes https://github.com/allixsenos/asu/releases/latest/download/asu.tgz --table` runs the newest one.\n\nWe fetched the snapshot below on **2026-09-10 at 07:08 UTC** from the maintainer's authenticated Claude, Codex, and GitHub Copilot accounts on Linux. These are real provider-reported figures, not fixtures or estimates. They become stale as usage changes.\n\nThe capture used the local checkout:\n\n```\nnode dist/cli.js --provider claude,codex,copilot --fresh --no-cache --json\n```\n\nASU's own renderers made the bars, the table, and the plain text below from that same JSON snapshot with `--utc`, so all four examples show identical data. The examples include no credentials and no account identifiers. All reset times are UTC.\n\nWithout `--utc`, the table and the plain text show reset, fetch, and expiry times relative to now, for example `2h30m` or `45m`. A time a day or more away also names the local calendar day, for example `7d (Tue 15 Sep)`. A reset time that already passed shows as `now`. JSON always contains the full UTC timestamps.\n\nUse `--bars` for this view. It is the default in an interactive terminal. One bar per window, colored by severity in a terminal, with the countdown and the local clock after each bar. The bar shrinks in a narrow terminal, then the clock goes, and below that the default falls back to plain text.\n\n```\nASU 0.7.0 · 2026-09-10T07:08:14.046Z\n\nClaude · Max 20x · active · fresh\n  5 hours         ━━━━━─────────────────────────   18%  resets 2026-09-10T09:30:00.000Z\n  Weekly          ━━━━━━━───────────────────────   24%  resets 2026-09-15T05:00:00.000Z\n  Weekly · Fable  ━━━━━─────────────────────────   18%  resets 2026-09-15T05:00:00.000Z\n  Extra usage     Disabled\n  fetched 2026-09-10T07:08:13.944Z · cache expires 2026-09-10T07:13:13.944Z\n\nCodex · Plus · active · fresh\n  5 hours               ──────────────────────────────    0%  resets 2026-09-10T12:08:13.000Z\n  Weekly                ──────────────────────────────    0%  resets 2026-09-17T07:08:13.000Z\n  Gpt Reserve · Weekly  ──────────────────────────────    0%  resets 2026-09-17T07:08:13.000Z\n  Credits               0 credits left\n  Credits available     No\n  fetched 2026-09-10T07:08:14.004Z · cache expires 2026-09-10T07:13:14.004Z\n\nGitHub Copilot · Individual · active · fresh\n  Chat                  ──────────────────────────────    0%  resets 2026-10-01T00:00:00.000Z  0 / 200 requests\n  Completions           ──────────────────────────────    0%  resets 2026-10-01T00:00:00.000Z  0 / 2,000 requests\n  Premium Interactions  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  100%  resets 2026-10-01T00:00:00.000Z  0 / 0 requests\n  fetched 2026-09-10T07:08:14.045Z · cache expires 2026-09-10T07:13:14.045Z\n```\n\nUse `--table` for this view. When a cell would wrap, the default falls back to plain text. Pass `--table` to force the table.\n\n```\nASU 0.7.0 · 2026-09-10T07:08:14.046Z\n┌──────────────────┬────────────────────┬───────────────────────┬───────────────────────┬────────────────────┐\n│ Provider         │ Plan / status      │ Window / balance      │ Usage                 │ Resets (UTC)       │\n├──────────────────┼────────────────────┼───────────────────────┼───────────────────────┼────────────────────┤\n│ Claude           │ Max 20x            │ 5 hours               │ 18% used              │ 2026-09-10 09:30   │\n│                  │ active             │                       │                       │                    │\n│                  │ fresh              │                       │                       │                    │\n│                  │                    │ Weekly                │ 24% used              │ 2026-09-15 05:00   │\n│                  │                    │ Weekly · Fable        │ 18% used              │ 2026-09-15 05:00   │\n│                  │                    │ Extra usage           │ Disabled              │ —                  │\n├──────────────────┼────────────────────┼───────────────────────┼───────────────────────┼────────────────────┤\n│ Codex            │ Plus               │ 5 hours               │ 0% used               │ 2026-09-10 12:08   │\n│                  │ active             │                       │                       │                    │\n│                  │ fresh              │                       │                       │                    │\n│                  │                    │ Weekly                │ 0% used               │ 2026-09-17 07:08   │\n│                  │                    │ Gpt Reserve · Weekly  │ 0% used               │ 2026-09-17 07:08   │\n│                  │                    │ Credits               │ 0 credits left        │ —                  │\n│                  │                    │ Credits available     │ No                    │ —                  │\n├──────────────────┼────────────────────┼───────────────────────┼───────────────────────┼────────────────────┤\n│ GitHub Copilot   │ Individual         │ Chat                  │ 0% used               │ 2026-10-01 00:00   │\n│                  │ active             │                       │ 0 / 200 requests      │                    │\n│                  │ fresh              │                       │                       │                    │\n│                  │                    │ Completions           │ 0% used               │ 2026-10-01 00:00   │\n│                  │                    │                       │ 0 / 2,000 requests    │                    │\n│                  │                    │ Premium Interactions  │ 100% used             │ 2026-10-01 00:00   │\n│                  │                    │                       │ 0 / 0 requests        │                    │\n└──────────────────┴────────────────────┴───────────────────────┴───────────────────────┴────────────────────┘\nClaude: fetched 2026-09-10T07:08:13.944Z; cache expires 2026-09-10T07:13:13.944Z.\nCodex: fetched 2026-09-10T07:08:14.004Z; cache expires 2026-09-10T07:13:14.004Z.\nGitHub Copilot: fetched 2026-09-10T07:08:14.045Z; cache expires 2026-09-10T07:13:14.045Z.\n```\n\nRead Copilot's premium row with care. The endpoint returned zero entitlement, zero remaining requests, and zero percent remaining. ASU therefore shows `100% used` next to `0 / 0 requests`. This does **not** show that anyone consumed a premium request. The internal endpoint can return legacy quota information. Treat its quantities as the provider's reported snapshot, not as a complete billing statement.\n\nUse `--plain` for readable output in logs and pipes. It is the default when stdout is not a terminal.\n\n## Show the complete plain-text output\n\n```\nASU 0.7.0 · 2026-09-10T07:08:14.046Z\n\nClaude (claude)\n  active\n  Plan: Max 20x\n  5 hours: 18% used; resets 2026-09-10T09:30:00.000Z\n  Weekly: 24% used; resets 2026-09-15T05:00:00.000Z\n  Weekly · Fable: 18% used; resets 2026-09-15T05:00:00.000Z\n  Extra usage: Disabled\n  Fetched 2026-09-10T07:08:13.944Z; fresh; expires 2026-09-10T07:13:13.944Z\n\nCodex (codex)\n  active\n  Plan: Plus\n  5 hours: 0% used; resets 2026-09-10T12:08:13.000Z\n  Weekly: 0% used; resets 2026-09-17T07:08:13.000Z\n  Gpt Reserve · Weekly: 0% used; resets 2026-09-17T07:08:13.000Z\n  Credits: 0 credits left\n  Credits available: No\n  Fetched 2026-09-10T07:08:14.004Z; fresh; expires 2026-09-10T07:13:14.004Z\n\nGitHub Copilot (copilot)\n  active\n  Plan: Individual\n  Chat: 0% used; 0 / 200 requests; resets 2026-10-01T00:00:00.000Z\n  Completions: 0% used; 0 / 2,000 requests; resets 2026-10-01T00:00:00.000Z\n  Premium Interactions: 100% used; 0 / 0 requests; resets 2026-10-01T00:00:00.000Z\n  Fetched 2026-09-10T07:08:14.045Z; fresh; expires 2026-09-10T07:13:14.045Z\n```\n\nUse `--json` for agents and scripts. Stdout contains the report. An ASU invocation error goes to stderr. The human output rounds quantities to two decimal places and shows relative times. JSON keeps the normalized numeric precision and the full UTC timestamps.\n\n## Show the complete version 1 JSON report\n\n```\n{\n  \"schemaVersion\": 1,\n  \"asuVersion\": \"0.7.0\",\n  \"generatedAt\": \"2026-09-10T07:08:14.046Z\",\n  \"warnings\": [],\n  \"providers\": [\n    {\n      \"planLabel\": \"Max 20x\",\n      \"windows\": [\n        {\n          \"id\": \"five_hour\",\n          \"label\": \"5 hours\",\n          \"percentUsed\": 18,\n          \"resetsAt\": \"2026-09-10T09:30:00.000Z\"\n        },\n        {\n          \"id\": \"seven_day\",\n          \"label\": \"Weekly\",\n          \"percentUsed\": 24,\n          \"resetsAt\": \"2026-09-15T05:00:00.000Z\"\n        },\n        {\n          \"id\": \"weekly-model-fable\",\n          \"label\": \"Weekly · Fable\",\n          \"percentUsed\": 18,\n          \"resetsAt\": \"2026-09-15T05:00:00.000Z\",\n          \"scope\": {\n            \"model\": \"Fable\"\n          }\n        }\n      ],\n      \"balances\": [],\n      \"details\": [\n        {\n          \"label\": \"Extra usage\",\n          \"value\": \"Disabled\"\n        }\n      ],\n      \"providerId\": \"claude\",\n      \"displayName\": \"Claude\",\n      \"experimental\": false,\n      \"installed\": true,\n      \"credentialsPresent\": true,\n      \"authenticated\": true,\n      \"availability\": \"available\",\n      \"reason\": null,\n      \"fetchedAt\": \"2026-09-10T07:08:13.944Z\",\n      \"expiresAt\": \"2026-09-10T07:13:13.944Z\",\n      \"cached\": false\n    },\n    {\n      \"planLabel\": \"Plus\",\n      \"windows\": [\n        {\n          \"id\": \"usage-primary_window\",\n          \"label\": \"5 hours\",\n          \"percentUsed\": 0,\n          \"resetsAt\": \"2026-09-10T12:08:13.000Z\"\n        },\n        {\n          \"id\": \"usage-secondary_window\",\n          \"label\": \"Weekly\",\n          \"percentUsed\": 0,\n          \"resetsAt\": \"2026-09-17T07:08:13.000Z\"\n        },\n        {\n          \"id\": \"additional-0-gpt-reserve-primary_window\",\n          \"label\": \"Gpt Reserve · Weekly\",\n          \"percentUsed\": 0,\n          \"resetsAt\": \"2026-09-17T07:08:13.000Z\"\n        }\n      ],\n      \"balances\": [\n        {\n          \"id\": \"credits\",\n          \"label\": \"Credits\",\n          \"unit\": \"credits\",\n          \"remaining\": 0,\n          \"unlimited\": false\n        }\n      ],\n      \"details\": [\n        {\n          \"label\": \"Credits available\",\n          \"value\": \"No\"\n        }\n      ],\n      \"providerId\": \"codex\",\n      \"displayName\": \"Codex\",\n      \"experimental\": false,\n      \"installed\": true,\n      \"credentialsPresent\": true,\n      \"authenticated\": true,\n      \"availability\": \"available\",\n      \"reason\": null,\n      \"fetchedAt\": \"2026-09-10T07:08:14.004Z\",\n      \"expiresAt\": \"2026-09-10T07:13:14.004Z\",\n      \"cached\": false\n    },\n    {\n      \"planLabel\": \"Individual\",\n      \"windows\": [\n        {\n          \"id\": \"chat\",\n          \"label\": \"Chat\",\n          \"percentUsed\": 0,\n          \"resetsAt\": \"2026-10-01T00:00:00.000Z\",\n          \"used\": 0,\n          \"limit\": 200,\n          \"unit\": \"requests\",\n          \"unlimited\": false\n        },\n        {\n          \"id\": \"completions\",\n          \"label\": \"Completions\",\n          \"percentUsed\": 0,\n          \"resetsAt\": \"2026-10-01T00:00:00.000Z\",\n          \"used\": 0,\n          \"limit\": 2000,\n          \"unit\": \"requests\",\n          \"unlimited\": false\n        },\n        {\n          \"id\": \"premium-interactions\",\n          \"label\": \"Premium Interactions\",\n          \"percentUsed\": 100,\n          \"resetsAt\": \"2026-10-01T00:00:00.000Z\",\n          \"used\": 0,\n          \"limit\": 0,\n          \"unit\": \"requests\",\n          \"unlimited\": false\n        }\n      ],\n      \"balances\": [],\n      \"details\": [],\n      \"providerId\": \"copilot\",\n      \"displayName\": \"GitHub Copilot\",\n      \"experimental\": false,\n      \"installed\": true,\n      \"credentialsPresent\": true,\n      \"authenticated\": true,\n      \"availability\": \"available\",\n      \"reason\": null,\n      \"fetchedAt\": \"2026-09-10T07:08:14.045Z\",\n      \"expiresAt\": \"2026-09-10T07:13:14.045Z\",\n      \"cached\": false\n    }\n  ]\n}\nasu [usage] [provider...] [options]\n```\n\nWhen you run ASU through `npx`, put the ASU options after the package name.\n\n| Option | Behavior | \n|---|---|\n| `--format plain\\|table\\|bars\\|json` | Select one output format. Without it, a terminal gets the bars, or plain text when even the narrowest bar layout would wrap. A pipe gets plain text. | \n| `--bars` ,`--table` ,`--plain` ,`--json` | Shortcuts for `--format` . Use only one. | \n| `--utc` | Print full UTC timestamps in table and plain output instead of times relative to now, such as `2h30m` or`7d (Tue 15 Sep)` | \n| `claude codex` | Select providers by their bare names, in any position. `asu claude --plain` and`asu --plain claude` are the same. | \n| `--provider claude,codex` | The same selection as a flag. Repeat the flag or separate the IDs with commas. | \n| `--all` | Include providers with no detected installation or credentials | \n| `--fresh` | Bypass cached usage. Concurrent fresh requests still share one fetch. | \n| `--no-cache` | Do not read or write the persistent cache | \n| `--cache-dir PATH` | Set the usage cache directory | \n| `--plugin PATH_OR_PACKAGE` | Load a trusted provider plugin that you name explicitly. Repeatable. | \n| `--help` ,`-h` | Show help | \n| `--version` ,`-v` | Print the package version | \n\nWithout `--all` or `--provider`, ASU omits a provider that has no detected installation, no credentials, and no discovery error. Credentials can work even when the provider's executable is not on `PATH`. The table and the plain text show one status per provider: `active` when usage came back, `not logged in` when credentials are missing or rejected, `not installed` when neither credentials nor the provider's executable were found, and `error` when the request failed. JSON keeps `installed`, `credentialsPresent`, and `authenticated` as separate fields, where `null` means unknown.\n\n| Code | Meaning | \n|---|---|\n| `0` | At least one selected provider returned available usage | \n| `1` | No selected provider returned available usage. ASU still prints a report. | \n| `2` | Invalid invocation or plugin configuration. ASU prints an error to stderr. | \n\nA zero exit code does not mean that every provider succeeded. When you automate ASU, examine the `availability` of each provider. Missing credentials, a timeout, or a malformed response from one provider does not discard the data of the other providers.\n\n```\nnpx --yes @allixsenos/asu@latest --json > usage.json\njq '.providers[] | {providerId, availability, planLabel, windows}' usage.json\n\n# Find available providers with a window at or above 80% used\njq '[.providers[]\n  | select(.availability == \"available\")\n  | select(any(.windows[]; .percentUsed != null and .percentUsed >= 80))\n  | .providerId]' usage.json\n```\n\nA consumer must examine `schemaVersion` before it processes a report. Version 1 includes:\n\n| Field | Meaning | \n|---|---|\n| `asuVersion` | The ASU package version that wrote the report. The plain and table headers show it too. | \n| `generatedAt` ,`warnings` ,`providers` | Report timestamp, shared warnings, and independent provider results | \n| `providerId` ,`displayName` ,`experimental` | Provider identity and live-validation status | \n| `installed` ,`credentialsPresent` ,`authenticated` | Separate discovery and authentication observations | \n| `availability` ,`reason` | `available` ,`unavailable` , or`error` , with a reason code and a safe message when needed | \n| `planLabel` | Subscription label, or `null` if unknown | \n| `windows` | Variable-length usage windows with IDs, percentages, UTC resets, optional quantities, and model or surface scope | \n| `balances` | Reported credits or monetary balances with explicit units | \n| `details` | Additional normalized label and value pairs | \n| `fetchedAt` ,`expiresAt` ,`cached` | Timestamp and freshness of each provider snapshot | \n\nAn unknown percentage or reset time is `null`. A missing quantity or balance does not mean zero. An unlimited allowance is explicit. A percentage can exceed 100 if a provider reports overage. Do not assume a fixed number or order of windows. See the [report contract](/allixsenos/asu/blob/main/docs/architecture.md#report-contract) and the [schemas](/allixsenos/asu/blob/main/src/models.ts) for the full model. An agent that wants to watch its own budget can follow [Use ASU from an agent](/allixsenos/asu/blob/main/docs/agent-usage.md). The [asu-usage skill](/allixsenos/asu/blob/main/skills/asu-usage/SKILL.md) measures what one command costs, and `npx skills add allixsenos/asu` installs it.\n\n| ID | Provider | Credential sources, in precedence order | Validation | \n|---|---|---|---|\n| `claude` | Claude | `.credentials.json` under`$CLAUDE_CONFIG_DIR` ,`$CLAUDE_HOME` , or`~/.claude` . macOS Keychain fallback. | Live account, Linux | \n| `codex` | Codex | `$CODEX_HOME/auth.json` ,`~/.config/codex/auth.json` ,`~/.codex/auth.json` | Live account, Linux | \n| `copilot` | GitHub Copilot | `COPILOT_TOKEN` ,`GITHUB_TOKEN` ,`GITHUB_PAT` , GitHub CLI`hosts.yml` | Live account, Linux | \n| `cursor` | Cursor | `CURSOR_ACCESS_TOKEN` ,`CURSOR_TOKEN` , desktop SQLite,`~/.config/cursor/auth.json` | Experimental. Fixture tests only. | \n| `zai` | Z.ai | `ZAI_API_KEY` ,`GLM_API_KEY` | Experimental. Fixture tests only. | \n| `grok` | Grok | `GROK_API_KEY` ,`GROK_TOKEN` ,`~/.grok/auth.json` | Experimental. Fixture tests only. | \n| `kimi` | Kimi | `KIMI_TOKEN` ,`KIMI_API_KEY` , credentials under`$KIMI_CODE_HOME` or`~/.kimi-code` , legacy`~/.kimi` | Experimental. Fixture tests only. | \n| `minimax` | MiniMax | `MINIMAX_API_KEY` ,`~/.mmx/credentials.json` ,`~/.mmx/config.json` | Experimental. Fixture tests only. | \n\nOnly Claude Max 20x, Codex Plus, and GitHub Copilot Individual passed a check against the maintainer's live accounts. The other five adapters always return `experimental: true`, and the human output marks them. A passed fixture test does not prove a live subscription or every credential-store variant. The macOS and Windows paths have no live test.\n\nCredential lookup details:\n\n- Claude reads `claudeAiOauth.accessToken` . On macOS it falls back to the Keychain service`Claude Code-credentials` . It tries the current user's account before the legacy service-only lookup.\n- Codex needs the OAuth `tokens.access_token` , with an optional`tokens.account_id` . This adapter does not support API-key authentication or credentials that live only in the OS keyring.\n- Copilot obeys `GH_CONFIG_DIR` and`XDG_CONFIG_HOME` when it reads the GitHub CLI credentials. It does not read credentials that live only in the Copilot CLI's own store. An installed`gh` alone does not count as an installed Copilot CLI.\n- Cursor reads its desktop `state.vscdb` in read-only mode. It uses the platform locations, including macOS Application Support and Windows`APPDATA` . The Linux lookup obeys`XDG_CONFIG_HOME` .\n- Kimi's credential file is `credentials/kimi-code.json` under its configured or default home.\n- MiniMax supports `MINIMAX_REGION=cn` or a recognized`MINIMAX_BASE_URL` . ASU rejects an arbitrary API destination.\n\nThe APIs include undocumented internal endpoints and can change. The request methods, schemas, primary sources, and limitations of each adapter are in [provider contracts](/allixsenos/asu/blob/main/docs/provider-contracts.md).\n\n```\nCLI options → provider registry → concurrent provider operations\n                                      │\n                          read local credentials (read-only)\n                                      │\n                       five-minute cache or provider usage API\n                                      │\n                         normalize, validate, and redact\n                                      │\n                            table / plain text / JSON\n```\n\nEach provider lives in its own file under [`src/providers/`](/allixsenos/asu/blob/main/src/providers). The shared service handles deadlines, failure isolation, caching, and report validation. The renderers accept any number of windows or balances. All work happens in the local Node process. There is no dashboard, HTTP server, hosted backend, or telemetry.\n\nASU caches a result for **five minutes**, separately for each provider and credential identity. It selects the cache directory in this order:\n\n1. `--cache-dir PATH`\n2. `$ASU_CACHE_DIR`\n3. `$XDG_CACHE_HOME/asu`\n4. `~/.cache/asu`\n\nASU reads the credentials on each invocation. A changed credential changes the cache key. Concurrent calls in one process share one fetch. Concurrent CLI invocations use file locks. ASU also caches an API failure. It examines missing, malformed, and locally expired credentials again on each invocation, without an API request.\n\nUse `--fresh` to bypass an existing result after you solve a problem. Use `--no-cache` when ASU must not read or write the persistent cache. The report still includes the five-minute `expiresAt` of the snapshot when disk caching is off. ASU replaces an expired entry at the next lookup. It does not remove the old entries of unused accounts.\n\nAn HTTP request has an eight-second deadline, a one-MiB response limit, and no redirects. Each provider operation has a twelve-second deadline. A wait for the cache lock stops after about 32 seconds. When the cache fails, ASU fetches without persistence and adds a warning.\n\nASU reads existing credentials and sends them only to the provider endpoint of the adapter. It never refreshes a token, signs in, rewrites a provider file, runs the provider CLI to get usage, or estimates subscription consumption from conversation history. Missing or rejected credentials give an unavailable result. Sign in or refresh through the provider's own CLI.\n\nOnce a day, after the report, ASU asks the npm registry for its own newest version and prints one line on stderr when a newer one exists. The request carries only the package name, and the answer is kept in the cache directory. `--no-cache`, `ASU_NO_UPDATE_CHECK=1`, `NO_UPDATE_NOTIFIER=1`, or `CI=true` turns the check off. This is the only request ASU makes to anything other than a provider.\n\nASU prints and caches only normalized usage. It excludes tokens, refresh tokens, account IDs, and raw API errors. The cache uses private directory and file permissions on Unix, and SHA-256 filenames derived from the credential identity. A usage report still contains plan and account-usage information. The maintainer shared the examples above on purpose.\n\n| Symptom | What to examine | \n|---|---|\n| GitHub says the repository is missing or access is denied | Examine your Git access with `git ls-remote https://github.com/allixsenos/asu.git HEAD` . The SSH URL needs a GitHub SSH key. | \n| The Git install fails during `prepare` | Examine the Node version, the dependency-registry access, and whether npm permits build scripts. See the local checkout instructions below. | \n| `npx` exits with code 1 and prints nothing, or npm 9 reports`could not determine executable to run` | npm 9 cannot run the nested install that a Git dependency with a `build` or`prepare` script needs through`npx` . ASU commits`dist/` and has neither script, so a current checkout does not hit this. Clear the npx cache with`rm -rf ~/.npm/_npx` and retry, or use the release tarball URL. | \n| No supported agents or credentials detected | Use `--all` , examine the credential sources above, and examine the home-directory overrides and`PATH` . | \n| `missing_credentials` ,`invalid_credentials` , or`unauthorized` | Sign in or refresh through the provider's CLI, then run ASU again with `--fresh` . A successful CLI login helps only if ASU supports its credential store. | \n| `credential_read_error` | Make sure that your current user can read the credential file or store. | \n| `timeout` ,`rate_limited` , or`http_error` | Examine the connectivity and the provider status. Wait before you retry after a rate limit. Use `--fresh` to bypass a cached failure. | \n| `invalid_response` | The provider may have a new response schema. See the [known limitations](/allixsenos/asu/blob/main/docs/provider-contracts.md#known-limitations) . | \n| Usage looks stale | Examine `fetchedAt` and`cached` , then use`--fresh` . ASU cannot make the provider update its figures sooner. | \n| One provider fails but the command exits with zero | Exit code `0` means that at least one provider succeeded. Examine the`availability` of each provider. | \n| `npx --yes @allixsenos/asu` runs an old version | npx reuses the first version it cached for a bare name and never looks again. Use `@allixsenos/asu@latest` , which resolves on every run, or remove the cache with`rm -rf ~/.npm/_npx` . ASU prints a one-line notice on stderr once a day when a newer version exists. | \n\nA provider is an ESM module with a unique ID, a version, and three operations: detect the installation, resolve the credentials, and fetch normalized usage. An adapter owns its credential format and its API contract. The shared service and the renderers stay provider-independent.\n\n```\nnpx --yes @allixsenos/asu@latest --plugin ./my-provider.mjs --provider my-provider --json\n```\n\nA plugin can export `default` or `provider`. ASU resolves an installed package name from the current working directory. A plugin is local code that you load explicitly, and it has full access to the process. Load only modules that you trust. ASU does not download plugins and does not search for them. See the [plugin contract and example](/allixsenos/asu/blob/main/docs/architecture.md#external-plugin-example) for the details. The package also exports its service, schemas, and TypeScript types as a library.\n\n```\ngh repo clone allixsenos/asu\ncd asu\nnpm ci\n\n# dist/ is committed. Rebuild after you edit TypeScript and commit the result.\nnpm run compile\nnode dist/cli.js --table\nnode dist/cli.js --provider claude,codex,copilot --fresh --json\n\n# Required checks for behavior changes\nnpm run check\nnpm test\n```\n\nThe tests use synthetic API responses and temporary credential stores. They cover normalization, credential precedence and expiration, malformed responses, failure isolation, timeouts, cache expiry, concurrent requests, account changes, redaction, and real CLI subprocess output. They do not use your accounts and do not call provider APIs. Live verification is a separate step, as the snapshot above documents.\n\nGitHub Actions runs the type checks, the tests, and a packed-package smoke test on Node 22 and 24. It also fails when the committed `dist/` differs from a fresh build. To try the packed artifact locally without a publication:\n\n```\nnpx --yes --package \"./$(npm pack --silent)\" asu --help\nnpx --yes --package \"./$(npm pack --silent)\" asu --table\n```\n\nEnable the commit-message hook of the repository and prefer rebase on pull:\n\n```\ngit config core.hooksPath .githooks\ngit config pull.rebase true\n```\n\nConventional Commits are mandatory. Prefer small, scoped commits and squash merges. Rebase merges are permitted, and merge commits are off. [`CLAUDE.md`](/allixsenos/asu/blob/main/CLAUDE.md) is a symlink to [` AGENTS.md`](/allixsenos/asu/blob/main/AGENTS.md), so Claude and other agents share the project instructions.\n\nrelease-please writes [`CHANGELOG.md`](/allixsenos/asu/blob/main/CHANGELOG.md) and creates each release from the commit history. [Releasing](/allixsenos/asu/blob/main/docs/releasing.md) describes the release pull request, the GitHub release with the packed tarball, and the npm publication.\n\nPublic repository under the [MIT license](/allixsenos/asu/blob/main/LICENSE). The release workflow publishes the package to the public npm registry. ASU has no telemetry and never will. See the [security policy](/allixsenos/asu/blob/main/SECURITY.md) for what that means and how to report a vulnerability.", "url": "https://wpnews.pro/news/show-hn-see-how-much-of-your-claude-codex-or-copilot-subscription-is-left", "canonical_source": "https://github.com/allixsenos/asu", "published_at": "2026-09-11 14:03:20+00:00", "updated_at": "2026-09-11 14:15:46.091840+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-agents"], "entities": ["ASU", "@allixsenos/asu", "Claude", "Codex", "GitHub Copilot", "Node.js", "npm", "TypeScript"], "alternates": {"html": "https://wpnews.pro/news/show-hn-see-how-much-of-your-claude-codex-or-copilot-subscription-is-left", "markdown": "https://wpnews.pro/news/show-hn-see-how-much-of-your-claude-codex-or-copilot-subscription-is-left.md", "text": "https://wpnews.pro/news/show-hn-see-how-much-of-your-claude-codex-or-copilot-subscription-is-left.txt", "jsonld": "https://wpnews.pro/news/show-hn-see-how-much-of-your-claude-codex-or-copilot-subscription-is-left.jsonld"}}