@aiusage/cli 1.4.4 → 1.5.1
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/README.md +13 -6
- package/README.zh-CN.md +11 -4
- package/dist/cli.js +790 -263
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`@aiusage/cli` is the AIUsage command-line tool for:
|
|
4
4
|
|
|
5
5
|
- discovering and managing projects across AI tools
|
|
6
|
-
- scanning local Claude Code, Codex, Copilot CLI,
|
|
6
|
+
- scanning local Claude Code, Codex, Cursor, Copilot CLI, Copilot for VS Code, Gemini CLI, and Antigravity usage
|
|
7
7
|
- importing historical usage from Anthropic Admin API
|
|
8
8
|
- printing local usage summaries for the last 7 days, 30 days, 90 days, or all history
|
|
9
9
|
- scheduling automatic sync to an AIUsage Worker
|
|
@@ -41,7 +41,7 @@ aiusage project alias # list all configured aliases
|
|
|
41
41
|
aiusage project alias --remove myapp # remove alias
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Scans data directories for Claude Code, Codex, Copilot CLI,
|
|
44
|
+
Scans data directories for Claude Code, Codex, Cursor, Copilot CLI, Copilot for VS Code, Gemini CLI, and Antigravity, listing discovered projects with their aliases and sources.
|
|
45
45
|
|
|
46
46
|
Project aliases are applied locally before upload. If two devices set the same alias for their respective project directories, the server merges them into one project.
|
|
47
47
|
|
|
@@ -60,7 +60,7 @@ aiusage report --no-emoji # disable emoji in title
|
|
|
60
60
|
aiusage report --json # JSON output
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Reads data from `~/.claude/projects` (Claude Code)
|
|
63
|
+
Reads data from local tool data directories including `~/.claude/projects` (Claude Code), `~/.codex` (Codex), Cursor local state plus usage export, VS Code Copilot Chat logs, and `~/.gemini/antigravity` (Antigravity).
|
|
64
64
|
|
|
65
65
|
**Compact mode** (default) shows Sources and Daily tables with merged Cache column and 2-decimal cost. **Detail mode** (`--detail`) expands all columns (CacheRead, CacheWrite, Reasoning), adds Top Models and Pricing Notes sections, and shows 4-decimal cost.
|
|
66
66
|
|
|
@@ -165,12 +165,19 @@ Manage local settings.
|
|
|
165
165
|
```bash
|
|
166
166
|
aiusage config set lang zh # default language: en or zh
|
|
167
167
|
aiusage config set emoji false # disable emoji in report title
|
|
168
|
-
aiusage config set device.alias "MacBook Pro 工作机"
|
|
169
|
-
aiusage config set privacy.projectVisibility masked
|
|
170
|
-
aiusage config set project.alias MyApp "我的应用"
|
|
168
|
+
aiusage config set device.alias "MacBook Pro 工作机" # device display name on dashboard
|
|
169
|
+
aiusage config set privacy.projectVisibility masked # hidden | masked | plain
|
|
170
|
+
aiusage config set project.alias MyApp "我的应用" # prefer: aiusage project alias
|
|
171
171
|
aiusage config set anthropic-admin-key sk-ant-admin... # for aiusage import
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
+
**Device alias** is shown on the dashboard to distinguish multiple devices. Set it to something recognizable (e.g. your machine name or emoji):
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
aiusage config set device.alias "💻 MacBook Pro"
|
|
178
|
+
aiusage config set device.alias "🖥️ iMac Studio"
|
|
179
|
+
```
|
|
180
|
+
|
|
174
181
|
CLI flags (`--lang`, `--no-emoji`) override config values for a single run.
|
|
175
182
|
|
|
176
183
|
## Configuration
|
package/README.zh-CN.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`@aiusage/cli` 是 AIUsage 命令行工具,用于:
|
|
4
4
|
|
|
5
5
|
- 发现和管理本机 AI 工具项目
|
|
6
|
-
- 扫描本地 AI 编程工具的 Token 用量(Claude Code、Codex、Copilot CLI、Gemini CLI
|
|
6
|
+
- 扫描本地 AI 编程工具的 Token 用量(Claude Code、Codex、Cursor、Copilot CLI、Copilot VS Code、Gemini CLI、Antigravity、Amp、Kimi Code、Qwen Code、Droid、OpenCode、Pi)
|
|
7
7
|
- 通过 Anthropic Admin API 导入历史用量
|
|
8
8
|
- 生成本地用量报告(最近 7 天、30 天、90 天或全部历史)
|
|
9
9
|
- 定时自动同步数据到 AIUsage Worker
|
|
@@ -41,7 +41,7 @@ aiusage project alias # 查看所有已配置的别名
|
|
|
41
41
|
aiusage project alias --remove myapp # 移除别名
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
扫描所有已支持 AI 工具的数据目录,列出发现的项目及其别名和来源。
|
|
45
45
|
|
|
46
46
|
项目别名在上传前本地解析。两台设备对各自项目目录设置相同的别名,服务端会将其合并为一个项目。
|
|
47
47
|
|
|
@@ -162,12 +162,19 @@ aiusage doctor
|
|
|
162
162
|
```bash
|
|
163
163
|
aiusage config set lang zh # 默认语言: en 或 zh
|
|
164
164
|
aiusage config set emoji false # 禁用报告标题 emoji
|
|
165
|
-
aiusage config set device.alias "MacBook Pro 工作机"
|
|
166
|
-
aiusage config set privacy.projectVisibility masked
|
|
165
|
+
aiusage config set device.alias "MacBook Pro 工作机" # Dashboard 上显示的设备名称
|
|
166
|
+
aiusage config set privacy.projectVisibility masked # hidden | masked | plain
|
|
167
167
|
aiusage config set project.alias MyApp "我的应用" # 推荐用 aiusage project alias
|
|
168
168
|
aiusage config set anthropic-admin-key sk-ant-admin... # 用于 aiusage import
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
+
**设备别名**会在 Dashboard 上显示,用于区分多台设备。建议设置为容易辨认的名称:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
aiusage config set device.alias "💻 MacBook Pro"
|
|
175
|
+
aiusage config set device.alias "🖥️ iMac Studio"
|
|
176
|
+
```
|
|
177
|
+
|
|
171
178
|
CLI 标志(`--lang`、`--no-emoji`)会覆盖配置值(仅当次生效)。
|
|
172
179
|
|
|
173
180
|
## 配置
|