agent-usage-all-in-one 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CONTRIBUTING.md CHANGED
@@ -6,7 +6,9 @@ accounting are release requirements rather than optional polish.
6
6
 
7
7
  ## Development
8
8
 
9
- Use macOS, Node.js 24+, and pnpm 10.33.3.
9
+ Use macOS, Node.js 24+, and pnpm 10.33.3. That runtime is the product boundary
10
+ (ADR 017); do not add Linux CI or a second install channel without superseding
11
+ it.
10
12
 
11
13
  ```bash
12
14
  pnpm install
package/README.md CHANGED
@@ -8,23 +8,37 @@
8
8
  [![npm](https://img.shields.io/npm/v/agent-usage-all-in-one.svg)](https://www.npmjs.com/package/agent-usage-all-in-one)
9
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
10
10
 
11
+ > **Local multi-agent usage center on macOS — one dashboard, no cloud, no auto-switch.**
12
+
11
13
  Agent Usage is a macOS-first, fully local usage center for Codex, Claude Code,
12
- OpenCode, Grok, dsh, and Antigravity. One command opens a dashboard for native quota windows,
14
+ OpenCode, Grok, dsh, Antigravity, and Cursor. One command opens a dashboard for native quota windows,
13
15
  reset times, tokens, model rankings, equivalent API cost, history, and diagnostics.
14
16
  It offers advice but never switches agents automatically.
15
17
 
18
+ ## Compared
19
+
20
+ ![Category comparison: provider UIs, token exporters, FinOps dashboards, and Agent Usage](docs/design/compare-sheet.png)
21
+
22
+ Honest category axes and when to prefer Agent Usage vs provider UIs, exporters, or FinOps dashboards: [docs/comparison.md](docs/comparison.md).
23
+
24
+ Sourced named competitors (ccusage, CodeBurn, Token Monitor, TokenTracker): [docs/named-competitors.md](docs/named-competitors.md).
25
+
26
+ **Boundaries:** Cursor quota is experimental (no Tokens/history yet) · macOS only · multi-agent usage center for listed providers (don’t oversell “all-in-one”).
27
+
16
28
  ## Dashboard
17
29
 
18
30
  The dashboard has two primary tabs:
19
31
 
20
32
  - **Agent usage** preserves each provider's native five-hour, weekly, monthly,
21
33
  All models, and Fable-only quota labels and reset times.
22
- - **Tokens & model costs** supports 24-hour, 7-day, and 30-day ranges. It puts
23
- totals first, then a GitHub-style last-year usage wall of headline-included
24
- recorded Tokens, charts Provider share and the interactive daily trend, and
25
- shows model rankings with visual share bars and the public API retail
26
- equivalent of eligible token usage. The year wall is independent of the
27
- selected 24-hour, 7-day, or 30-day window.
34
+ - **Tokens & model costs** supports 24-hour, 7-day, and 30-day ranges. The
35
+ selected window, metric, and currency sit in the same sticky header as the
36
+ primary tabs. The summary board leads with the headline amount beside a
37
+ GitHub-style last-year usage wall of headline-included recorded Tokens, then
38
+ charts Provider share and the interactive daily trend, and shows model
39
+ rankings with visual share bars and the public API retail equivalent of
40
+ eligible token usage. The year wall is independent of the selected 24-hour,
41
+ 7-day, or 30-day window.
28
42
  - **Settings** provides a centered two-column modal organized into five dedicated
29
43
  categories: Connections, Custom model rates, Monitoring, Diagnostics, and
30
44
  Data & privacy.
@@ -37,6 +51,8 @@ unclassified or unpriced instead of being guessed or displayed as zero.
37
51
  Grok Build/SuperGrok and xAI API are independent billing domains. Their quotas,
38
52
  tokens, and costs are never added together.
39
53
 
54
+ ![Cost honesty: actual charges, estimates, subscriptions, and API retail equivalent stay separate](docs/design/cost-semantics-4.png)
55
+
40
56
  ## Fast, progressive startup
41
57
 
42
58
  The loopback web service starts before connector discovery or data processing.
@@ -67,7 +83,19 @@ browser closed.
67
83
 
68
84
  ## Install and run
69
85
 
70
- Agent Usage requires macOS and Node.js 24 or newer.
86
+ Agent Usage requires macOS and Node.js 24 or newer. That floor is the supported
87
+ runtime (built-in `node:sqlite`, Keychain, LaunchAgent), not a documentation
88
+ oversight — see [ADR 017](docs/adr/017-macos-node24-npm-runtime.md) and the
89
+ [platform roadmap](docs/platform-roadmap.md). Linux and Homebrew / DMG are not
90
+ shipped.
91
+
92
+ ![Quick start: install and open the local dashboard in three steps](docs/design/install-3-steps.png)
93
+
94
+ ```bash
95
+ npx agent-usage-all-in-one
96
+ ```
97
+
98
+ Optional global install:
71
99
 
72
100
  ```bash
73
101
  npm install --global agent-usage-all-in-one
@@ -113,10 +141,17 @@ agent-usage clear --yes
113
141
  | Grok · xAI API | No subscription quota | Official Management API aggregation | Actual USD amounts, balance, limit, and invoice when available |
114
142
  | dsh · DeepSeek API | No subscription quota | Local dsh session logs across every profile, including front ends composed on dsh | API retail equivalent at DeepSeek published peak/off-peak rates |
115
143
  | Antigravity · Gemini Code Assist | Official-client 5-hour sprint window and weekly baseline limit from live language server RPC, with local session observation fallback | Local conversation SQLite databases (~/.gemini/antigravity-cli and ~/.gemini/antigravity) | API retail equivalent at published Google Gemini and third-party model rates |
144
+ | Cursor | Experimental official Agent CLI `/usage` screen: Included percent and On-Demand spend-limit window; account-wide | Not collected in this version | On-Demand dollars are a quota window, not a bill |
116
145
 
117
146
  Every value retains its authority and observation time. Account-wide and this-Mac
118
147
  evidence remain visibly distinct.
119
148
 
149
+ ## First launch / empty state
150
+
151
+ Until connectors find local client data, the dashboard shows an honest empty state — connect or use an installed agent first:
152
+
153
+ ![Empty state when no agent data is connected yet](docs/design/empty-state-unconnected.png)
154
+
120
155
  ## Credentials and privacy
121
156
 
122
157
  Official-client credentials stay in their owning clients and are neither copied
@@ -128,7 +163,7 @@ All usage data remains local. JSON and CSV exports omit account identifiers,
128
163
  session IDs, cookies, OAuth tokens, and secret values by default. Raw observations
129
164
  are retained for 90 days, then transactionally compacted into UTC daily aggregates.
130
165
  Clearing local usage never deletes credentials owned by Codex, Claude Code,
131
- OpenCode, Grok, dsh, or Antigravity.
166
+ OpenCode, Grok, dsh, Antigravity, or Cursor.
132
167
 
133
168
  ## Verification
134
169
 
@@ -146,6 +181,15 @@ See the [official pricing evidence](docs/research/official-pricing-sources-2026-
146
181
  [connector receipts](docs/release/connector-receipts-2026-08-28.md), and
147
182
  [open-source notices](docs/open-source.md).
148
183
 
184
+ ## Roadmap vision (not shipped)
185
+
186
+ Linux, Homebrew, and DMG stay off the product until the conditions in
187
+ [docs/platform-roadmap.md](docs/platform-roadmap.md) are met.
188
+
189
+ > **VISION only — not shipped.** Menu bar / always-available glance is tracked in [issue #19](https://github.com/Blackman99/agent-usage-all-in-one/issues/19). Do not treat the mock as a current feature.
190
+
191
+ ![VISION (not shipped): menu bar glance concept — see issue #19](docs/design/menubar-vision.png)
192
+
149
193
  ## License and community
150
194
 
151
195
  MIT — see [LICENSE](LICENSE). Also see [CONTRIBUTING.md](CONTRIBUTING.md),
package/README.zh-CN.md CHANGED
@@ -8,16 +8,28 @@
8
8
  [![npm](https://img.shields.io/npm/v/agent-usage-all-in-one.svg)](https://www.npmjs.com/package/agent-usage-all-in-one)
9
9
  [![许可证:MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
10
10
 
11
+ > **macOS 上的本地多 Agent 用量中心——一个仪表盘,无云端,不自动切换。**
12
+
11
13
  Agent Usage 是一个 macOS 优先、完全在本地运行的用量中心。一次启动即可统一查看
12
- Codex、Claude Code、OpenCode、Grok、dsh 与 Antigravity 的原生额度窗口、刷新时间、Token、模型排行、
14
+ Codex、Claude Code、OpenCode、Grok、dsh、AntigravityCursor 的原生额度窗口、刷新时间、Token、模型排行、
13
15
  API 对等费用、历史与诊断。它只提供建议,不会自动切换 Agent。
14
16
 
17
+ ## 对比说明
18
+
19
+ ![类别对比:各平台官网、Token 导出工具、FinOps 看板与 Agent Usage](docs/design/compare-sheet.png)
20
+
21
+ 按类别对比何时更适合用 Agent Usage,而非各平台官网、导出工具或通用 FinOps 看板:[docs/comparison.md](docs/comparison.md)。
22
+
23
+ 具名竞品对照(ccusage、CodeBurn、Token Monitor、TokenTracker):[docs/named-competitors.md](docs/named-competitors.md)。
24
+
25
+ **边界:** Cursor 额度为实验性(尚无 Token/历史)· 仅 macOS · 对已列出的 Provider 做多 Agent 用量中心(不夸大 “all-in-one”)。
26
+
15
27
  ## 核心页面
16
28
 
17
29
  页面只有两个主要标签页:
18
30
 
19
31
  - **Agent 用量**:保留各平台原生的 5 小时、周、月、All models 和 Fable only 等额度标签与刷新时间。
20
- - **Token 与模型费用**:支持 24 小时、7 天和 30 天范围。顶部优先展示汇总信息,接着是过去一年的 GitHub 风格用量墙(只统计计入摘要的已记录 Token),随后用图表展示 Provider 占比和可交互的每日趋势,再以占比条呈现模型排行及符合条件的 Token 按公开 API 价格计算出的对等费用。用量墙与所选的 24 小时 / 7 天 / 30 天窗口相互独立。
32
+ - **Token 与模型费用**:支持 24 小时、7 天和 30 天范围。所选窗口、指标与币种和主标签页共用同一条吸顶导航。汇总卡片左侧是金额或 Token 头条,右侧是过去一年的 GitHub 风格用量墙(只统计计入摘要的已记录 Token),随后用图表展示 Provider 占比和可交互的每日趋势,再以占比条呈现模型排行及符合条件的 Token 按公开 API 价格计算出的对等费用。用量墙与所选的 24 小时 / 7 天 / 30 天窗口相互独立。
21
33
  - **设置面板**:采用居中双栏结构,将连接管理、自定义模型费率、运行监控、系统诊断与数据隐私划分为 5 个独立分类,方便高效维护各项配置。
22
34
 
23
35
  实际账单、平台报告估算、固定订阅费和 API 对等零售价是四类互不混合的证据。
@@ -49,7 +61,13 @@ pnpm dev
49
61
 
50
62
  ## 安装与启动
51
63
 
52
- 要求 macOS 和 Node.js 24 或更高版本。
64
+ 要求 macOS 和 Node.js 24 或更高版本。这是受支持的运行时(内置 `node:sqlite`、钥匙串、LaunchAgent),不是文档疏漏——见 [ADR 017](docs/adr/017-macos-node24-npm-runtime.md) 和 [平台路线图](docs/platform-roadmap.md)。尚未提供 Linux,也没有 Homebrew / DMG。
65
+
66
+ ```bash
67
+ npx agent-usage-all-in-one
68
+ ```
69
+
70
+ 可选全局安装:
53
71
 
54
72
  ```bash
55
73
  npm install --global agent-usage-all-in-one
@@ -95,6 +113,7 @@ agent-usage clear --yes
95
113
  | Grok · xAI API | 没有订阅额度 | 官方 Management API 聚合 | 可用时展示实际美元金额、余额、上限与账单 |
96
114
  | dsh · DeepSeek API | 没有订阅额度 | 本机 dsh 全部 profile 的会话日志,含基于 dsh 的终端前端 | 按 DeepSeek 公布的峰谷价计算 API 对等零售价 |
97
115
  | Antigravity · Gemini Code Assist | 通过官方 Language Server 本地 RPC 获取 5 小时冲刺窗口与周度基准额度,支持本地会话分析平滑降级 | 本地会话 SQLite 数据库(~/.gemini/antigravity-cli 与 ~/.gemini/antigravity) | 按公布的 Google Gemini 及第三方模型公开价格计算 API 对等零售价 |
116
+ | Cursor | 实验性官方 Agent CLI `/usage` 屏幕:Included 百分比与 On-Demand 花费上限;账户全局 | 本版不采集 | On-Demand 美元是额度窗口,不是账单 |
98
117
 
99
118
  每个数字都会保留来源权威等级和观测时间;账户全局与仅此 Mac 的证据始终明确区分。
100
119
 
@@ -106,7 +125,7 @@ Agent Usage 管理的凭据,存储在 macOS 钥匙串。本地页面使用一
106
125
 
107
126
  所有用量数据都留在本机。JSON/CSV 导出默认排除账户标识、会话 ID、Cookie、OAuth Token
108
127
  和密钥值。原始观测保留 90 天,之后在事务中压缩为 UTC 日汇总。清理本地用量永远不会删除
109
- Codex、Claude Code、OpenCode、Grok、dsh 或 Antigravity 官方客户端拥有的凭据。
128
+ Codex、Claude Code、OpenCode、Grok、dsh、AntigravityCursor 官方客户端拥有的凭据。
110
129
 
111
130
  ## 验证
112
131
 
@@ -124,6 +143,12 @@ pnpm test:e2e
124
143
  [连接验证收据](docs/release/connector-receipts-2026-08-28.md)与
125
144
  [开源说明](docs/open-source.md)。
126
145
 
146
+ ## 路线图愿景(未交付)
147
+
148
+ Linux、Homebrew 和 DMG 在满足 [docs/platform-roadmap.md](docs/platform-roadmap.md)
149
+ 中的条件之前不会进入产品。菜单栏一览见 [issue #19](https://github.com/Blackman99/agent-usage-all-in-one/issues/19),
150
+ 仓库中的示意图只是愿景,不是现有功能。
151
+
127
152
  ## 许可证与社区
128
153
 
129
154
  MIT,详见 [LICENSE](LICENSE)。另请参阅 [CONTRIBUTING.md](CONTRIBUTING.md)、