1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# ai-usagebar configuration. Lives at ~/.config/ai-usagebar/config.toml.
# Every section and field is optional — missing config = defaults below.
#
# IMPORTANT: if you put an inline `api_key` in any section, chmod 600 the
# file (`chmod 600 ~/.config/ai-usagebar/config.toml`). Otherwise env vars
# are the safer choice.
[]
# Which vendor the widget shows when `--vendor` is omitted, AND which tab
# is selected when the TUI opens. Comment out to default to Anthropic.
# Valid: anthropic | openai | zai | openrouter | deepseek | kimi
# When unset, the TUI opens on the Overview (all vendors at once); set this to
# open directly on a vendor's tab instead.
# primary = "anthropic"
# Which vendors the Overview lists (the TUI's first tab / the macOS menu-bar's
# top section), in this order. Omit for every enabled vendor.
# overview_vendors = ["anthropic", "cursor", "openai"]
# Presentation of vendor tab navigation: sidebar (vertical box) | navbar (top strip) | none (hidden).
# Default sidebar (falls back to navbar on narrow terminals).
# vendor_box = "sidebar"
# Optional, TUI-only monitor for local Claude Code session context. When
# enabled, press `c` in ai-usagebar-tui. The scanner reads only bounded tails
# below ~/.claude/projects, skips subagent transcripts and never follows
# discovered symlinks. Nothing is read while this remains disabled.
[]
= false
# Where the view docks when opened: full (own screen) | split (beside the
# dashboard) | bottom. `v` cycles it while open; this is the starting value.
= "full"
# projects_path = "~/.claude/projects" # default
# Set a fallback only when it matches the sessions you use. Without a known
# denominator the overlay shows raw input tokens rather than inventing a %.
# context_window_tokens = 200000
# Exact per-model values take precedence, which is useful when 200K and 1M
# sessions coexist. Keys must match the model id stored in the transcript.
# [context.model_context_window_tokens]
# "claude-opus-4-6" = 1000000
[]
= true
# Path to the Claude CLI OAuth credentials. Leave commented out to use
# the default ~/.claude/.credentials.json.
# credentials_path = "/home/you/.claude/.credentials.json"
# Auto-discover extra accounts from a directory, in Claude Code's own
# CLAUDE_CONFIG_DIR layout: each immediate subdir becomes an account labeled by
# the subdir name (shown as a TUI tab and selectable with --account <label>),
# refreshed independently. Credentials live in .credentials.json on Linux and
# may live only in a config-dir-scoped Keychain item on macOS. Populate it with:
# CLAUDE_CONFIG_DIR=~/.config/ai-usagebar/accounts/work claude # sign in
# Merged with the explicit [[anthropic.accounts]] entries below (explicit wins).
# accounts_dir = "~/.config/ai-usagebar/accounts"
# Hide the default (unnamed) Claude tab when you manage every account explicitly
# above — otherwise you get an extra tab for the ambient ~/.claude / Keychain
# login. Default true; ignored when there are no named accounts.
# show_default_account = false
# Where the Claude *Desktop app*'s saved accounts live, for `account switch`.
# Defaults to the store claude-acc creates (https://github.com/ohmaseclaro/claude-acc);
# unrelated to accounts_dir above, which is the `claude` CLI's own accounts.
# desktop_profiles_dir = "~/.claude-acc/profiles"
# Or list accounts explicitly:
# [[anthropic.accounts]]
# label = "work"
# credentials_path = "~/.config/ai-usagebar/accounts/work/.credentials.json"
# Anthropic (API) — unlike the balance vendors above (which show your REMAINING
# credit), Anthropic does not expose the prepaid credit balance over any API
# (Console dashboard only), so this reports your month-to-date SPEND (consumed)
# instead — for your API/Console account, which is separate from the Claude Code
# OAuth login above.
#
# NOTE: the cost API does NOT report Priority Tier usage, so if your
# organization is on Priority Tier the figure shown here is LOWER than your
# real total spend. See
# https://platform.claude.com/docs/en/manage-claude/usage-cost-api
#
# Opt-in (disabled until you set a key). Requires a Console *Admin key*
# (`sk-ant-admin01-...`, sent as the `x-api-key` header), distinct from an
# inference key. Admin keys exist only for ORGANIZATION accounts: set one up
# first (Console > Settings > Organization) — the .../settings/admin-keys page
# 404s for individual accounts.
[]
= false
= "ANTHROPIC_ADMIN_KEY" # checked first; if set + non-empty, used
# api_key = "sk-ant-admin01-..." # fallback; chmod 600 the file if you use it
# Positive, finite monthly USD limit for the spend-vs-limit % display (the API
# doesn't expose a limit). With it: "$1.34 / $1000 · 0%". Without it:
# "$1.34/mo".
# monthly_limit = 1000
[]
= true
# Path to the Codex CLI OAuth credentials. Leave commented out to use
# the default ~/.codex/auth.json.
# codex_auth_path = "/home/you/.codex/auth.json"
# RESERVED — setting this does nothing today. It names the env var a future
# API-key-only path would read (admin key → `/v1/organization/costs`). No code
# consumes it: OpenAI usage comes only from Codex OAuth. Left commented out so
# it isn't mistaken for a working alternative to `codex login`.
# admin_key_env = "OPENAI_ADMIN_KEY"
[]
= true
# Credential resolution order: env var → inline api_key → error.
= "ZAI_API_KEY" # checked first; if set + non-empty, used
# api_key = "..." # fallback for users who don't export env vars
# Display-only. Used when the API doesn't return a plan tier itself.
# plan_tier = "lite" # lite | pro | max
[]
= true
= "OPENROUTER_API_KEY"
# api_key = "sk-or-v1-..."
[]
# Disabled by default — enable once you've set a key (env var or inline).
# Saving a key in the Settings overlay writes the inline fallback AND flips
# `enabled` to true; clearing the field removes the inline key again.
= false
= "DEEPSEEK_API_KEY" # checked first; if set + non-empty, used
# api_key = "sk-..." # fallback; chmod 600 the file if you use it
[]
# Disabled by default — enable once you've set a key (env var or inline).
# Saving a key in the Settings overlay writes the inline fallback AND flips
# `enabled` to true; clearing the field removes the inline key again.
# Shows Kimi Code subscription quota (weekly + 5h rolling window) from the
# undocumented, community-confirmed api.kimi.com/coding/v1/usages endpoint.
= false
= "KIMI_API_KEY" # checked first; if set + non-empty, used
# api_key = "sk-..." # fallback; chmod 600 the file if you use it
# --- Account-balance vendors -------------------------------------------------
# These report your REMAINING credit as money, rather than plan usage as a %.
# All are opt-in and never fetch until enabled with a key present.
[]
# Disabled by default — enable once you've set a key (env var or inline).
# Saving a key in the Settings overlay writes the inline fallback AND flips
# `enabled` to true; clearing the field removes the inline key again.
# Remaining credit from the undocumented api.kilo.ai/api/profile/balance
# endpoint (used internally by the Kilo Code extension).
= false
= "KILO_API_KEY" # checked first; if set + non-empty, used
# api_key = "..." # fallback; chmod 600 the file if you use it
# Scopes the balance to a team via the x-kilocode-organizationid header.
# Omit for the personal balance. Switching this refetches rather than reusing
# the previous account's cached figure.
# organization_id = "org_..."
[]
# Disabled by default — enable once you've set a key (env var or inline).
# Saving a key in the Settings overlay writes the inline fallback AND flips
# `enabled` to true; clearing the field removes the inline key again.
# Remaining credit from the documented
# api.novita.ai/openapi/v1/billing/balance/detail endpoint.
= false
= "NOVITA_API_KEY" # checked first; if set + non-empty, used
# api_key = "..." # fallback; chmod 600 the file if you use it
[]
# Disabled by default — enable once you've set a key (env var or inline).
# Saving a key in the Settings overlay writes the inline fallback AND flips
# `enabled` to true; clearing the field removes the inline key again.
# Account balance from the documented /v1/users/me/balance endpoint.
= false
= "MOONSHOT_API_KEY" # checked first; if set + non-empty, used
# api_key = "sk-..." # fallback; chmod 600 the file if you use it
# Region picks BOTH the host and the currency, so switching it refetches
# rather than showing the other region's figure:
# global -> api.moonshot.ai (USD) | cn -> api.moonshot.cn (CNY)
# region = "global"
[]
# Disabled by default — enable once you've set a key (env var or inline).
# Saving a key in the Settings overlay writes the inline fallback AND flips
# `enabled` to true; clearing the field removes the inline key again.
# Prepaid credit from the documented xAI Management API
# management-api.x.ai/v1/billing/teams/{team}/prepaid/balance.
#
# This is the *Management* key (xAI Console > Management keys), NOT the
# inference key you use for chat completions.
= false
= "XAI_MANAGEMENT_KEY" # checked first; if set + non-empty, used
# api_key = "..." # fallback; chmod 600 the file if you use it
# The balance is per-team. A TEAM-scoped management key identifies its team on
# its own; an ORGANIZATION-scoped key cannot (its scopeId is an organization,
# not a team), so set the team explicitly here. Without it, an org-scoped key
# reports an error saying so instead of querying the wrong team.
# team_id = "..."
# Google Antigravity. No credentials: usage is read from whichever local
# Antigravity product is running (Antigravity 2.0, the `agy` CLI, or the IDE) —
# all three share one account-wide quota. Set ANTIGRAVITY_LS_ADDRESS to
# "host:port" only if auto-discovery of that local server ever fails.
[]
= false
# Cursor. No API key: usage is read from the session token the Cursor IDE
# already wrote to its own local state database after you signed in there —
# no separate login step for ai-usagebar. Shows this billing cycle's two
# included-usage pools — "Cursor Models" (Auto + Composer) and "Other Models"
# (named / API) — from the undocumented cursor.com/api/usage-summary endpoint
# (the same one the Cursor dashboard itself calls).
[]
# Disabled by default — enable once you've signed in to the Cursor IDE at
# least once (it needs no key from you, but it does need that one-time login
# to exist).
= false
# Override Cursor's local state database path. Leave commented out to use the
# platform default:
# Linux: ~/.config/Cursor/User/globalStorage/state.vscdb
# macOS: ~/Library/Application Support/Cursor/User/globalStorage/state.vscdb
# Windows: %APPDATA%\Cursor\User\globalStorage\state.vscdb
# Set this if you use a portable Cursor install or a renamed profile dir.
# db_path = "/home/you/.config/Cursor/User/globalStorage/state.vscdb"
[]
# Disabled by default — enable once you've set a key (env var or inline).
# Saving a key in the Settings overlay writes the inline fallback AND flips
# `enabled` to true; clearing the field removes the inline key again.
# Token Plan subscription quota (rolling interval window + weekly) from the
# official /v1/token_plan/remains route. Needs the Token Plan SUBSCRIPTION key
# — a pay-as-you-go key has no plan quota to report.
= false
= "MINIMAX_API_KEY" # checked first; if set + non-empty, used
# api_key = "..." # fallback; chmod 600 the file if you use it
# Region picks the INSTANCE, and the two issue separate keys — pointing this
# at the wrong one reads as an invalid key, not an empty plan:
# global -> api.minimax.io | cn -> api.minimaxi.com
# region = "global"