agy-powerline 1.2.0 → 1.4.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/CHANGELOG.md +72 -0
- package/README.fr.md +243 -0
- package/README.ja.md +144 -49
- package/README.md +160 -52
- package/README.zh-CN.md +144 -49
- package/package.json +5 -2
- package/src/cli/caps.js +2 -0
- package/src/cli/configure.js +70 -172
- package/src/cli/doctor.js +12 -0
- package/src/cli/export.js +82 -0
- package/src/cli/gradient.js +121 -0
- package/src/cli/import.js +273 -0
- package/src/cli/init.js +186 -7
- package/src/cli/layout.js +2 -0
- package/src/cli/preset.js +2 -0
- package/src/cli/repo-url.js +7 -0
- package/src/cli/theme.js +2 -0
- package/src/cli/uninstall.js +6 -2
- package/src/index.js +53 -1
- package/src/lib/catalog.js +54 -2
- package/src/lib/colors.js +144 -14
- package/src/lib/config-check.js +74 -0
- package/src/lib/config.js +89 -21
- package/src/lib/exec.js +140 -21
- package/src/lib/fit.js +7 -0
- package/src/lib/formatters.js +67 -0
- package/src/lib/git.js +385 -4
- package/src/lib/layouts/lines.js +175 -28
- package/src/lib/layouts/pills.js +232 -33
- package/src/lib/paths.js +73 -13
- package/src/lib/prompt.js +30 -0
- package/src/lib/run.js +2 -0
- package/src/lib/session.js +17 -3
- package/src/lib/shared.js +13 -2
- package/src/lib/themes.js +79 -5
- package/src/lib/usage.js +524 -0
- package/src/lib/widget-options.js +194 -0
- package/src/lib/widget-style.js +45 -0
- package/src/runtime/statusline.js +15 -1
package/README.md
CHANGED
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
# agy-powerline
|
|
2
2
|
|
|
3
|
-
**English** | [简体中文](README.zh-CN.md) | [日本語](README.ja.md)
|
|
3
|
+
**English** | [简体中文](README.zh-CN.md) | [日本語](README.ja.md) | [Français](README.fr.md)
|
|
4
4
|
|
|
5
5
|
[](https://github.com/wassim-azi/agy-powerline/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/wassim-azi/agy-powerline/actions/workflows/codeql.yml)
|
|
6
7
|
[](https://www.npmjs.com/package/agy-powerline)
|
|
8
|
+
[](https://www.npmjs.com/package/agy-powerline)
|
|
9
|
+
[](https://github.com/wassim-azi/agy-powerline/stargazers)
|
|
10
|
+
[](https://agy-powerline.com/configure/)
|
|
7
11
|
[](https://nodejs.org/)
|
|
12
|
+
[](docs/install.md)
|
|
13
|
+
[](docs/install.md)
|
|
14
|
+
[](docs/install.md)
|
|
8
15
|
[](https://opensource.org/licenses/MIT)
|
|
9
16
|
[](#privacy-and-security)
|
|
17
|
+
[](https://scorecard.dev/viewer/?uri=github.com/wassim-azi/agy-powerline)
|
|
18
|
+
[](https://www.bestpractices.dev/projects/15655)
|
|
19
|
+
[](https://github.com/Piebald-AI/awesome-gemini-cli)
|
|
10
20
|
|
|
11
21
|
**A fast, configurable statusline for Google Antigravity's CLI (`agy`).**
|
|
12
22
|
|
|
13
23
|
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.
|
|
14
24
|
|
|
15
25
|
<p align="center">
|
|
16
|
-
<img src="assets/
|
|
26
|
+
<img src="assets/demo.gif" alt="agy-powerline configure: add Argon's weekly quota by typing argon, then browse the presets, themes and layouts with a live preview of the bar, and open the Powerline tab" width="850">
|
|
17
27
|
</p>
|
|
18
28
|
|
|
19
29
|
## Install
|
|
@@ -26,7 +36,35 @@ npx agy-powerline configure # optional: pick widgets, theme and layout
|
|
|
26
36
|
agy # start Antigravity
|
|
27
37
|
```
|
|
28
38
|
|
|
29
|
-
`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).
|
|
39
|
+
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).
|
|
40
|
+
|
|
41
|
+
<details>
|
|
42
|
+
<summary>Screenshot: the bar in a real agy session (Windows Terminal)</summary>
|
|
43
|
+
|
|
44
|
+
<p align="center">
|
|
45
|
+
<img src="assets/screenshots/windows.png" alt="agy-powerline under agy's input box in Windows Terminal: a short conversation above, the three-row Pills bar below" width="850">
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
</details>
|
|
49
|
+
|
|
50
|
+
### Install from inside agy
|
|
51
|
+
|
|
52
|
+
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:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
agy plugin install https://github.com/wassim-azi/agy-powerline
|
|
56
|
+
/agy-powerline-setup
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Restart `agy` once afterwards. Details: [the plugin route](docs/install.md#install-from-inside-agy-plugin).
|
|
60
|
+
|
|
61
|
+
Or paste this into an `agy` session.
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
Install the agy-powerline statusline: run `npx agy-powerline init --yes`, then tell me to restart agy.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`--yes` skips the prompts, which agy can't answer, and replaces any existing `statusLine` after backing up `settings.json`.
|
|
30
68
|
|
|
31
69
|
For a Nerd Font–free terminal, turn on ASCII mode (`i` in `configure`).
|
|
32
70
|
|
|
@@ -34,84 +72,125 @@ For a Nerd Font–free terminal, turn on ASCII mode (`i` in `configure`).
|
|
|
34
72
|
|
|
35
73
|
`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).
|
|
36
74
|
|
|
75
|
+
Prefer a browser? [Build your bar in the browser](https://agy-powerline.com/configure/) with live previews, then download or import it.
|
|
76
|
+
|
|
37
77
|
Changes apply to a running `agy` on its next refresh.
|
|
38
78
|
|
|
39
79
|
### Presets
|
|
40
80
|
|
|
41
81
|
Start from a preset, then adjust:
|
|
42
82
|
|
|
43
|
-
| Preset
|
|
44
|
-
|
|
|
45
|
-
| `default`
|
|
46
|
-
| `compact`
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
83
|
+
| Preset | Shows |
|
|
84
|
+
| --------- | ----------------------------------------------------------------------------------------- |
|
|
85
|
+
| `default` | Model, context, git; 5h and 7d quotas with resets on a second row |
|
|
86
|
+
| `compact` | One line: short model, tightest quota, context %, git |
|
|
87
|
+
| `agent` | Agent state, subagents, title, mode, sandbox; model, context %, artifacts, tightest quota |
|
|
88
|
+
| `git` | Project, branch, worktree, stash; file counts, line changes, commit |
|
|
89
|
+
| `tokens` | Context tokens, session tokens in/out, cache hit; tokens today and over 7 days |
|
|
90
|
+
| `quotas` | Plan and model; 5h and 7d quotas side by side; third-party and Argon on a third row |
|
|
91
|
+
| `full` | Everything: session, project and git; context, tokens and cache; both quotas |
|
|
50
92
|
|
|
51
93
|
### Themes
|
|
52
94
|
|
|
53
|
-
| Terminal background | Themes
|
|
54
|
-
| ------------------- |
|
|
55
|
-
| Dark | `dark-aurora` (default), `dark-ocean`, `dark-ember`, `dark-forest`, `dark-neon`, `dark-mono`, `dark-nocturne`, `dark-onyx`, `dark-metro` |
|
|
56
|
-
| Light | `light-paper`, `light-sky`, `light-sunset`, `light-cream`
|
|
57
|
-
| Color-blind safe | `colorblind-dark`, `colorblind-light`
|
|
58
|
-
| Your own colors | `custom` ([how](docs/configuration.md#custom-theme))
|
|
95
|
+
| Terminal background | Themes |
|
|
96
|
+
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
97
|
+
| Dark | `dark-aurora` (default), `dark-ocean`, `dark-ember`, `dark-forest`, `dark-neon`, `dark-mono`, `dark-nocturne`, `dark-onyx`, `dark-metro`, `dark-macchiato` |
|
|
98
|
+
| Light | `light-paper`, `light-sky`, `light-sunset`, `light-cream` |
|
|
99
|
+
| Color-blind safe | `colorblind-dark`, `colorblind-light` |
|
|
100
|
+
| Your own colors | `custom` ([how](docs/configuration.md#custom-theme)) |
|
|
59
101
|
|
|
60
|
-
Preview them all with `npx agy-powerline theme --gallery`.
|
|
102
|
+
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)).
|
|
61
103
|
|
|
62
104
|
### Layouts
|
|
63
105
|
|
|
64
106
|
**Pills** (default): powerline-style capsules. Choose round, angled, slanted or flat shapes, and optionally a blank line between rows.
|
|
65
107
|
|
|
66
108
|
<p align="center">
|
|
67
|
-
<img src="assets/screenshots/pills-
|
|
109
|
+
<img src="assets/screenshots/pills-dark.png" alt="agy-powerline Pills layout with the dark-aurora theme: model, context, project and git; Gemini 5h and 7d quotas with pace markers and resets; Claude/GPT and Argon weekly quotas" width="850">
|
|
110
|
+
</p>
|
|
111
|
+
|
|
112
|
+
<details>
|
|
113
|
+
<summary>On a light terminal</summary>
|
|
114
|
+
|
|
115
|
+
<p align="center">
|
|
116
|
+
<img src="assets/screenshots/pills-light.png" alt="agy-powerline Pills layout with the light-paper theme on a light terminal" width="850">
|
|
68
117
|
</p>
|
|
69
118
|
|
|
119
|
+
</details>
|
|
120
|
+
|
|
70
121
|
**Lines**: the same information as plain colored text.
|
|
71
122
|
|
|
72
123
|
<p align="center">
|
|
73
|
-
<img src="assets/screenshots/lines-dark.png" alt="agy-powerline Lines layout with the dark-
|
|
74
|
-
<img src="assets/screenshots/lines-light.png" alt="agy-powerline Lines layout with the light-sky theme on a light terminal" width="850">
|
|
124
|
+
<img src="assets/screenshots/lines-dark.png" alt="agy-powerline Lines layout with the dark-aurora theme on a dark terminal" width="850">
|
|
75
125
|
</p>
|
|
76
126
|
|
|
127
|
+
<details>
|
|
128
|
+
<summary>On a light terminal</summary>
|
|
129
|
+
|
|
130
|
+
<p align="center">
|
|
131
|
+
<img src="assets/screenshots/lines-light.png" alt="agy-powerline Lines layout with the light-paper theme on a light terminal" width="850">
|
|
132
|
+
</p>
|
|
133
|
+
|
|
134
|
+
</details>
|
|
135
|
+
|
|
136
|
+
**Classic**: plain colored text with `|` dividers and block meters, like `███░│░░░░░`.
|
|
137
|
+
|
|
138
|
+
<p align="center">
|
|
139
|
+
<img src="assets/screenshots/classic-dark.png" alt="agy-powerline Classic layout with the dark-aurora theme on a dark terminal, with block meters" width="850">
|
|
140
|
+
</p>
|
|
141
|
+
|
|
142
|
+
<details>
|
|
143
|
+
<summary>On a light terminal</summary>
|
|
144
|
+
|
|
145
|
+
<p align="center">
|
|
146
|
+
<img src="assets/screenshots/classic-light.png" alt="agy-powerline Classic layout with the light-paper theme on a light terminal" width="850">
|
|
147
|
+
</p>
|
|
148
|
+
|
|
149
|
+
</details>
|
|
150
|
+
|
|
77
151
|
## Widgets
|
|
78
152
|
|
|
79
|
-
| Widget
|
|
80
|
-
|
|
|
81
|
-
| `model`
|
|
82
|
-
| `fiveHourBar`, `weeklyBar`
|
|
83
|
-
| `fiveHourPct`, `weeklyPct`
|
|
84
|
-
| `fiveHourReset`, `weeklyReset`
|
|
85
|
-
| `quota`
|
|
86
|
-
| `thirdPartyFiveHour`, `thirdPartyWeekly`
|
|
87
|
-
| `argonWeekly`, `argonReset`
|
|
88
|
-
| `context`, `contextPct`, `contextTokens`
|
|
89
|
-
| `git`
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
95
|
-
| `
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
153
|
+
| Widget | Shows |
|
|
154
|
+
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
155
|
+
| `model` | The model in use |
|
|
156
|
+
| `fiveHourBar`, `weeklyBar` | 5h / 7d quota left as a meter, with a [pace marker](docs/configuration.md#quota-pace-marker) |
|
|
157
|
+
| `fiveHourPct`, `weeklyPct` | 5h / 7d quota left as a percentage |
|
|
158
|
+
| `fiveHourReset`, `weeklyReset` | Time until the quota resets, or the reset time |
|
|
159
|
+
| `quota` | The quota closest to running out, with its reset |
|
|
160
|
+
| `thirdPartyFiveHour`, `thirdPartyWeekly` | Third-party model quotas |
|
|
161
|
+
| `argonWeekly`, `argonReset` | Gemini 4 Argon's own weekly quota (Google AI Pro) and its reset |
|
|
162
|
+
| `context`, `contextPct`, `contextTokens` | Context window used: meter, percentage or token counts |
|
|
163
|
+
| `git` | Branch, uncommitted changes and ahead/behind |
|
|
164
|
+
| `gitChanges`, `gitFiles`, `gitSha`, `gitStash`, `gitWorktree` | Lines added and removed, staged/modified/untracked/conflicted files, commit ID, stashes, linked worktree |
|
|
165
|
+
| `project`, `cwd` | Project folder, current folder |
|
|
166
|
+
| `agentState`, `plan`, `sandbox`, `artifacts`, `version` | What the agent is doing, your plan, sandbox, artifacts, CLI version |
|
|
167
|
+
| `tasks` | Running subagents and background tasks |
|
|
168
|
+
| `mode` | Approval mode (e.g. accept-edits) and Vim mode |
|
|
169
|
+
| `title` | The conversation's title |
|
|
170
|
+
| `totalTokens`, `cacheHit`, `cacheRead`, `cacheCreate` | Session tokens and prompt cache usage |
|
|
171
|
+
| `tokensToday`, `tokensWeek` | Tokens used today and over the last 7 days, all conversations (Node 22.13+) |
|
|
172
|
+
| `ram` | Memory used on your machine |
|
|
173
|
+
| `customText`, `exec` | Your own text, or the output of a [shell command](docs/configuration.md#shell-command-widget-exec) |
|
|
98
174
|
|
|
99
175
|
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).
|
|
100
176
|
|
|
101
177
|
## Commands
|
|
102
178
|
|
|
103
|
-
| Command
|
|
104
|
-
|
|
|
105
|
-
| `npx agy-powerline init [--yes]`
|
|
106
|
-
| `npx agy-powerline configure`
|
|
107
|
-
| `npx agy-powerline preset <name>`
|
|
108
|
-
| `npx agy-powerline theme <name>`
|
|
109
|
-
| `npx agy-powerline
|
|
110
|
-
| `npx agy-powerline
|
|
111
|
-
| `npx agy-powerline
|
|
112
|
-
| `npx agy-powerline
|
|
113
|
-
| `npx agy-powerline
|
|
114
|
-
| `npx agy-powerline
|
|
179
|
+
| Command | What it does |
|
|
180
|
+
| -------------------------------------------------- | ----------------------------------------------------------- |
|
|
181
|
+
| `npx agy-powerline init [--yes]` | Install or update the statusline |
|
|
182
|
+
| `npx agy-powerline configure` | Open the editor (alias `config`) |
|
|
183
|
+
| `npx agy-powerline preset <name>` | Apply a preset (`--list` to see them) |
|
|
184
|
+
| `npx agy-powerline theme <name>` | Switch theme (`--list`, `--gallery`) |
|
|
185
|
+
| `npx agy-powerline gradient <name>` | Color each row with a gradient (`--list`, `off`) |
|
|
186
|
+
| `npx agy-powerline layout <pills\|lines\|classic>` | Switch layout |
|
|
187
|
+
| `npx agy-powerline caps <style>` | Switch the pill shape: `round`, `angled`, `slanted`, `flat` |
|
|
188
|
+
| `npx agy-powerline export [file]` | Save your config to a file, to back it up or share it |
|
|
189
|
+
| `npx agy-powerline import <file>` | Load a config, after showing what changes (`--merge`) |
|
|
190
|
+
| `npx agy-powerline doctor` | Check the install and explain what's wrong |
|
|
191
|
+
| `npx agy-powerline report` | Write a privacy-safe bug report |
|
|
192
|
+
| `npx agy-powerline uninstall [--delete]` | Remove it from agy (`--delete` also removes its files) |
|
|
193
|
+
| `npx agy-powerline render --demo` | Print the bar with sample data |
|
|
115
194
|
|
|
116
195
|
Run any command with `--help` for its options.
|
|
117
196
|
|
|
@@ -132,7 +211,7 @@ Run `npx agy-powerline doctor` first: it checks the install and tells you how to
|
|
|
132
211
|
|
|
133
212
|
- **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.
|
|
134
213
|
- **Your settings are safe.** `init` and `uninstall` back up `settings.json` and refuse to edit a file they can't parse.
|
|
135
|
-
- **Nothing runs unless you add it.** Apart from
|
|
214
|
+
- **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.
|
|
136
215
|
- **Zero runtime dependencies**, published from CI with [npm provenance](https://docs.npmjs.com/generating-provenance-statements).
|
|
137
216
|
|
|
138
217
|
Full details: [SECURITY.md](SECURITY.md).
|
|
@@ -141,6 +220,35 @@ Full details: [SECURITY.md](SECURITY.md).
|
|
|
141
220
|
|
|
142
221
|
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).
|
|
143
222
|
|
|
223
|
+
Thanks to everyone who has contributed:
|
|
224
|
+
|
|
225
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
226
|
+
<!-- prettier-ignore-start -->
|
|
227
|
+
<!-- markdownlint-disable -->
|
|
228
|
+
<table>
|
|
229
|
+
<tbody>
|
|
230
|
+
<tr>
|
|
231
|
+
<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>
|
|
232
|
+
<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>
|
|
233
|
+
<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>
|
|
234
|
+
<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>
|
|
235
|
+
<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>
|
|
236
|
+
<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>
|
|
237
|
+
</tr>
|
|
238
|
+
</tbody>
|
|
239
|
+
</table>
|
|
240
|
+
|
|
241
|
+
<!-- markdownlint-restore -->
|
|
242
|
+
<!-- prettier-ignore-end -->
|
|
243
|
+
|
|
244
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
245
|
+
|
|
246
|
+
If agy-powerline is useful to you, a ⭐ helps other agy users find it.
|
|
247
|
+
|
|
248
|
+
## Star History
|
|
249
|
+
|
|
250
|
+
[](https://star-history.com/#wassim-azi/agy-powerline&Date)
|
|
251
|
+
|
|
144
252
|
## License
|
|
145
253
|
|
|
146
254
|
[MIT](LICENSE) © Wassim AZI
|
package/README.zh-CN.md
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
# agy-powerline
|
|
2
2
|
|
|
3
|
-
[English](README.md) | **简体中文** | [日本語](README.ja.md)
|
|
3
|
+
[English](README.md) | **简体中文** | [日本語](README.ja.md) | [Français](README.fr.md)
|
|
4
4
|
|
|
5
5
|
[](https://github.com/wassim-azi/agy-powerline/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/wassim-azi/agy-powerline/actions/workflows/codeql.yml)
|
|
6
7
|
[](https://www.npmjs.com/package/agy-powerline)
|
|
8
|
+
[](https://www.npmjs.com/package/agy-powerline)
|
|
9
|
+
[](https://github.com/wassim-azi/agy-powerline/stargazers)
|
|
10
|
+
[](https://agy-powerline.com/configure/)
|
|
7
11
|
[](https://nodejs.org/)
|
|
12
|
+
[](docs/install.md)
|
|
13
|
+
[](docs/install.md)
|
|
14
|
+
[](docs/install.md)
|
|
8
15
|
[](https://opensource.org/licenses/MIT)
|
|
9
16
|
[](#隐私与安全)
|
|
17
|
+
[](https://scorecard.dev/viewer/?uri=github.com/wassim-azi/agy-powerline)
|
|
18
|
+
[](https://www.bestpractices.dev/projects/15655)
|
|
19
|
+
[](https://github.com/Piebald-AI/awesome-gemini-cli)
|
|
10
20
|
|
|
11
21
|
> 本文译自英文版 [README](README.md),可能落后于英文版;如有出入,以英文版为准。详细文档([`docs/`](docs/))仅提供英文版。
|
|
12
22
|
|
|
@@ -15,7 +25,7 @@
|
|
|
15
25
|
一眼看到当前模型、Gemini 5h/7d、Claude/GPT 和 Argon 配额、上下文窗口、git 分支等信息。在交互式编辑器中挑选组件、主题和布局。一条命令即可安装,零依赖。
|
|
16
26
|
|
|
17
27
|
<p align="center">
|
|
18
|
-
<img src="assets/
|
|
28
|
+
<img src="assets/demo.gif" alt="agy-powerline 的 configure:输入 argon 添加 Argon 每周配额,然后浏览预设、主题和布局并实时预览状态栏,最后打开 Powerline 标签页" width="850">
|
|
19
29
|
</p>
|
|
20
30
|
|
|
21
31
|
## 安装
|
|
@@ -30,6 +40,23 @@ agy # 启动 Antigravity
|
|
|
30
40
|
|
|
31
41
|
`init` 在替换任何内容之前都会先询问,并会先备份 Antigravity 的 `settings.json`。运行 `init` 后需重启一次 `agy`。详情:[`init` 做了什么](docs/install.md)。
|
|
32
42
|
|
|
43
|
+
<details>
|
|
44
|
+
<summary>截图:真实 agy 会话中的状态栏(Windows Terminal)</summary>
|
|
45
|
+
|
|
46
|
+
<p align="center">
|
|
47
|
+
<img src="assets/screenshots/windows.png" alt="Windows Terminal 中 agy 输入框下方的 agy-powerline:上方是一段简短对话,下方是三行的 Pills 状态栏" width="850">
|
|
48
|
+
</p>
|
|
49
|
+
|
|
50
|
+
</details>
|
|
51
|
+
|
|
52
|
+
也可以让 agy 帮你安装:把下面这段话粘贴到 `agy` 会话中。
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
Install the agy-powerline statusline: run `npx agy-powerline init --yes`, then tell me to restart agy.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`--yes` 会跳过 agy 无法回答的确认提示,并在备份 `settings.json` 后替换已有的 `statusLine`。
|
|
59
|
+
|
|
33
60
|
如果终端没有 Nerd Font,可以开启 ASCII 模式(在 `configure` 中按 `i`)。
|
|
34
61
|
|
|
35
62
|
## 自定义
|
|
@@ -42,22 +69,24 @@ agy # 启动 Antigravity
|
|
|
42
69
|
|
|
43
70
|
从一个预设开始,再按需调整:
|
|
44
71
|
|
|
45
|
-
| 预设
|
|
46
|
-
|
|
|
47
|
-
| `default`
|
|
48
|
-
| `compact`
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
72
|
+
| 预设 | 显示内容 |
|
|
73
|
+
| --------- | ---------------------------------------------------------------------- |
|
|
74
|
+
| `default` | 模型、上下文、git;第二行显示 5h 和 7d 配额及重置时间 |
|
|
75
|
+
| `compact` | 单行:简短模型名、最紧张的配额、上下文 %、git |
|
|
76
|
+
| `agent` | 代理状态、子代理、标题、模式、沙盒;模型、上下文 %、产物、最紧张的配额 |
|
|
77
|
+
| `git` | 项目、分支、worktree、stash;文件数、改动行数、提交 |
|
|
78
|
+
| `tokens` | 上下文 token、会话输入/输出 token、缓存;今天和 7 天的 token |
|
|
79
|
+
| `quotas` | 套餐和模型;5h 和 7d 配额并排显示,第三方和 Argon 配额在第三行 |
|
|
80
|
+
| `full` | 全部:会话、项目和 git;上下文、token 和缓存;两组配额 |
|
|
52
81
|
|
|
53
82
|
### 主题
|
|
54
83
|
|
|
55
|
-
| 终端背景 | 主题
|
|
56
|
-
| ---------- |
|
|
57
|
-
| 深色 | `dark-aurora`(默认)、`dark-ocean`、`dark-ember`、`dark-forest`、`dark-neon`、`dark-mono`、`dark-nocturne`、`dark-onyx`、`dark-metro` |
|
|
58
|
-
| 浅色 | `light-paper`、`light-sky`、`light-sunset`、`light-cream`
|
|
59
|
-
| 色盲友好 | `colorblind-dark`、`colorblind-light`
|
|
60
|
-
| 自定义颜色 | `custom`([方法](docs/configuration.md#custom-theme))
|
|
84
|
+
| 终端背景 | 主题 |
|
|
85
|
+
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
86
|
+
| 深色 | `dark-aurora`(默认)、`dark-ocean`、`dark-ember`、`dark-forest`、`dark-neon`、`dark-mono`、`dark-nocturne`、`dark-onyx`、`dark-metro`、`dark-macchiato` |
|
|
87
|
+
| 浅色 | `light-paper`、`light-sky`、`light-sunset`、`light-cream` |
|
|
88
|
+
| 色盲友好 | `colorblind-dark`、`colorblind-light` |
|
|
89
|
+
| 自定义颜色 | `custom`([方法](docs/configuration.md#custom-theme)) |
|
|
61
90
|
|
|
62
91
|
用 `npx agy-powerline theme --gallery` 预览所有主题。
|
|
63
92
|
|
|
@@ -66,54 +95,91 @@ agy # 启动 Antigravity
|
|
|
66
95
|
**Pills**(默认):powerline 风格的胶囊。可选圆角、尖角、斜角或平直形状,也可以在行与行之间留一个空行。
|
|
67
96
|
|
|
68
97
|
<p align="center">
|
|
69
|
-
<img src="assets/screenshots/pills-
|
|
98
|
+
<img src="assets/screenshots/pills-dark.png" alt="agy-powerline 的 Pills 布局,dark-aurora 主题:模型、上下文、项目和 git;Gemini 5h 和 7d 配额,带进度标记和重置时间;Claude/GPT 和 Argon 每周配额" width="850">
|
|
70
99
|
</p>
|
|
71
100
|
|
|
101
|
+
<details>
|
|
102
|
+
<summary>浅色终端</summary>
|
|
103
|
+
|
|
104
|
+
<p align="center">
|
|
105
|
+
<img src="assets/screenshots/pills-light.png" alt="agy-powerline 的 Pills 布局,浅色终端上的 light-paper 主题" width="850">
|
|
106
|
+
</p>
|
|
107
|
+
|
|
108
|
+
</details>
|
|
109
|
+
|
|
72
110
|
**Lines**:以纯彩色文本显示相同的信息。
|
|
73
111
|
|
|
74
112
|
<p align="center">
|
|
75
|
-
<img src="assets/screenshots/lines-dark.png" alt="agy-powerline 的 Lines 布局,深色终端上的 dark-
|
|
76
|
-
|
|
113
|
+
<img src="assets/screenshots/lines-dark.png" alt="agy-powerline 的 Lines 布局,深色终端上的 dark-aurora 主题" width="850">
|
|
114
|
+
</p>
|
|
115
|
+
|
|
116
|
+
<details>
|
|
117
|
+
<summary>浅色终端</summary>
|
|
118
|
+
|
|
119
|
+
<p align="center">
|
|
120
|
+
<img src="assets/screenshots/lines-light.png" alt="agy-powerline 的 Lines 布局,浅色终端上的 light-paper 主题" width="850">
|
|
77
121
|
</p>
|
|
78
122
|
|
|
123
|
+
</details>
|
|
124
|
+
|
|
125
|
+
**Classic**:用 `|` 分隔的纯彩色文本,进度条为方块,例如 `███░│░░░░░`。
|
|
126
|
+
|
|
127
|
+
<p align="center">
|
|
128
|
+
<img src="assets/screenshots/classic-dark.png" alt="agy-powerline 的 Classic 布局,深色终端上的 dark-aurora 主题,方块进度条" width="850">
|
|
129
|
+
</p>
|
|
130
|
+
|
|
131
|
+
<details>
|
|
132
|
+
<summary>浅色终端</summary>
|
|
133
|
+
|
|
134
|
+
<p align="center">
|
|
135
|
+
<img src="assets/screenshots/classic-light.png" alt="agy-powerline 的 Classic 布局,浅色终端上的 light-paper 主题" width="850">
|
|
136
|
+
</p>
|
|
137
|
+
|
|
138
|
+
</details>
|
|
139
|
+
|
|
79
140
|
## 组件
|
|
80
141
|
|
|
81
|
-
| 组件
|
|
82
|
-
|
|
|
83
|
-
| `model`
|
|
84
|
-
| `fiveHourBar`、`weeklyBar`
|
|
85
|
-
| `fiveHourPct`、`weeklyPct`
|
|
86
|
-
| `fiveHourReset`、`weeklyReset`
|
|
87
|
-
| `quota`
|
|
88
|
-
| `thirdPartyFiveHour`、`thirdPartyWeekly`
|
|
89
|
-
| `argonWeekly`、`argonReset`
|
|
90
|
-
| `context`、`contextPct`、`contextTokens`
|
|
91
|
-
| `git`
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
95
|
-
| `
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
98
|
-
| `
|
|
99
|
-
| `
|
|
142
|
+
| 组件 | 显示内容 |
|
|
143
|
+
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
144
|
+
| `model` | 当前使用的模型 |
|
|
145
|
+
| `fiveHourBar`、`weeklyBar` | 以进度条显示 5h / 7d 剩余配额,带[进度标记](docs/configuration.md#quota-pace-marker) |
|
|
146
|
+
| `fiveHourPct`、`weeklyPct` | 以百分比显示 5h / 7d 剩余配额 |
|
|
147
|
+
| `fiveHourReset`、`weeklyReset` | 距配额重置的时间,或重置时刻 |
|
|
148
|
+
| `quota` | 最接近用完的配额及其重置时间 |
|
|
149
|
+
| `thirdPartyFiveHour`、`thirdPartyWeekly` | 第三方模型的配额 |
|
|
150
|
+
| `argonWeekly`、`argonReset` | Gemini 4 Argon 独立的每周配额(Google AI Pro)及其重置时间 |
|
|
151
|
+
| `context`、`contextPct`、`contextTokens` | 已用的上下文窗口:进度条、百分比或 token 数 |
|
|
152
|
+
| `git` | 分支、未提交的更改以及领先/落后的提交数 |
|
|
153
|
+
| `gitChanges`, `gitFiles`, `gitSha`, `gitStash`, `gitWorktree` | Lines added and removed, staged/modified/untracked/conflicted files, commit ID, stashes, linked worktree |
|
|
154
|
+
| `project`、`cwd` | 项目文件夹、当前文件夹 |
|
|
155
|
+
| `agentState`、`plan`、`sandbox`、`artifacts`、`version` | 代理正在做什么、你的套餐、沙箱、产物、CLI 版本 |
|
|
156
|
+
| `tasks` | 正在运行的子代理和后台任务 |
|
|
157
|
+
| `mode` | 审批模式(如 accept-edits)和 Vim 模式 |
|
|
158
|
+
| `title` | 对话标题 |
|
|
159
|
+
| `totalTokens`、`cacheHit`、`cacheRead`、`cacheCreate` | 会话 token 数和提示缓存的使用情况 |
|
|
160
|
+
| `tokensToday`、`tokensWeek` | 今天和过去 7 天的 token 用量(所有对话,Node 22.13+) |
|
|
161
|
+
| `ram` | 本机已用内存 |
|
|
162
|
+
| `customText`、`exec` | 你自己的文本,或 [shell 命令](docs/configuration.md#shell-command-widget-exec)的输出 |
|
|
100
163
|
|
|
101
164
|
没有内容可显示的组件会自动隐藏。组件可以更改颜色、去掉标签,或设置自己的告警阈值:见 [Configuration](docs/configuration.md)。
|
|
102
165
|
|
|
103
166
|
## 命令
|
|
104
167
|
|
|
105
|
-
| 命令
|
|
106
|
-
|
|
|
107
|
-
| `npx agy-powerline init [--yes]`
|
|
108
|
-
| `npx agy-powerline configure`
|
|
109
|
-
| `npx agy-powerline preset <name>`
|
|
110
|
-
| `npx agy-powerline theme <name>`
|
|
111
|
-
| `npx agy-powerline
|
|
112
|
-
| `npx agy-powerline
|
|
113
|
-
| `npx agy-powerline
|
|
114
|
-
| `npx agy-powerline
|
|
115
|
-
| `npx agy-powerline
|
|
116
|
-
| `npx agy-powerline
|
|
168
|
+
| 命令 | 作用 |
|
|
169
|
+
| -------------------------------------------------- | ----------------------------------------------------- |
|
|
170
|
+
| `npx agy-powerline init [--yes]` | 安装或更新状态栏 |
|
|
171
|
+
| `npx agy-powerline configure` | 打开编辑器(别名 `config`) |
|
|
172
|
+
| `npx agy-powerline preset <name>` | 应用预设(`--list` 查看全部) |
|
|
173
|
+
| `npx agy-powerline theme <name>` | 切换主题(`--list`、`--gallery`) |
|
|
174
|
+
| `npx agy-powerline gradient <name>` | Color each row with a gradient (`--list`, `off`) |
|
|
175
|
+
| `npx agy-powerline layout <pills\|lines\|classic>` | 切换布局 |
|
|
176
|
+
| `npx agy-powerline caps <style>` | 切换胶囊形状:`round`、`angled`、`slanted`、`flat` |
|
|
177
|
+
| `npx agy-powerline export [file]` | Save your config to a file, to back it up or share it |
|
|
178
|
+
| `npx agy-powerline import <file>` | Load a config, after showing what changes (`--merge`) |
|
|
179
|
+
| `npx agy-powerline doctor` | 检查安装并说明问题所在 |
|
|
180
|
+
| `npx agy-powerline report` | 生成保护隐私的错误报告 |
|
|
181
|
+
| `npx agy-powerline uninstall [--delete]` | 从 agy 中移除(`--delete` 会同时删除其文件) |
|
|
182
|
+
| `npx agy-powerline render --demo` | 用示例数据打印状态栏 |
|
|
117
183
|
|
|
118
184
|
任何命令加上 `--help` 即可查看其选项。
|
|
119
185
|
|
|
@@ -143,6 +209,35 @@ npx agy-powerline doctor # 检查一切是否为最新
|
|
|
143
209
|
|
|
144
210
|
欢迎贡献。请先阅读 [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) 中分享想法和反馈。
|
|
145
211
|
|
|
212
|
+
感谢所有贡献者:
|
|
213
|
+
|
|
214
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
215
|
+
<!-- prettier-ignore-start -->
|
|
216
|
+
<!-- markdownlint-disable -->
|
|
217
|
+
<table>
|
|
218
|
+
<tbody>
|
|
219
|
+
<tr>
|
|
220
|
+
<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>
|
|
221
|
+
<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>
|
|
222
|
+
<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>
|
|
223
|
+
<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>
|
|
224
|
+
<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>
|
|
225
|
+
<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>
|
|
226
|
+
</tr>
|
|
227
|
+
</tbody>
|
|
228
|
+
</table>
|
|
229
|
+
|
|
230
|
+
<!-- markdownlint-restore -->
|
|
231
|
+
<!-- prettier-ignore-end -->
|
|
232
|
+
|
|
233
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
234
|
+
|
|
235
|
+
如果 agy-powerline 对你有用,点个 ⭐ 能帮助更多 agy 用户发现它。
|
|
236
|
+
|
|
237
|
+
## Star History
|
|
238
|
+
|
|
239
|
+
[](https://star-history.com/#wassim-azi/agy-powerline&Date)
|
|
240
|
+
|
|
146
241
|
## 许可证
|
|
147
242
|
|
|
148
243
|
[MIT](LICENSE) © Wassim AZI
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agy-powerline",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
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"
|
|
@@ -35,6 +35,8 @@
|
|
|
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
|
+
"screenshots": "node scripts/gallery/screenshots.js",
|
|
39
|
+
"configurator": "node scripts/configurator/build.js",
|
|
38
40
|
"lint": "eslint .",
|
|
39
41
|
"lint:fix": "eslint . --fix",
|
|
40
42
|
"format": "prettier --write .",
|
|
@@ -70,7 +72,8 @@
|
|
|
70
72
|
"devDependencies": {
|
|
71
73
|
"@eslint/js": "10.0.1",
|
|
72
74
|
"eslint": "10.12.0",
|
|
75
|
+
"fast-check": "4.10.2",
|
|
73
76
|
"globals": "17.13.0",
|
|
74
|
-
"prettier": "3.9.
|
|
77
|
+
"prettier": "3.9.10"
|
|
75
78
|
}
|
|
76
79
|
}
|