neuron-explorer
Qwen3.5‑4B 전용 조향형 뉴런 탐색기, 모든 MLP 뉴런을 밀어 결과를 보관·탐색
Native macOS menu-bar app for tracking AI plan limits, reset times, and pace across Codex, Claude, Grok, Cursor, Windsurf, and Copilot.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Reserve is a native macOS menu-bar app that shows reported subscription
capacity for OpenAI Codex, Anthropic Claude, Grok, Cursor, Copilot, Gemini
(Google AI Pro and Ultra, through the Antigravity CLI), the Z.ai GLM Coding Plan
and Kimi Code.
Optional insights show provider-reported account activity or activity from this Mac.
Copilot support is experimental and still needs an authenticated release check.README 전문 보기 ↗Reserve is a native macOS menu-bar app that shows reported subscription capacity for OpenAI Codex, Anthropic Claude, Grok, Cursor, Copilot, Gemini (Google AI Pro and Ultra, through the Antigravity CLI), the Z.ai GLM Coding Plan and Kimi Code. Optional insights show provider-reported account activity or activity from this Mac. Copilot support is experimental and still needs an authenticated release check.
Learn more at pocarles.com/reserve.
It is deliberately small: no Reserve account, browser automation, WebView, cookie extraction, telemetry, crash reporting, cloud service, or third-party status aggregator. Reserve uses Sparkle only for signed, user-approved macOS updates.
Reserve requires macOS 14 or newer and is distributed as a signed, notarized Universal 2 app for Apple silicon and Intel Macs.
Reserve.dmg.macOS verifies the signed, notarized app when it opens. The release also
includes an optional
Reserve.dmg.sha256
for people who want to verify the download manually.
This manual step is required for the first Sparkle-enabled release. After that, Reserve checks once a day by default and presents an Install Update button when a newer signed release is available. It never installs silently.
Release assets are produced only by the protected GitHub release workflow. A source build is ad-hoc signed and is intended only for the Mac that built it.
Open Settings > Providers and choose Connect beside a provider. Reserve first checks for an existing sign-in. If one works, the provider card simply fills in. A window appears only when Reserve needs a decision from you or has a problem to explain. If a helper needs installation or an update, Reserve explains the change and waits for your approval. Browser sign-in opens on the provider's website in your regular Chrome profile, with your existing sessions and saved passwords. If Chrome is not installed, Reserve uses your default browser. Choose Connect again to reopen that page. If the browser could not open, Reserve says so in a window where you can try again or cancel.
Claude and Cursor require explicit Allow usage access before Reserve reads their protected sign-in. macOS may also ask you to approve access. That window closes on its own once Reserve reads fresh usage, or explains why it could not. Cursor, Copilot, Gemini, Z.ai and Kimi start disabled. On first launch, the other providers start enabled only when their helper is already installed. Saved choices are preserved.
Choose Add Account… at the top of Settings > Providers (or Settings > API). The menu lists every provider Reserve supports, grouped as subscriptions, coding plans and API spend, and each entry says how it connects. If a provider's first card is not connected yet, the entry connects that one; otherwise it adds another account beside it, for example a team account next to a personal one, even when both use the same email address.
How the accounts are kept apart depends on the provider:
| Provider | Several accounts | How |
|---|---|---|
| Claude | Yes | Own folder under ~/.claude-accounts/, used as CLAUDE_CONFIG_DIR |
| OpenAI (Codex) | Yes | Own folder under ~/.codex-accounts/, used as CODEX_HOME |
| Grok | Yes | Own folder under ~/.grok-accounts/, used as GROK_HOME |
| Z.ai, Kimi | Yes | Own API key, saved in the Keychain under that account |
| Cursor, Copilot, Gemini | No | The helper keeps one sign-in per Mac |
| API spend (Claude API, OpenAI API, …) | Yes | Own key per account, saved in the Keychain under that account |
For a folder-based account, Reserve opens the usual browser sign-in with the folder set, so the first account is left untouched. If your browser is already signed in to the other account, switch accounts on the sign-in page. Added Claude accounts are named after the organization they find ("Claude · Nimbus"); every other added account starts as "Account 2". You can rename any of them in the card, and Hide personal info shows the neutral name.
An added account reads only its folder: no fallback to the default home, which
is refused as a folder since the first card already covers it. To attach an
account you already signed in from a terminal, change the card's folder to
that folder, spelled the same way; changing the folder starts the card over.
Remove account forgets the card and its settings but leaves the folder and
its sign-in on disk; for a key plan it also deletes the key Reserve saved. To
use an added account in your own terminal, run the helper with its variable
(CLAUDE_CONFIG_DIR, CODEX_HOME or GROK_HOME) pointing at its folder.
Activity from this Mac is not yet counted for added accounts. Claude's first
card always reads its ordinary home, even when Reserve is launched from a
terminal using another CLAUDE_CONFIG_DIR. Before accepting limits, Reserve
checks that the sign-in's organization matches that folder's account profile;
a shared email alone is not enough. Once verified, the card keeps that
organization binding across restarts. If Claude Code switches organizations,
Reserve asks for a new sign-in instead of silently replacing the card's limits.
Passive status-line readings cannot replace verified limits while tracking
multiple Claude accounts.
After tracking several Claude accounts, Reserve keeps local Claude token totals in Insights as Claude on this Mac, separate from subscription cards. Existing transcripts do not identify the organization responsible for each message, so Reserve cannot reliably split that history between personal and Team plans. This history is counted once and covers the default Claude folder; added-account folders are not scanned. Provider-reported limits remain separate for each account.
For API spend, choosing a provider whose first key is already saved adds a second account in Settings > API with its own key field, for example a personal and a team Claude API organization. Once a provider has two accounts, each row takes a name ("Anthropic · Nimbus"). Remove account deletes that account's key from Reserve and leaves the others alone.
codex, signed into an OpenAI subscription;claude, signed into an Anthropic subscription;cursor-agent, authenticated with cursor-agent login, for an individual
Cursor account. Teams and Enterprise Admin API keys are not supported; andagy) 1.1.11 or newer, signed into a Google account with a
Google AI Pro or Ultra plan (see Gemini), in beta;Gemini, Z.ai and Kimi Code are in beta: their usage formats have not yet been checked against every kind of account, and Reserve marks them Beta in Settings and in the connection window. If one shows an error or numbers that look wrong, please open a GitHub issue without your key, account name or email.
Beta. Since 2026-06-18, Gemini CLI no longer serves Google AI Pro, Ultra or free
individual accounts; those plans run through the Antigravity CLI (agy), with
5-hour and weekly limits per model group. Reserve shows each group's limits as
its own meter: the Gemini models group leads, and the Claude and GPT models
group sits beside it, like Claude's per-model limits.
Reserve reads them only by running agy's own usage command,
agy -p /usage --output-format json, which answers without starting a
conversation or spending quota. Reserve never reads agy's Google sign-in, never
calls Google's quota endpoints itself and never talks to agy's local server. It
first checks agy --version and refuses to ask an agy older than 1.1.11,
because older releases could send /usage to the model as a prompt. Each check
runs with no terminal, no input, a minimal environment (auto-update off, no
unrelated API keys) and a 30-second limit.
Connect can install agy with Google's official installer
(antigravity.google/cli/install.sh, into ~/.local/bin). agy has no separate
sign-in or update command, so Reserve never starts it for either: open Terminal,
run agy and sign in with Google there (running it also updates it), then
choose Check again. Google publishes no Antigravity status page Reserve can
read, so the Gemini card shows no service status.
Beta. Z.ai and Kimi Code have no helper and no sign-in. Connect asks for an API key instead: paste it, or choose Get a key to open the provider's key page. The key is saved only in the macOS Keychain and is sent only to that provider's usage endpoint. Remove in Settings > Providers deletes the key, stops checks, and clears the cached usage. Both show the same 5-hour and weekly meters, reset times, pace, alerts and menu-bar source as the other providers.
api.z.ai/api/monitor/usage/quota/limit.
Only the international z.ai platform is supported; China-mainland
open.bigmodel.cn keys are not.api.kimi.com/coding/v1/usages.Both usage endpoints are unofficial: they are what the providers' own tools use, they are not documented, and they may change without notice. If a reply is not understood, Reserve says so rather than showing a guessed 0%, and asks you to report it on GitHub. Neither provider offers a read-only key, so the key you paste can also call models; create a dedicated key just for Reserve. Z.ai publishes no status page, so its card shows no service status; Kimi uses Moonshot AI's status page.
A saved sign-in expires on its own after a few hours. When Reserve finds one
that is expired or about to expire, it asks the provider's official helper to
renew its own session: grok models for Grok, and Claude Code's documented
refresh-token login for Claude. Reserve then reads the result from that
helper's own store. It never performs the token exchange and never writes a
provider's credentials. Browser sign-in is asked for only when nothing can be
renewed, or when the helper refuses the renewal.
The same connection window handles installation, updates, permission, and any problem with sign-in or the first usage check. Provider installation and updates never run silently. Installer downloads are bounded, remain on the provider's exact official HTTPS host, run with a minimal environment that excludes unrelated API keys, and are removed from temporary storage afterward. Sign-in browser handoffs remain restricted to the provider's expected HTTPS hosts. Temporary setup and login output stays in memory.
Anthropic's subscription-usage endpoint is not a documented public API and may change or rate-limit Reserve without notice. Cursor's authenticated individual usage RPC is also undocumented and may change without notice. Grok Build 1.x does not expose its billing method through ACP, so Reserve reads the authenticated billing endpoint used by the CLI. OpenAI limits come from Codex app-server JSON-RPC. Provider changes can temporarily break a refresh even when the local app is healthy; the last valid snapshot remains visible and is marked stale.
Claude Code in a terminal can also share the limits in its documented status-line output. Enable Also use Claude Code's status line in Terminal in its provider details. Reserve then reads a quota-only local file that updates after each Claude Code response. The Claude desktop app does not send these updates. With usage access allowed, a reading from the last ten minutes wins and Reserve otherwise reads the sign-in as usual; without usage access, the status line is the only source and Reserve never reads the sign-in. The existing status line is preserved; turning the option off restores it. No conversation text is saved. Each added Claude account offers the same option; its status line is installed in that account's folder and feeds a cache file of its own.
Local history is available by default and can be turned off with Include activity from this Mac in General. Only enabled providers are scanned, and history work begins when Insights or the dashboard is opened. Opening the dashboard rescans changed logs when the last pass is more than two minutes old. Normal quota checks skip detailed Cursor history, reuse plan metadata, and check at most two providers concurrently in a sweep.
See provider support for the data contracts and remaining provider verification limits.
Swift 6 and the current Apple Command Line Tools are enough to build and run the app locally:
git clone https://github.com/pocarles/reserve.git
cd reserve
make run
make run builds and ad-hoc signs Reserve.app, then opens it. Do not
redistribute that generated app: it is neither Developer ID signed nor
notarized. The complete test gate and Universal 2 packaging dry run require
full Xcode:
make check
make package-dry
Useful developer commands:
make build
make swift-test
make selftest
make ui-test
make lifecycle-test
swift run reserve-probe openai
swift run reserve-probe anthropic
swift run reserve-probe grok
swift run reserve-probe cursor
swift run reserve-probe local
The probe prints snapshots and errors, never credential material. The Anthropic and Cursor probes honor the same explicit Keychain-consent setting as the app.
Every allowance uses the same projection model: reserve, on pace, deficit, exhausted, stale, or unknown. Provider cards combine remaining capacity, reset time, progress, pace marker, and a short projection. A currently exhausted five-hour or daily limit takes priority over a longer allowance. Forecasts wait until at least 10% of a known window has elapsed, and stop when observations are stale. Grok’s Build and Chat contributions appear only in details as percentages of its shared pool used.
The X Subscription (Free, Plus, Premium, Super and Ultra, launched October 2026) puts Grok, Grok Bot and Cursor on one weekly pool. Reserve reads that pool on the Grok card, with Cursor, Grok Bot, Imagine and Voice listed as shares of it when Grok reports them. An account that moved Cursor onto The X Subscription shows the same pool on Grok's card; Cursor's own card keeps showing what Cursor reports, and third-party models in Cursor are paid from the prepaid balance rather than the pool. Accounts that have not switched keep their SuperGrok, X Premium and Cursor plan names.
The dashboard shows every enabled provider in a compact overview, including the reset time for the allowance shown by its percentage and meter. Select a tile to show that provider's details below it: every allowance window and its reset, the plan's cost and renewal, and when the numbers were last checked.
When history is available, a second column shows usage for Today, 7 or 30 days: an API-price estimate, a trend chart, each provider's share, the token mix with cache savings, the top models, and API consumption. A provider with any unpriced active day shows its tokens and is named as having no API price; it is never counted at zero. Usage that no record names a model for is listed separately rather than ranked as a model. Without history the dashboard keeps a single column. Reserve restores the last selected provider when the dashboard reopens, and the detail panel can pin that provider to the menu bar.
Settings > General can register one of five fixed global shortcuts to open the dashboard. It is off until you choose one. The adaptive refresh option checks every 2 to 30 minutes based on how recently the dashboard was opened and uses the longest interval in Low Power Mode or under high thermal pressure. Existing fixed refresh choices remain available.
Cursor shows its reported Cursor Models and Other Models percentages as whole numbers. It also shows provider-reported tokens for today, the current billing cycle, and the last 30 days. Reserve does not derive a percentage from token totals. Hobby, Pro, Pro Plus, and Ultra default to $0, $20, $60, and $200 per month; Cursor's reported plan price and renewal date take precedence when available. On-demand spending is shown literally as disabled, unlimited, or a dollar amount used against its configured cap.
Settings > API measures consumption instead of subscription limits. Paste a key there. It stays in the macOS Keychain on this Mac and is off until you save one:
sk-ant-api03- key.
Organization endpoints use the Admin API guide's x-api-key header, including
personal/service-account keys; model validation uses Bearer authentication.
Request failures include fixed diagnostic categories, never provider free text.
If an HTTP 400 explicitly names the absent workspace header,
Reserve discovers the default active workspace and retries with the documented
anthropic-workspace-id header. This does not narrow the organization cost report.
Recovery does not depend on a particular error sentence and cannot repeat once
the header is supplied.
A failed latest check is shown even when an older reading exists, and replacing
a key clears that previous key's validation. This makes no model calls and does
not invent a zero spend reading;OpenAI and Anthropic admin keys and xAI management keys do not perform inference. Ordinary Anthropic, OpenRouter, DeepSeek and Moonshot keys can also call models, so create one just for Reserve.
TypeSafe is no longer supported: it publishes no usage or spend, so a row could only list model names. Reserve deletes a saved TypeSafe key from the Keychain at launch.
Settings updates and clears API error explanations even while a key field has focus, so a previous key's error cannot linger while a fresh result arrives.
Where a provider groups its billing, Reserve asks for the grouping and shows what the spend went on: models for Anthropic, billing line items for OpenAI. The card names a model only when one of them is most of the bill; the full breakdown is in the tooltip and in Settings. A provider that will not accept the grouping still reports its total.
Each row has Get a key, which opens that provider's own key page in your browser; the field shows the prefix to expect. Refreshing Reserve refreshes these measurements along with the subscription cards.
Those calls report spend or a remaining balance. They do not replace the subscription cards, and a key is sent only to the provider that issued it.
The optional comparable-value view is an API-equivalent estimate, not a provider bill. OpenAI and Anthropic use the observed input/cache/output mix when available; Grok exposes an aggregate token count, so its comparison is approximate. Expanded details show uncached input, cached input, cache writes, and output separately when cache data is available. Estimated cache savings compare cached reads with the full API input rate and are omitted when a read cannot be priced. They do not represent savings on a subscription bill. Subscription prices remain user-editable. Details distinguish reported, typical, and manually entered prices. Empty detail rows are omitted.
Insights has provider and source filters, Cost / Tokens / Limits views, and Today, 7-, 30-, and 90-day ranges. Filters offer only providers and sources with data in the range, Cost only when a selected provider is fully priced, and an empty selection shows one explanation instead of empty charts. Daily trends, provider shares, token-type totals, cache savings, and searchable model / day / provider breakdowns use published history without rescanning session files when filters change. Smooth trend lines connect available days across gaps; missing days remain unavailable in the heatmap, tooltips, and totals. The daily heatmap includes local history and provider-reported daily history (such as Cursor), with each row's source and coverage labeled. Recorded history remains visible when live monitoring for a provider is disabled. Missing days stay distinct from known zeroes. Monthly plans and provider account totals keep their own labeled periods; API estimates show pricing coverage. Older cache records may lack token-type or model details; these appear as unavailable until new records supply them. Cumulative Codex records with several models or an incomplete context stay unattributed. Limits show the latest quota readings and reset times.
Cursor's account insights come from provider-reported aggregate usage. Reserve labels their dollar total Provider-reported usage value rather than estimated API savings. It aggregates input, output, cache-read, and cache-write tokens and model totals without reading prompts or transcripts. It requests bounded daily history separately. If Cursor supplies totals without daily events, Reserve keeps the totals and says Daily history unavailable instead of inventing a chart.
OpenAI can report additional named allowance buckets, available reset credits, and account token history. Reset credits appear only when available; Reserve does not spend them. Insights requests account history only when needed and shows the reported token totals without inventing a price or input/output split. Older helpers can omit this history while continuing to report allowances.
Service-health labels come from the providers' official status sources. The default notification stream reports state transitions such as deficit, exhaustion, recovery, stale data, and incidents. Fixed thresholds, renewal notices, reset notices, and sounds are optional.
The menu-bar item can follow the most constrained enabled provider or remain pinned to one provider. Reserve checks its signed update feed once a day by default. Sparkle verifies the update's Ed25519 signature and Apple Developer ID signature, then offers a familiar macOS install button. Checks send no system profile or analytics, and can be disabled in Settings > About.
Reserve keeps aggregate caches under:
~/Library/Application Support/Reserve/snapshots.json
~/Library/Application Support/Reserve/local-usage-index.json
Preferences use the com.pocarles.reserve defaults domain. On the first v1
launch, Reserve can copy a fixed allowlist of preferences and validated cache
data from the former UsageBar locations. It never migrates credentials, raw
provider responses, paths, prompts, transcripts, or session records. Migration
is idempotent; invalid legacy data is left untouched and Reserve starts with a
clean new store.
The snapshot cache is capped at 100 KB. The local index is capped at 12 MB and contains daily token/cost aggregates plus hashed file keys and byte offsets for incremental scans. OAuth tokens, account identifiers, local paths, prompts, responses, cookies, authorization headers, raw provider payloads, and process logs are never cached. Cursor's normalized daily and model totals may be cached with the same bounds as other aggregate usage data.
Z.ai and Kimi plan keys are kept as generic-password items under the
com.pocarles.reserve.plan-keys Keychain service, separate from the API keys
above. They are never written to preferences, the snapshot cache, or logs.
Local totals come from session logs under ~/.claude/projects,
~/.codex/sessions, and ~/.grok/sessions; only bounded daily aggregates are
retained. Reserve never scans Cursor transcripts or prompt text. It may read
~/.claude/.credentials.json and
~/.grok/auth.json when present (GROK_AUTH_PATH and GROK_HOME are
honoured, in that order). To name the signed-in Claude account in a card's
expanded details, Reserve also reads the account email, organization and
subscription dates from Claude Code's ~/.claude.json (or
$CLAUDE_CONFIG_DIR/.claude.json); nothing else in that file is used. An added
Claude account reads the same files, and the Keychain item, inside its own folder only. Account
emails and organization names are shown but never written to Reserve's cache.
Turn on Hide personal info in the menu or Settings > General to mask them on
screen. Share cards exclude those details regardless of that setting, along
with paths, raw errors, and provider-controlled free-form labels. Claude Code
can instead keep its sign-in in Keychain; Reserve reads it only after the user
chooses Allow access, through
the signed macOS security tool, and retains it in memory only. Reserve starts
that tool directly, captures bounded output through a private pipe, and never
prints or saves the credential. This addresses the repeated approval prompts caused by Claude Code restoring
its Keychain access list after browser sign-in; macOS can still require access
approval when its security settings change. A
current protected sign-in takes precedence over legacy credential files left
behind by Claude Code.
Renewal is always performed by the provider's own helper, started without a
shell, with no browser handoff, with no inherited input, and with its output
discarded. Because Reserve starts it on its own initiative, the helper receives
an allowlisted environment — the user's home, shell, locale, temporary
directory, search path, and the provider's own configuration variables — so
unrelated API keys in Reserve's environment never reach it. For Grok that is the public grok models command; for Claude it is
Claude Code's documented refresh-token login, which receives the refresh token
and scopes in its environment and stores the rotated credential in its own
store. Reserve reads the renewed session back from that store, holds it in
memory only, and never writes, prints, or caches a token.
For Cursor, Reserve first runs the official
cursor-agent status --format json command with strict time and output limits
so Cursor can refresh its own credential. Only after Allow access does
Reserve read the cursor-user / cursor-access-token Keychain item. It never
reads the Cursor refresh token, writes Cursor Keychain items, or stores the
access token or raw DashboardService responses. Scheduled refreshes disallow
Keychain interaction, and turning access off invalidates an in-flight refresh.
See SECURITY.md for reporting and support policy.
Those CPU and memory targets are release gates, not promises for every provider CLI or Mac configuration.
AppKit NSStatusItem + NSPopover
|
native dashboard
|
UsageStore
/ | \
cache local scan providers
/ | | \
Codex Claude Grok Cursor
RPC HTTPS HTTPS HTTPS
ReserveCore owns provider, cache, scanner, and notification-domain behavior.
The Reserve executable owns AppKit surfaces and orchestration. The repository
also contains reserve-probe, reserve-selftest, and a standard SwiftPM test
target.
Connecting a provider. Choose Connect on its card, or enable it in Settings > Providers. Reserve opens the sign-in page, or a window with the next step. No Terminal commands or copied tokens are needed.
Already signed in, but permission is needed. Choose Connect, then Allow usage access. Approve macOS access if prompted. Denied access stays a permission problem and does not automatically send you through another login.
Saved sign-in cannot be used. Choose Sign in again to reconnect in your browser. Reserve checks your usage after sign-in; macOS may still ask for access.
The browser did not open. Choose Open browser again in the connection window. Cancel stops Reserve's login attempt. You can start again later.
Cursor briefly loses access. Reserve reloads its credential through the existing Cursor Agent status check and retries once before requesting sign-in. A provider rejecting account permissions does not automatically mean the session expired.
Disconnecting a provider. In Settings > Providers, expand the provider and choose Disconnect from Reserve. This stops checks, removes Reserve's cached usage for that provider, and turns off its usage-access permission. It does not sign you out of the provider's own app or uninstall its helper. The tracking checkbox can pause checks without clearing cached usage.
Data is stale or rate limited. Reserve keeps the last valid snapshot and retries after a bounded backoff. Check the provider's linked official status page before reconnecting.
A source-built app is blocked on another Mac. Build it on that Mac or use the signed and notarized DMG from GitHub Releases. Ad-hoc builds are not portable.
The optional checksum fails. Delete both downloads and retrieve them again from the same GitHub Release. Do not open the DMG.
Focused contributions that improve the lightweight six-provider product are welcome. Read CONTRIBUTING.md. Maintainer release operations are documented in docs/RELEASE_CHECKLIST.md.
Reserve is an independent open-source project. It is not affiliated with, endorsed by, sponsored by, or an official product of OpenAI, Anthropic, xAI, Anysphere, Cognition, GitHub, or Microsoft. Provider names and marks belong to their respective owners. See THIRD_PARTY_NOTICES.md.
MIT. Copyright © 2026 Pierre-Olivier Carles. See LICENSE.