agy-powerline 1.1.1 → 1.3.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/README.md CHANGED
@@ -1,14 +1,20 @@
1
1
  # agy-powerline
2
2
 
3
+ **English** | [简体中文](README.zh-CN.md) | [日本語](README.ja.md) | [Français](README.fr.md)
4
+
3
5
  [![CI](https://github.com/wassim-azi/agy-powerline/actions/workflows/ci.yml/badge.svg)](https://github.com/wassim-azi/agy-powerline/actions/workflows/ci.yml)
4
6
  [![Version](https://img.shields.io/npm/v/agy-powerline.svg)](https://www.npmjs.com/package/agy-powerline)
7
+ [![Downloads](https://img.shields.io/npm/dt/agy-powerline.svg)](https://www.npmjs.com/package/agy-powerline)
5
8
  [![Node](https://img.shields.io/badge/node-%3E%3D20-informational.svg)](https://nodejs.org/)
9
+ [![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-informational.svg)](docs/install.md)
6
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
11
  [![Dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](#privacy-and-security)
12
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/wassim-azi/agy-powerline/badge)](https://scorecard.dev/viewer/?uri=github.com/wassim-azi/agy-powerline)
13
+ [![Mentioned in Awesome Gemini CLI](https://img.shields.io/badge/mentioned%20in-awesome-fc60a8.svg?logo=awesomelists&logoColor=white)](https://github.com/Piebald-AI/awesome-gemini-cli)
8
14
 
9
15
  **A fast, configurable statusline for Google Antigravity's CLI (`agy`).**
10
16
 
11
- See your model, Gemini 5h/7d quotas, context window, git branch and more at a glance. Pick widgets, themes and layout from an interactive editor. One command to install, no dependencies.
17
+ See your model, Gemini 5h/7d, Claude/GPT and Argon quotas, context window, git branch and more at a glance. Pick widgets, themes and layout from an interactive editor. One command to install, no dependencies.
12
18
 
13
19
  <p align="center">
14
20
  <img src="assets/screenshots/pills-dark.png" alt="agy-powerline Pills layout with the dark-ocean theme: agent state, model, plan, project and git; context; 5h and 7d quotas with resets" width="850">
@@ -24,7 +30,26 @@ npx agy-powerline configure # optional: pick widgets, theme and layout
24
30
  agy # start Antigravity
25
31
  ```
26
32
 
27
- `init` asks before replacing anything and backs up Antigravity's `settings.json` first. Restart `agy` once after `init`. Details: [what `init` does](docs/install.md).
33
+ On a first install `init` asks for a preset, a layout and a theme, with a preview of each; add `--yes` to skip the questions. It asks before replacing anything and backs up Antigravity's `settings.json` first. Restart `agy` once after `init`. Details: [what `init` does](docs/install.md).
34
+
35
+ ### Install from inside agy
36
+
37
+ agy-powerline is also an agy plugin. Add it, then run its setup skill in an `agy` session; it runs `init` and `doctor` for you:
38
+
39
+ ```text
40
+ agy plugin install https://github.com/wassim-azi/agy-powerline
41
+ /agy-powerline-setup
42
+ ```
43
+
44
+ Restart `agy` once afterwards. Details: [the plugin route](docs/install.md#install-from-inside-agy-plugin).
45
+
46
+ Or paste this into an `agy` session.
47
+
48
+ ```text
49
+ Install the agy-powerline statusline: run `npx agy-powerline init --yes`, then tell me to restart agy.
50
+ ```
51
+
52
+ `--yes` skips the prompts, which agy can't answer, and replaces any existing `statusLine` after backing up `settings.json`.
28
53
 
29
54
  For a Nerd Font–free terminal, turn on ASCII mode (`i` in `configure`).
30
55
 
@@ -32,6 +57,8 @@ For a Nerd Font–free terminal, turn on ASCII mode (`i` in `configure`).
32
57
 
33
58
  `npx agy-powerline configure` opens an editor with a live preview of your bar. Use `←` `→` to switch between Widgets, Presets, Themes, Layout and Powerline, `↑` `↓` to move, Enter to pick, `q` to save and quit. The keys for each screen are shown at the bottom; the full list is in [Configuration](docs/configuration.md#configurator-keys).
34
59
 
60
+ Prefer a browser? [Build your bar in the browser](https://agy-powerline.com/configure/) with live previews, then download or import it.
61
+
35
62
  Changes apply to a running `agy` on its next refresh.
36
63
 
37
64
  ### Presets
@@ -43,19 +70,19 @@ Start from a preset, then adjust:
43
70
  | `default` | Model, context, git; 5h and 7d quotas with resets on a second row |
44
71
  | `compact` | One line: short model, tightest quota, context %, git |
45
72
  | `workspace` | Project, git, agent state, model; context, tightest quota and mode |
46
- | `limits` | Every quota (5h, 7d, third-party), one per row |
73
+ | `limits` | Every quota (5h, 7d, third-party, Argon), one per row |
47
74
  | `full` | Everything: session, project and git; context, tokens and cache; both quotas |
48
75
 
49
76
  ### Themes
50
77
 
51
- | Terminal background | Themes |
52
- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
53
- | Dark | `dark-aurora` (default), `dark-ocean`, `dark-ember`, `dark-forest`, `dark-neon`, `dark-mono`, `dark-nocturne`, `dark-onyx`, `dark-metro` |
54
- | Light | `light-paper`, `light-sky`, `light-sunset`, `light-cream` |
55
- | Color-blind safe | `colorblind-dark`, `colorblind-light` |
56
- | Your own colors | `custom` ([how](docs/configuration.md#custom-theme)) |
78
+ | Terminal background | Themes |
79
+ | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
80
+ | Dark | `dark-aurora` (default), `dark-ocean`, `dark-ember`, `dark-forest`, `dark-neon`, `dark-mono`, `dark-nocturne`, `dark-onyx`, `dark-metro`, `dark-macchiato` |
81
+ | Light | `light-paper`, `light-sky`, `light-sunset`, `light-cream` |
82
+ | Color-blind safe | `colorblind-dark`, `colorblind-light` |
83
+ | Your own colors | `custom` ([how](docs/configuration.md#custom-theme)) |
57
84
 
58
- Preview them all with `npx agy-powerline theme --gallery`.
85
+ Preview them all in the [theme gallery](https://agy-powerline.com/) or with `npx agy-powerline theme --gallery`. For one color sweep across each row, add a gradient: `npx agy-powerline gradient <name>` with `aurora`, `sunset`, `ocean`, `forest`, `neon`, `candy`, `rainbow`, `mono` or your own colors ([how](docs/configuration.md#gradients)).
59
86
 
60
87
  ### Layouts
61
88
 
@@ -74,24 +101,27 @@ Preview them all with `npx agy-powerline theme --gallery`.
74
101
 
75
102
  ## Widgets
76
103
 
77
- | Widget | Shows |
78
- | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
79
- | `model` | The model in use |
80
- | `fiveHourBar`, `weeklyBar` | 5h / 7d quota left as a meter, with a [pace marker](docs/configuration.md#quota-pace-marker) |
81
- | `fiveHourPct`, `weeklyPct` | 5h / 7d quota left as a percentage |
82
- | `fiveHourReset`, `weeklyReset` | Time until the quota resets, or the reset time |
83
- | `quota` | The quota closest to running out, with its reset |
84
- | `thirdPartyFiveHour`, `thirdPartyWeekly` | Third-party model quotas |
85
- | `context`, `contextPct`, `contextTokens` | Context window used: meter, percentage or token counts |
86
- | `git` | Branch, uncommitted changes and ahead/behind |
87
- | `project`, `cwd` | Project folder, current folder |
88
- | `agentState`, `plan`, `sandbox`, `artifacts`, `version` | What the agent is doing, your plan, sandbox, artifacts, CLI version |
89
- | `tasks` | Running subagents and background tasks |
90
- | `mode` | Approval mode (e.g. accept-edits) and Vim mode |
91
- | `title` | The conversation's title |
92
- | `totalTokens`, `cacheHit`, `cacheRead`, `cacheCreate` | Session tokens and prompt cache usage |
93
- | `ram` | Memory used on your machine |
94
- | `customText`, `exec` | Your own text, or the output of a [shell command](docs/configuration.md#shell-command-widget-exec) |
104
+ | Widget | Shows |
105
+ | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
106
+ | `model` | The model in use |
107
+ | `fiveHourBar`, `weeklyBar` | 5h / 7d quota left as a meter, with a [pace marker](docs/configuration.md#quota-pace-marker) |
108
+ | `fiveHourPct`, `weeklyPct` | 5h / 7d quota left as a percentage |
109
+ | `fiveHourReset`, `weeklyReset` | Time until the quota resets, or the reset time |
110
+ | `quota` | The quota closest to running out, with its reset |
111
+ | `thirdPartyFiveHour`, `thirdPartyWeekly` | Third-party model quotas |
112
+ | `argonWeekly`, `argonReset` | Gemini 4 Argon's own weekly quota (Google AI Pro) and its reset |
113
+ | `context`, `contextPct`, `contextTokens` | Context window used: meter, percentage or token counts |
114
+ | `git` | Branch, uncommitted changes and ahead/behind |
115
+ | `gitChanges`, `gitFiles`, `gitSha`, `gitStash`, `gitWorktree` | Lines added and removed, staged/modified/untracked/conflicted files, commit ID, stashes, linked worktree |
116
+ | `project`, `cwd` | Project folder, current folder |
117
+ | `agentState`, `plan`, `sandbox`, `artifacts`, `version` | What the agent is doing, your plan, sandbox, artifacts, CLI version |
118
+ | `tasks` | Running subagents and background tasks |
119
+ | `mode` | Approval mode (e.g. accept-edits) and Vim mode |
120
+ | `title` | The conversation's title |
121
+ | `totalTokens`, `cacheHit`, `cacheRead`, `cacheCreate` | Session tokens and prompt cache usage |
122
+ | `tokensToday`, `tokensWeek` | Tokens used today and over the last 7 days, all conversations (Node 22.13+) |
123
+ | `ram` | Memory used on your machine |
124
+ | `customText`, `exec` | Your own text, or the output of a [shell command](docs/configuration.md#shell-command-widget-exec) |
95
125
 
96
126
  A widget with nothing to show hides itself. Widgets can be recolored, made label-free or given their own alert thresholds: see [Configuration](docs/configuration.md).
97
127
 
@@ -103,8 +133,11 @@ A widget with nothing to show hides itself. Widgets can be recolored, made label
103
133
  | `npx agy-powerline configure` | Open the editor (alias `config`) |
104
134
  | `npx agy-powerline preset <name>` | Apply a preset (`--list` to see them) |
105
135
  | `npx agy-powerline theme <name>` | Switch theme (`--list`, `--gallery`) |
136
+ | `npx agy-powerline gradient <name>` | Color each row with a gradient (`--list`, `off`) |
106
137
  | `npx agy-powerline layout <pills\|lines>` | Switch layout |
107
138
  | `npx agy-powerline caps <style>` | Switch the pill shape: `round`, `angled`, `slanted`, `flat` |
139
+ | `npx agy-powerline export [file]` | Save your config to a file, to back it up or share it |
140
+ | `npx agy-powerline import <file>` | Load a config, after showing what changes (`--merge`) |
108
141
  | `npx agy-powerline doctor` | Check the install and explain what's wrong |
109
142
  | `npx agy-powerline report` | Write a privacy-safe bug report |
110
143
  | `npx agy-powerline uninstall [--delete]` | Remove it from agy (`--delete` also removes its files) |
@@ -129,14 +162,39 @@ Run `npx agy-powerline doctor` first: it checks the install and tells you how to
129
162
 
130
163
  - **No network calls, no telemetry.** Everything comes from the data agy passes to the bar, from `.git` and from your OS. The only link out is `g` in `configure`, which opens the GitHub page in your browser.
131
164
  - **Your settings are safe.** `init` and `uninstall` back up `settings.json` and refuse to edit a file they can't parse.
132
- - **Nothing runs unless you add it.** Apart from a quick `git` call for ahead/behind counts, the only commands the bar runs are `exec` widgets you configure yourself.
165
+ - **Nothing runs unless you add it.** Apart from quick `git` calls for ahead/behind counts and for the file and line counts of the git widgets you add, the only commands the bar runs are `exec` widgets you configure yourself.
133
166
  - **Zero runtime dependencies**, published from CI with [npm provenance](https://docs.npmjs.com/generating-provenance-statements).
134
167
 
135
168
  Full details: [SECURITY.md](SECURITY.md).
136
169
 
137
170
  ## Contributing
138
171
 
139
- Contributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md) (setup, architecture, adding a widget or theme) and the [Code of Conduct](CODE_OF_CONDUCT.md). Open pull requests against `develop`. Report bugs and ask questions in [GitHub issues](https://github.com/wassim-azi/agy-powerline/issues).
172
+ Contributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md) (setup, architecture, adding a widget or theme) and the [Code of Conduct](CODE_OF_CONDUCT.md). Open pull requests against `develop`. Report bugs in [GitHub issues](https://github.com/wassim-azi/agy-powerline/issues) or share ideas and feedback in [Discussions](https://github.com/wassim-azi/agy-powerline/discussions).
173
+
174
+ Thanks to everyone who has contributed:
175
+
176
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
177
+ <!-- prettier-ignore-start -->
178
+ <!-- markdownlint-disable -->
179
+ <table>
180
+ <tbody>
181
+ <tr>
182
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/yatharth2soni"><img src="https://avatars.githubusercontent.com/u/238868599?v=4&s=160" width="80" height="80" alt="Yatharth Soni"/><br /><sub><b>Yatharth Soni</b></sub></a></td>
183
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/dannyward630"><img src="https://avatars.githubusercontent.com/u/71604164?v=4&s=160" width="80" height="80" alt="Danny Ward"/><br /><sub><b>Danny Ward</b></sub></a></td>
184
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/yoreva-01"><img src="https://avatars.githubusercontent.com/u/195282707?v=4&s=160" width="80" height="80" alt="Yusuf Orçan"/><br /><sub><b>Yusuf Orçan</b></sub></a></td>
185
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/yuefdev"><img src="https://avatars.githubusercontent.com/u/120668197?v=4&s=160" width="80" height="80" alt="Yusuf Efe"/><br /><sub><b>Yusuf Efe</b></sub></a></td>
186
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/hiyouwhatsapp"><img src="https://avatars.githubusercontent.com/u/89997383?v=4&s=160" width="80" height="80" alt="hiyouwhatsapp"/><br /><sub><b>hiyouwhatsapp</b></sub></a></td>
187
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/dharamdan01"><img src="https://avatars.githubusercontent.com/u/188893946?v=4&s=160" width="80" height="80" alt="dharamdan01"/><br /><sub><b>dharamdan01</b></sub></a></td>
188
+ </tr>
189
+ </tbody>
190
+ </table>
191
+
192
+ <!-- markdownlint-restore -->
193
+ <!-- prettier-ignore-end -->
194
+
195
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
196
+
197
+ If agy-powerline is useful to you, a ⭐ helps other agy users find it.
140
198
 
141
199
  ## License
142
200
 
@@ -0,0 +1,190 @@
1
+ # agy-powerline
2
+
3
+ [English](README.md) | **简体中文** | [日本語](README.ja.md) | [Français](README.fr.md)
4
+
5
+ [![CI](https://github.com/wassim-azi/agy-powerline/actions/workflows/ci.yml/badge.svg)](https://github.com/wassim-azi/agy-powerline/actions/workflows/ci.yml)
6
+ [![Version](https://img.shields.io/npm/v/agy-powerline.svg)](https://www.npmjs.com/package/agy-powerline)
7
+ [![Downloads](https://img.shields.io/npm/dt/agy-powerline.svg)](https://www.npmjs.com/package/agy-powerline)
8
+ [![Node](https://img.shields.io/badge/node-%3E%3D20-informational.svg)](https://nodejs.org/)
9
+ [![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-informational.svg)](docs/install.md)
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
11
+ [![Dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](#隐私与安全)
12
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/wassim-azi/agy-powerline/badge)](https://scorecard.dev/viewer/?uri=github.com/wassim-azi/agy-powerline)
13
+ [![Mentioned in Awesome Gemini CLI](https://img.shields.io/badge/mentioned%20in-awesome-fc60a8.svg?logo=awesomelists&logoColor=white)](https://github.com/Piebald-AI/awesome-gemini-cli)
14
+
15
+ > 本文译自英文版 [README](README.md),可能落后于英文版;如有出入,以英文版为准。详细文档([`docs/`](docs/))仅提供英文版。
16
+
17
+ **为 Google Antigravity CLI(`agy`)打造的快速、可配置的状态栏。**
18
+
19
+ 一眼看到当前模型、Gemini 5h/7d、Claude/GPT 和 Argon 配额、上下文窗口、git 分支等信息。在交互式编辑器中挑选组件、主题和布局。一条命令即可安装,零依赖。
20
+
21
+ <p align="center">
22
+ <img src="assets/screenshots/pills-dark.png" alt="agy-powerline 的 Pills 布局,dark-ocean 主题:代理状态、模型、套餐、项目和 git;上下文;5h 和 7d 配额及重置时间" width="850">
23
+ </p>
24
+
25
+ ## 安装
26
+
27
+ 需要 [Node.js](https://nodejs.org/) 20+ 和 [Antigravity CLI](https://antigravity.google/docs/cli/overview)。支持 Windows、macOS、Linux 和 WSL([WSL 说明](docs/install.md#wsl))。
28
+
29
+ ```bash
30
+ npx agy-powerline init # 将状态栏安装到 agy
31
+ npx agy-powerline configure # 可选:挑选组件、主题和布局
32
+ agy # 启动 Antigravity
33
+ ```
34
+
35
+ `init` 在替换任何内容之前都会先询问,并会先备份 Antigravity 的 `settings.json`。运行 `init` 后需重启一次 `agy`。详情:[`init` 做了什么](docs/install.md)。
36
+
37
+ 也可以让 agy 帮你安装:把下面这段话粘贴到 `agy` 会话中。
38
+
39
+ ```text
40
+ Install the agy-powerline statusline: run `npx agy-powerline init --yes`, then tell me to restart agy.
41
+ ```
42
+
43
+ `--yes` 会跳过 agy 无法回答的确认提示,并在备份 `settings.json` 后替换已有的 `statusLine`。
44
+
45
+ 如果终端没有 Nerd Font,可以开启 ASCII 模式(在 `configure` 中按 `i`)。
46
+
47
+ ## 自定义
48
+
49
+ `npx agy-powerline configure` 会打开一个带有状态栏实时预览的编辑器。用 `←` `→` 在 Widgets、Presets、Themes、Layout 和 Powerline 之间切换,`↑` `↓` 移动,Enter 选择,`q` 保存并退出。每个界面的按键都显示在底部;完整列表见 [Configuration](docs/configuration.md#configurator-keys)。
50
+
51
+ 正在运行的 `agy` 会在下次刷新时应用更改。
52
+
53
+ ### 预设
54
+
55
+ 从一个预设开始,再按需调整:
56
+
57
+ | 预设 | 显示内容 |
58
+ | ----------- | ------------------------------------------------------ |
59
+ | `default` | 模型、上下文、git;第二行显示 5h 和 7d 配额及重置时间 |
60
+ | `compact` | 单行:简短模型名、最紧张的配额、上下文 %、git |
61
+ | `workspace` | 项目、git、代理状态、模型;上下文、最紧张的配额和模式 |
62
+ | `limits` | 所有配额(5h、7d、第三方、Argon),每行一个 |
63
+ | `full` | 全部:会话、项目和 git;上下文、token 和缓存;两组配额 |
64
+
65
+ ### 主题
66
+
67
+ | 终端背景 | 主题 |
68
+ | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
69
+ | 深色 | `dark-aurora`(默认)、`dark-ocean`、`dark-ember`、`dark-forest`、`dark-neon`、`dark-mono`、`dark-nocturne`、`dark-onyx`、`dark-metro`、`dark-macchiato` |
70
+ | 浅色 | `light-paper`、`light-sky`、`light-sunset`、`light-cream` |
71
+ | 色盲友好 | `colorblind-dark`、`colorblind-light` |
72
+ | 自定义颜色 | `custom`([方法](docs/configuration.md#custom-theme)) |
73
+
74
+ 用 `npx agy-powerline theme --gallery` 预览所有主题。
75
+
76
+ ### 布局
77
+
78
+ **Pills**(默认):powerline 风格的胶囊。可选圆角、尖角、斜角或平直形状,也可以在行与行之间留一个空行。
79
+
80
+ <p align="center">
81
+ <img src="assets/screenshots/pills-light.png" alt="agy-powerline 的 Pills 布局,浅色终端上的 light-sky 主题,行间留空" width="850">
82
+ </p>
83
+
84
+ **Lines**:以纯彩色文本显示相同的信息。
85
+
86
+ <p align="center">
87
+ <img src="assets/screenshots/lines-dark.png" alt="agy-powerline 的 Lines 布局,深色终端上的 dark-ocean 主题" width="850">
88
+ <img src="assets/screenshots/lines-light.png" alt="agy-powerline 的 Lines 布局,浅色终端上的 light-sky 主题" width="850">
89
+ </p>
90
+
91
+ ## 组件
92
+
93
+ | 组件 | 显示内容 |
94
+ | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
95
+ | `model` | 当前使用的模型 |
96
+ | `fiveHourBar`、`weeklyBar` | 以进度条显示 5h / 7d 剩余配额,带[进度标记](docs/configuration.md#quota-pace-marker) |
97
+ | `fiveHourPct`、`weeklyPct` | 以百分比显示 5h / 7d 剩余配额 |
98
+ | `fiveHourReset`、`weeklyReset` | 距配额重置的时间,或重置时刻 |
99
+ | `quota` | 最接近用完的配额及其重置时间 |
100
+ | `thirdPartyFiveHour`、`thirdPartyWeekly` | 第三方模型的配额 |
101
+ | `argonWeekly`、`argonReset` | Gemini 4 Argon 独立的每周配额(Google AI Pro)及其重置时间 |
102
+ | `context`、`contextPct`、`contextTokens` | 已用的上下文窗口:进度条、百分比或 token 数 |
103
+ | `git` | 分支、未提交的更改以及领先/落后的提交数 |
104
+ | `gitChanges`, `gitFiles`, `gitSha`, `gitStash`, `gitWorktree` | Lines added and removed, staged/modified/untracked/conflicted files, commit ID, stashes, linked worktree |
105
+ | `project`、`cwd` | 项目文件夹、当前文件夹 |
106
+ | `agentState`、`plan`、`sandbox`、`artifacts`、`version` | 代理正在做什么、你的套餐、沙箱、产物、CLI 版本 |
107
+ | `tasks` | 正在运行的子代理和后台任务 |
108
+ | `mode` | 审批模式(如 accept-edits)和 Vim 模式 |
109
+ | `title` | 对话标题 |
110
+ | `totalTokens`、`cacheHit`、`cacheRead`、`cacheCreate` | 会话 token 数和提示缓存的使用情况 |
111
+ | `tokensToday`、`tokensWeek` | 今天和过去 7 天的 token 用量(所有对话,Node 22.13+) |
112
+ | `ram` | 本机已用内存 |
113
+ | `customText`、`exec` | 你自己的文本,或 [shell 命令](docs/configuration.md#shell-command-widget-exec)的输出 |
114
+
115
+ 没有内容可显示的组件会自动隐藏。组件可以更改颜色、去掉标签,或设置自己的告警阈值:见 [Configuration](docs/configuration.md)。
116
+
117
+ ## 命令
118
+
119
+ | 命令 | 作用 |
120
+ | ----------------------------------------- | ----------------------------------------------------- |
121
+ | `npx agy-powerline init [--yes]` | 安装或更新状态栏 |
122
+ | `npx agy-powerline configure` | 打开编辑器(别名 `config`) |
123
+ | `npx agy-powerline preset <name>` | 应用预设(`--list` 查看全部) |
124
+ | `npx agy-powerline theme <name>` | 切换主题(`--list`、`--gallery`) |
125
+ | `npx agy-powerline gradient <name>` | Color each row with a gradient (`--list`, `off`) |
126
+ | `npx agy-powerline layout <pills\|lines>` | 切换布局 |
127
+ | `npx agy-powerline caps <style>` | 切换胶囊形状:`round`、`angled`、`slanted`、`flat` |
128
+ | `npx agy-powerline export [file]` | Save your config to a file, to back it up or share it |
129
+ | `npx agy-powerline import <file>` | Load a config, after showing what changes (`--merge`) |
130
+ | `npx agy-powerline doctor` | 检查安装并说明问题所在 |
131
+ | `npx agy-powerline report` | 生成保护隐私的错误报告 |
132
+ | `npx agy-powerline uninstall [--delete]` | 从 agy 中移除(`--delete` 会同时删除其文件) |
133
+ | `npx agy-powerline render --demo` | 用示例数据打印状态栏 |
134
+
135
+ 任何命令加上 `--help` 即可查看其选项。
136
+
137
+ ## 更新
138
+
139
+ ```bash
140
+ npx agy-powerline init --yes # 安装新版本的脚本
141
+ npx agy-powerline doctor # 检查一切是否为最新
142
+ ```
143
+
144
+ 你的设置会被保留。更新后请重启 `agy`。
145
+
146
+ ## 故障排查
147
+
148
+ 请先运行 `npx agy-powerline doctor`:它会检查安装,并告诉你如何修复发现的问题。常见问题以及如何报告错误:[Troubleshooting](docs/troubleshooting.md)。
149
+
150
+ ## 隐私与安全
151
+
152
+ - **无网络请求,无遥测。** 所有信息都来自 agy 传给状态栏的数据、`.git` 和你的操作系统。唯一的对外链接是 `configure` 中的 `g`,它会在浏览器中打开 GitHub 页面。
153
+ - **你的设置是安全的。** `init` 和 `uninstall` 会备份 `settings.json`,并拒绝编辑无法解析的文件。
154
+ - **你不添加,就不会运行任何命令。** 除了一次用于计算领先/落后提交数的快速 `git` 调用外,状态栏只会运行你自己配置的 `exec` 组件。
155
+ - **零运行时依赖**,通过 CI 发布并附带 [npm provenance](https://docs.npmjs.com/generating-provenance-statements)。
156
+
157
+ 完整说明:[SECURITY.md](SECURITY.md)。
158
+
159
+ ## 参与贡献
160
+
161
+ 欢迎贡献。请先阅读 [CONTRIBUTING.md](CONTRIBUTING.md)(环境搭建、架构、添加组件或主题)和 [Code of Conduct](CODE_OF_CONDUCT.md)。Pull request 请提交到 `develop` 分支。在 [GitHub issues](https://github.com/wassim-azi/agy-powerline/issues) 中报告错误,或在 [Discussions](https://github.com/wassim-azi/agy-powerline/discussions) 中分享想法和反馈。
162
+
163
+ 感谢所有贡献者:
164
+
165
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
166
+ <!-- prettier-ignore-start -->
167
+ <!-- markdownlint-disable -->
168
+ <table>
169
+ <tbody>
170
+ <tr>
171
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/yatharth2soni"><img src="https://avatars.githubusercontent.com/u/238868599?v=4&s=160" width="80" height="80" alt="Yatharth Soni"/><br /><sub><b>Yatharth Soni</b></sub></a></td>
172
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/dannyward630"><img src="https://avatars.githubusercontent.com/u/71604164?v=4&s=160" width="80" height="80" alt="Danny Ward"/><br /><sub><b>Danny Ward</b></sub></a></td>
173
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/yoreva-01"><img src="https://avatars.githubusercontent.com/u/195282707?v=4&s=160" width="80" height="80" alt="Yusuf Orçan"/><br /><sub><b>Yusuf Orçan</b></sub></a></td>
174
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/yuefdev"><img src="https://avatars.githubusercontent.com/u/120668197?v=4&s=160" width="80" height="80" alt="Yusuf Efe"/><br /><sub><b>Yusuf Efe</b></sub></a></td>
175
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/hiyouwhatsapp"><img src="https://avatars.githubusercontent.com/u/89997383?v=4&s=160" width="80" height="80" alt="hiyouwhatsapp"/><br /><sub><b>hiyouwhatsapp</b></sub></a></td>
176
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/dharamdan01"><img src="https://avatars.githubusercontent.com/u/188893946?v=4&s=160" width="80" height="80" alt="dharamdan01"/><br /><sub><b>dharamdan01</b></sub></a></td>
177
+ </tr>
178
+ </tbody>
179
+ </table>
180
+
181
+ <!-- markdownlint-restore -->
182
+ <!-- prettier-ignore-end -->
183
+
184
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
185
+
186
+ 如果 agy-powerline 对你有用,点个 ⭐ 能帮助更多 agy 用户发现它。
187
+
188
+ ## 许可证
189
+
190
+ [MIT](LICENSE) © Wassim AZI
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agy-powerline",
3
- "version": "1.1.1",
4
- "description": "Interactive statusline for Google Antigravity",
3
+ "version": "1.3.0",
4
+ "description": "Fast, configurable statusline for Google Antigravity CLI (agy): live Gemini, Claude/GPT and Argon quota pacing, git, and an interactive TUI configurator",
5
5
  "bin": {
6
6
  "agy-powerline": "src/index.js"
7
7
  },
@@ -35,6 +35,7 @@
35
35
  "test:update": "node tests/update-snapshots.js",
36
36
  "test:coverage": "node --test --experimental-test-coverage tests/shared.js",
37
37
  "gallery": "node scripts/gallery/build.js",
38
+ "configurator": "node scripts/configurator/build.js",
38
39
  "lint": "eslint .",
39
40
  "lint:fix": "eslint . --fix",
40
41
  "format": "prettier --write .",
@@ -43,13 +44,21 @@
43
44
  },
44
45
  "keywords": [
45
46
  "antigravity",
47
+ "antigravity-cli",
48
+ "google-antigravity",
49
+ "agy",
50
+ "agy-cli",
46
51
  "agy-powerline",
47
52
  "statusline",
48
53
  "status-line",
49
54
  "powerline",
50
55
  "cli",
51
56
  "terminal",
52
- "gemini"
57
+ "tui",
58
+ "gemini",
59
+ "quota",
60
+ "nerd-fonts",
61
+ "windows"
53
62
  ],
54
63
  "license": "MIT",
55
64
  "engines": {
@@ -63,6 +72,6 @@
63
72
  "@eslint/js": "10.0.1",
64
73
  "eslint": "10.12.0",
65
74
  "globals": "17.13.0",
66
- "prettier": "3.9.9"
75
+ "prettier": "3.9.10"
67
76
  }
68
77
  }
package/src/cli/caps.js CHANGED
@@ -1,3 +1,5 @@
1
+ "use strict";
2
+
1
3
  const {
2
4
  saveConfig,
3
5
  setConfigDir,