| summary | Zed provider data source: editor Keychain session and Zed cloud API. | |||
|---|---|---|---|---|
| read_when |
|
CodexBar monitors Zed plan status, billing cycle dates, edit-prediction quota, and overdue invoices via Zed's cloud API.
Local probe (Keychain + cloud API) — reads the same credentials Zed stores after GitHub sign-in, then calls:
GET https://cloud.zed.dev/client/users/me
Authorization: {user_id} {access_token}
| Item | Value |
|---|---|
| Service URL | https://zed.dev by default, or the configured HTTPS server_url for a custom server |
| Keychain class | Internet password (kSecClassInternetPassword, server = service URL). Generic-password fallback is supported for older layouts. |
| Account | Zed user ID (string) |
| Secret | Access token (UTF-8 bytes) |
CodexBar requests a non-interactive Keychain read. Existing Zed items can still carry an access-control list that makes macOS show a SecurityAgent prompt the first time CodexBar reads them. Choose Always Allow to avoid repeat prompts. If Zed has never been signed in, or access is denied, the provider reports Not signed in to Zed.
CodexBar reads Zed’s user settings from ~/.config/zed/settings.json. The credentials_url setting (falls back to
server_url) selects which Keychain entry to read. For the trusted
https://zed.dev and https://staging.zed.dev servers, Zed may use a separate credential identifier. Custom servers
must use HTTPS and store credentials under the exact same server_url; CodexBar rejects cross-origin overrides so a
settings-file change cannot forward a Keychain token to another host.
| Zed field | CodexBar display |
|---|---|
plan.plan_v3 |
Plan label (Free / Pro / Trial / Student / Business) |
plan.usage.edit_predictions |
Primary bar: used/limit or “Unlimited” on Pro+ |
plan.subscription_period.ended_at |
Billing cycle reset / secondary window |
plan.has_overdue_invoices |
Warning note + billing window marker |
Per LLM Providers and External Agents:
- BYOK models → track via OpenAI, Claude, Gemini, etc.
- External agents (Claude Agent, Codex ACP) → bill through those providers
- Sign in from the Zed editor app (Command Palette →
client: sign in). - Confirm a Keychain internet-password entry exists for server
https://zed.dev(or your customcredentials_url).
- macOS may block Keychain access until you allow CodexBar (same class of issue as other IDE probes).
- Re-sign in to Zed after changing
credentials_url.
Sources/CodexBarCore/Providers/Zed/ZedStatusProbe.swift- Keychain read, cloud API, snapshot mappingSources/CodexBarCore/Providers/Zed/ZedProviderDescriptor.swift- provider metadata and local fetch strategySources/CodexBar/Providers/Zed/ZedProviderImplementation.swift- app registrationTests/CodexBarTests/ZedStatusProbeTests.swift- cloud API and routing tests