agy-powerline 1.1.0 → 1.2.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 CHANGED
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.2.0] - 2026-10-16
9
+
10
+ ### Added
11
+
12
+ - `configure` edits a widget's options: Enter on a widget sets its color, label, caution and danger levels, blink, pace marker, reset format, short model name or badge text, with the preview following each change (#29)
13
+ - The README in Simplified Chinese (`README.zh-CN.md`) and Japanese (`README.ja.md`), with a language switcher at the top of each README (#34)
14
+ - `argonWeekly` and `argonReset` widgets show Gemini 4 Argon's own weekly quota on Google AI Pro and when it resets, whatever model you're using; the `limits` preset gets them as a fourth row, which hides when there's no Argon quota (#38)
15
+
16
+ ### Changed
17
+
18
+ - `configure` fits your window: it fills the full width instead of stopping at 120 columns, lines descriptions up in a column, splits the width evenly between the list and a details panel from 140 columns (the selected widget drawn on its own with its options, a preset's rows, a theme's colors), scrolls long lists inside their panel in short windows instead of pushing the screen out of view, and redraws when the window is resized; it also gets a fresher look: a header with the GitHub star link and the navigation keys at the right end, the active tab and the selected item as rounded pills, widget icons in the lists, accent-colored panel titles, and details with headings, preset tags and color blocks (#29)
19
+ - `configure` is clearer about state: only widgets are numbered (flex spaces and new rows aren't), the preview title says when it shows a theme, preset or layout that isn't applied, the preset matching your widgets is marked `current` and lists its widgets with their icons, and a theme's details include a sample of the editor in that theme (#29)
20
+
21
+ ### Fixed
22
+
23
+ - The context widgets' token count matches the percentage next to it: it was input plus output tokens only, leaving out cached tokens (e.g. `5.3K/1.0M (11.7%)`), and is now the used share of the window (`123.1K/1.0M (11.7%)`) (#31)
24
+ - The tightest quota widget no longer shows Gemini 4 Argon's separate weekly quota (Google AI Pro) while another Gemini model is in use, under a cut-off name like `gemini-argon-wtu-wee`; it shows that quota as `Argon 7d` when Argon is the model in use (#37)
25
+
26
+ ## [1.1.1] - 2026-10-12
27
+
28
+ ### Changed
29
+
30
+ - The statusline is installed as a single `statusline.js` instead of about 16 files, which cuts agy-powerline's own share of each refresh by about a third on Windows; run `npx agy-powerline init --yes` to switch, and `init` removes the old files (#23)
31
+ - The ahead/behind counts are kept per pair of commits, so a branch that is ahead of or behind its upstream no longer starts `git` on every refresh (about 60 ms each on Windows) (#24)
32
+
8
33
  ## [1.1.0] - 2026-10-12
9
34
 
10
35
  ### Added
package/README.ja.md ADDED
@@ -0,0 +1,148 @@
1
+ # agy-powerline
2
+
3
+ [English](README.md) | [简体中文](README.zh-CN.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
+ [![Node](https://img.shields.io/badge/node-%3E%3D20-informational.svg)](https://nodejs.org/)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
+ [![Dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](#プライバシーとセキュリティ)
10
+
11
+ > この文書は英語版 [README](README.md) の翻訳で、最新の内容に追いついていない場合があります。内容が異なる場合は英語版が優先されます。詳しいドキュメント([`docs/`](docs/))は英語版のみです。
12
+
13
+ **Google Antigravity の CLI(`agy`)向けの、高速でカスタマイズ可能なステータスライン。**
14
+
15
+ 使用中のモデル、Gemini の 5h/7d・Claude/GPT・Argon のクォータ、コンテキストウィンドウ、git ブランチなどがひと目でわかります。ウィジェット、テーマ、レイアウトは対話式のエディターで選べます。インストールはコマンドひとつ、依存パッケージはありません。
16
+
17
+ <p align="center">
18
+ <img src="assets/screenshots/pills-dark.png" alt="dark-ocean テーマの agy-powerline Pills レイアウト:エージェントの状態、モデル、プラン、プロジェクト、git;コンテキスト;5h と 7d のクォータとリセットまでの時間" width="850">
19
+ </p>
20
+
21
+ ## インストール
22
+
23
+ [Node.js](https://nodejs.org/) 20 以上と [Antigravity CLI](https://antigravity.google/docs/cli/overview) が必要です。Windows、macOS、Linux、WSL で動作します([WSL についての注意](docs/install.md#wsl))。
24
+
25
+ ```bash
26
+ npx agy-powerline init # agy にステータスラインをインストール
27
+ npx agy-powerline configure # 任意:ウィジェット、テーマ、レイアウトを選ぶ
28
+ agy # Antigravity を起動
29
+ ```
30
+
31
+ `init` は何かを置き換える前に確認し、先に Antigravity の `settings.json` をバックアップします。`init` の後に `agy` を一度再起動してください。詳細:[`init` が行うこと](docs/install.md)。
32
+
33
+ Nerd Font のないターミナルでは、ASCII モードをオンにしてください(`configure` で `i`)。
34
+
35
+ ## カスタマイズ
36
+
37
+ `npx agy-powerline configure` を実行すると、バーのライブプレビュー付きのエディターが開きます。`←` `→` で Widgets、Presets、Themes、Layout、Powerline を切り替え、`↑` `↓` で移動、Enter で選択、`q` で保存して終了します。各画面のキーは画面下部に表示されます。キーの一覧は [Configuration](docs/configuration.md#configurator-keys) にあります。
38
+
39
+ 変更は、実行中の `agy` の次回の更新時に反映されます。
40
+
41
+ ### プリセット
42
+
43
+ プリセットから始めて、好みに合わせて調整します:
44
+
45
+ | プリセット | 表示内容 |
46
+ | ----------- | --------------------------------------------------------------------------------------------- |
47
+ | `default` | モデル、コンテキスト、git;2 行目に 5h と 7d のクォータとリセットまでの時間 |
48
+ | `compact` | 1 行:短いモデル名、最も残りの少ないクォータ、コンテキスト %、git |
49
+ | `workspace` | プロジェクト、git、エージェントの状態、モデル;コンテキスト、最も残りの少ないクォータ、モード |
50
+ | `limits` | すべてのクォータ(5h、7d、サードパーティ、Argon)を 1 行にひとつずつ |
51
+ | `full` | すべて:セッション、プロジェクト、git;コンテキスト、トークン、キャッシュ;両方のクォータ |
52
+
53
+ ### テーマ
54
+
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)) |
61
+
62
+ すべてのテーマは `npx agy-powerline theme --gallery` でプレビューできます。
63
+
64
+ ### レイアウト
65
+
66
+ **Pills**(デフォルト):powerline 風のカプセル。形は丸型、山型、斜め、フラットから選べ、行の間に空行を入れることもできます。
67
+
68
+ <p align="center">
69
+ <img src="assets/screenshots/pills-light.png" alt="明るいターミナルでの light-sky テーマの agy-powerline Pills レイアウト、行間あり" width="850">
70
+ </p>
71
+
72
+ **Lines**:同じ情報を色付きのプレーンテキストで表示します。
73
+
74
+ <p align="center">
75
+ <img src="assets/screenshots/lines-dark.png" alt="暗いターミナルでの dark-ocean テーマの agy-powerline Lines レイアウト" width="850">
76
+ <img src="assets/screenshots/lines-light.png" alt="明るいターミナルでの light-sky テーマの agy-powerline Lines レイアウト" width="850">
77
+ </p>
78
+
79
+ ## ウィジェット
80
+
81
+ | ウィジェット | 表示内容 |
82
+ | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
83
+ | `model` | 使用中のモデル |
84
+ | `fiveHourBar`、`weeklyBar` | 5h / 7d クォータの残りをメーターで表示([ペースマーカー](docs/configuration.md#quota-pace-marker)付き) |
85
+ | `fiveHourPct`、`weeklyPct` | 5h / 7d クォータの残りをパーセントで表示 |
86
+ | `fiveHourReset`、`weeklyReset` | クォータがリセットされるまでの時間、またはリセット時刻 |
87
+ | `quota` | 最も早く尽きそうなクォータとそのリセット |
88
+ | `thirdPartyFiveHour`、`thirdPartyWeekly` | サードパーティモデルのクォータ |
89
+ | `argonWeekly`、`argonReset` | Gemini 4 Argon 専用の週間クォータ(Google AI Pro)とそのリセット |
90
+ | `context`、`contextPct`、`contextTokens` | 使用中のコンテキストウィンドウ:メーター、パーセント、またはトークン数 |
91
+ | `git` | ブランチ、未コミットの変更、ahead/behind |
92
+ | `project`、`cwd` | プロジェクトのフォルダー、現在のフォルダー |
93
+ | `agentState`、`plan`、`sandbox`、`artifacts`、`version` | エージェントの動作状況、プラン、サンドボックス、アーティファクト、CLI のバージョン |
94
+ | `tasks` | 実行中のサブエージェントとバックグラウンドタスク |
95
+ | `mode` | 承認モード(例:accept-edits)と Vim モード |
96
+ | `title` | 会話のタイトル |
97
+ | `totalTokens`、`cacheHit`、`cacheRead`、`cacheCreate` | セッションのトークン数とプロンプトキャッシュの使用状況 |
98
+ | `ram` | マシンのメモリ使用量 |
99
+ | `customText`、`exec` | 任意のテキスト、または [シェルコマンド](docs/configuration.md#shell-command-widget-exec)の出力 |
100
+
101
+ 表示する内容のないウィジェットは自動的に隠れます。ウィジェットごとに色を変えたり、ラベルを外したり、独自の警告しきい値を設定したりできます。詳しくは [Configuration](docs/configuration.md) を参照してください。
102
+
103
+ ## コマンド
104
+
105
+ | コマンド | 内容 |
106
+ | ----------------------------------------- | ------------------------------------------------------------ |
107
+ | `npx agy-powerline init [--yes]` | ステータスラインをインストールまたは更新 |
108
+ | `npx agy-powerline configure` | エディターを開く(別名 `config`) |
109
+ | `npx agy-powerline preset <name>` | プリセットを適用(一覧は `--list`) |
110
+ | `npx agy-powerline theme <name>` | テーマを切り替え(`--list`、`--gallery`) |
111
+ | `npx agy-powerline layout <pills\|lines>` | レイアウトを切り替え |
112
+ | `npx agy-powerline caps <style>` | カプセルの形を切り替え:`round`、`angled`、`slanted`、`flat` |
113
+ | `npx agy-powerline doctor` | インストールを確認し、問題を説明 |
114
+ | `npx agy-powerline report` | プライバシーに配慮したバグレポートを作成 |
115
+ | `npx agy-powerline uninstall [--delete]` | agy から削除(`--delete` でファイルも削除) |
116
+ | `npx agy-powerline render --demo` | サンプルデータでバーを表示 |
117
+
118
+ 各コマンドのオプションは `--help` で確認できます。
119
+
120
+ ## 更新
121
+
122
+ ```bash
123
+ npx agy-powerline init --yes # 新しいバージョンのスクリプトをインストール
124
+ npx agy-powerline doctor # すべてが最新か確認
125
+ ```
126
+
127
+ 設定はそのまま残ります。更新後に `agy` を再起動してください。
128
+
129
+ ## トラブルシューティング
130
+
131
+ まず `npx agy-powerline doctor` を実行してください。インストールを確認し、見つかった問題の直し方を教えてくれます。よくある問題とバグの報告方法:[Troubleshooting](docs/troubleshooting.md)。
132
+
133
+ ## プライバシーとセキュリティ
134
+
135
+ - **ネットワーク通信なし、テレメトリなし。** 表示する情報はすべて、agy がバーに渡すデータ、`.git`、OS から取得します。外部へのリンクは `configure` の `g` だけで、ブラウザーで GitHub のページを開きます。
136
+ - **設定は安全です。** `init` と `uninstall` は `settings.json` をバックアップし、解析できないファイルは編集しません。
137
+ - **追加しない限り何も実行されません。** ahead/behind を数えるための短い `git` の呼び出しを除き、バーが実行するコマンドは自分で設定した `exec` ウィジェットだけです。
138
+ - **ランタイム依存パッケージはゼロ**で、CI から [npm provenance](https://docs.npmjs.com/generating-provenance-statements) 付きで公開されています。
139
+
140
+ 詳細:[SECURITY.md](SECURITY.md)。
141
+
142
+ ## コントリビュート
143
+
144
+ コントリビュートを歓迎します。まず [CONTRIBUTING.md](CONTRIBUTING.md)(セットアップ、アーキテクチャ、ウィジェットやテーマの追加)と [Code of Conduct](CODE_OF_CONDUCT.md) をお読みください。プルリクエストは `develop` に向けて作成してください。バグは [GitHub issues](https://github.com/wassim-azi/agy-powerline/issues) で報告し、アイデアやフィードバックは [Discussions](https://github.com/wassim-azi/agy-powerline/discussions) で共有してください。
145
+
146
+ ## ライセンス
147
+
148
+ [MIT](LICENSE) © Wassim AZI
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # agy-powerline
2
2
 
3
+ **English** | [简体中文](README.zh-CN.md) | [日本語](README.ja.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)
5
7
  [![Node](https://img.shields.io/badge/node-%3E%3D20-informational.svg)](https://nodejs.org/)
@@ -8,7 +10,7 @@
8
10
 
9
11
  **A fast, configurable statusline for Google Antigravity's CLI (`agy`).**
10
12
 
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.
13
+ 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
14
 
13
15
  <p align="center">
14
16
  <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">
@@ -43,7 +45,7 @@ Start from a preset, then adjust:
43
45
  | `default` | Model, context, git; 5h and 7d quotas with resets on a second row |
44
46
  | `compact` | One line: short model, tightest quota, context %, git |
45
47
  | `workspace` | Project, git, agent state, model; context, tightest quota and mode |
46
- | `limits` | Every quota (5h, 7d, third-party), one per row |
48
+ | `limits` | Every quota (5h, 7d, third-party, Argon), one per row |
47
49
  | `full` | Everything: session, project and git; context, tokens and cache; both quotas |
48
50
 
49
51
  ### Themes
@@ -82,6 +84,7 @@ Preview them all with `npx agy-powerline theme --gallery`.
82
84
  | `fiveHourReset`, `weeklyReset` | Time until the quota resets, or the reset time |
83
85
  | `quota` | The quota closest to running out, with its reset |
84
86
  | `thirdPartyFiveHour`, `thirdPartyWeekly` | Third-party model quotas |
87
+ | `argonWeekly`, `argonReset` | Gemini 4 Argon's own weekly quota (Google AI Pro) and its reset |
85
88
  | `context`, `contextPct`, `contextTokens` | Context window used: meter, percentage or token counts |
86
89
  | `git` | Branch, uncommitted changes and ahead/behind |
87
90
  | `project`, `cwd` | Project folder, current folder |
@@ -136,7 +139,7 @@ Full details: [SECURITY.md](SECURITY.md).
136
139
 
137
140
  ## Contributing
138
141
 
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).
142
+ 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).
140
143
 
141
144
  ## License
142
145
 
@@ -0,0 +1,148 @@
1
+ # agy-powerline
2
+
3
+ [English](README.md) | **简体中文** | [日本語](README.ja.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
+ [![Node](https://img.shields.io/badge/node-%3E%3D20-informational.svg)](https://nodejs.org/)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
+ [![Dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](#隐私与安全)
10
+
11
+ > 本文译自英文版 [README](README.md),可能落后于英文版;如有出入,以英文版为准。详细文档([`docs/`](docs/))仅提供英文版。
12
+
13
+ **为 Google Antigravity CLI(`agy`)打造的快速、可配置的状态栏。**
14
+
15
+ 一眼看到当前模型、Gemini 5h/7d、Claude/GPT 和 Argon 配额、上下文窗口、git 分支等信息。在交互式编辑器中挑选组件、主题和布局。一条命令即可安装,零依赖。
16
+
17
+ <p align="center">
18
+ <img src="assets/screenshots/pills-dark.png" alt="agy-powerline 的 Pills 布局,dark-ocean 主题:代理状态、模型、套餐、项目和 git;上下文;5h 和 7d 配额及重置时间" width="850">
19
+ </p>
20
+
21
+ ## 安装
22
+
23
+ 需要 [Node.js](https://nodejs.org/) 20+ 和 [Antigravity CLI](https://antigravity.google/docs/cli/overview)。支持 Windows、macOS、Linux 和 WSL([WSL 说明](docs/install.md#wsl))。
24
+
25
+ ```bash
26
+ npx agy-powerline init # 将状态栏安装到 agy
27
+ npx agy-powerline configure # 可选:挑选组件、主题和布局
28
+ agy # 启动 Antigravity
29
+ ```
30
+
31
+ `init` 在替换任何内容之前都会先询问,并会先备份 Antigravity 的 `settings.json`。运行 `init` 后需重启一次 `agy`。详情:[`init` 做了什么](docs/install.md)。
32
+
33
+ 如果终端没有 Nerd Font,可以开启 ASCII 模式(在 `configure` 中按 `i`)。
34
+
35
+ ## 自定义
36
+
37
+ `npx agy-powerline configure` 会打开一个带有状态栏实时预览的编辑器。用 `←` `→` 在 Widgets、Presets、Themes、Layout 和 Powerline 之间切换,`↑` `↓` 移动,Enter 选择,`q` 保存并退出。每个界面的按键都显示在底部;完整列表见 [Configuration](docs/configuration.md#configurator-keys)。
38
+
39
+ 正在运行的 `agy` 会在下次刷新时应用更改。
40
+
41
+ ### 预设
42
+
43
+ 从一个预设开始,再按需调整:
44
+
45
+ | 预设 | 显示内容 |
46
+ | ----------- | ------------------------------------------------------ |
47
+ | `default` | 模型、上下文、git;第二行显示 5h 和 7d 配额及重置时间 |
48
+ | `compact` | 单行:简短模型名、最紧张的配额、上下文 %、git |
49
+ | `workspace` | 项目、git、代理状态、模型;上下文、最紧张的配额和模式 |
50
+ | `limits` | 所有配额(5h、7d、第三方、Argon),每行一个 |
51
+ | `full` | 全部:会话、项目和 git;上下文、token 和缓存;两组配额 |
52
+
53
+ ### 主题
54
+
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)) |
61
+
62
+ 用 `npx agy-powerline theme --gallery` 预览所有主题。
63
+
64
+ ### 布局
65
+
66
+ **Pills**(默认):powerline 风格的胶囊。可选圆角、尖角、斜角或平直形状,也可以在行与行之间留一个空行。
67
+
68
+ <p align="center">
69
+ <img src="assets/screenshots/pills-light.png" alt="agy-powerline 的 Pills 布局,浅色终端上的 light-sky 主题,行间留空" width="850">
70
+ </p>
71
+
72
+ **Lines**:以纯彩色文本显示相同的信息。
73
+
74
+ <p align="center">
75
+ <img src="assets/screenshots/lines-dark.png" alt="agy-powerline 的 Lines 布局,深色终端上的 dark-ocean 主题" width="850">
76
+ <img src="assets/screenshots/lines-light.png" alt="agy-powerline 的 Lines 布局,浅色终端上的 light-sky 主题" width="850">
77
+ </p>
78
+
79
+ ## 组件
80
+
81
+ | 组件 | 显示内容 |
82
+ | ------------------------------------------------------- | ------------------------------------------------------------------------------------ |
83
+ | `model` | 当前使用的模型 |
84
+ | `fiveHourBar`、`weeklyBar` | 以进度条显示 5h / 7d 剩余配额,带[进度标记](docs/configuration.md#quota-pace-marker) |
85
+ | `fiveHourPct`、`weeklyPct` | 以百分比显示 5h / 7d 剩余配额 |
86
+ | `fiveHourReset`、`weeklyReset` | 距配额重置的时间,或重置时刻 |
87
+ | `quota` | 最接近用完的配额及其重置时间 |
88
+ | `thirdPartyFiveHour`、`thirdPartyWeekly` | 第三方模型的配额 |
89
+ | `argonWeekly`、`argonReset` | Gemini 4 Argon 独立的每周配额(Google AI Pro)及其重置时间 |
90
+ | `context`、`contextPct`、`contextTokens` | 已用的上下文窗口:进度条、百分比或 token 数 |
91
+ | `git` | 分支、未提交的更改以及领先/落后的提交数 |
92
+ | `project`、`cwd` | 项目文件夹、当前文件夹 |
93
+ | `agentState`、`plan`、`sandbox`、`artifacts`、`version` | 代理正在做什么、你的套餐、沙箱、产物、CLI 版本 |
94
+ | `tasks` | 正在运行的子代理和后台任务 |
95
+ | `mode` | 审批模式(如 accept-edits)和 Vim 模式 |
96
+ | `title` | 对话标题 |
97
+ | `totalTokens`、`cacheHit`、`cacheRead`、`cacheCreate` | 会话 token 数和提示缓存的使用情况 |
98
+ | `ram` | 本机已用内存 |
99
+ | `customText`、`exec` | 你自己的文本,或 [shell 命令](docs/configuration.md#shell-command-widget-exec)的输出 |
100
+
101
+ 没有内容可显示的组件会自动隐藏。组件可以更改颜色、去掉标签,或设置自己的告警阈值:见 [Configuration](docs/configuration.md)。
102
+
103
+ ## 命令
104
+
105
+ | 命令 | 作用 |
106
+ | ----------------------------------------- | -------------------------------------------------- |
107
+ | `npx agy-powerline init [--yes]` | 安装或更新状态栏 |
108
+ | `npx agy-powerline configure` | 打开编辑器(别名 `config`) |
109
+ | `npx agy-powerline preset <name>` | 应用预设(`--list` 查看全部) |
110
+ | `npx agy-powerline theme <name>` | 切换主题(`--list`、`--gallery`) |
111
+ | `npx agy-powerline layout <pills\|lines>` | 切换布局 |
112
+ | `npx agy-powerline caps <style>` | 切换胶囊形状:`round`、`angled`、`slanted`、`flat` |
113
+ | `npx agy-powerline doctor` | 检查安装并说明问题所在 |
114
+ | `npx agy-powerline report` | 生成保护隐私的错误报告 |
115
+ | `npx agy-powerline uninstall [--delete]` | 从 agy 中移除(`--delete` 会同时删除其文件) |
116
+ | `npx agy-powerline render --demo` | 用示例数据打印状态栏 |
117
+
118
+ 任何命令加上 `--help` 即可查看其选项。
119
+
120
+ ## 更新
121
+
122
+ ```bash
123
+ npx agy-powerline init --yes # 安装新版本的脚本
124
+ npx agy-powerline doctor # 检查一切是否为最新
125
+ ```
126
+
127
+ 你的设置会被保留。更新后请重启 `agy`。
128
+
129
+ ## 故障排查
130
+
131
+ 请先运行 `npx agy-powerline doctor`:它会检查安装,并告诉你如何修复发现的问题。常见问题以及如何报告错误:[Troubleshooting](docs/troubleshooting.md)。
132
+
133
+ ## 隐私与安全
134
+
135
+ - **无网络请求,无遥测。** 所有信息都来自 agy 传给状态栏的数据、`.git` 和你的操作系统。唯一的对外链接是 `configure` 中的 `g`,它会在浏览器中打开 GitHub 页面。
136
+ - **你的设置是安全的。** `init` 和 `uninstall` 会备份 `settings.json`,并拒绝编辑无法解析的文件。
137
+ - **你不添加,就不会运行任何命令。** 除了一次用于计算领先/落后提交数的快速 `git` 调用外,状态栏只会运行你自己配置的 `exec` 组件。
138
+ - **零运行时依赖**,通过 CI 发布并附带 [npm provenance](https://docs.npmjs.com/generating-provenance-statements)。
139
+
140
+ 完整说明:[SECURITY.md](SECURITY.md)。
141
+
142
+ ## 参与贡献
143
+
144
+ 欢迎贡献。请先阅读 [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
+
146
+ ## 许可证
147
+
148
+ [MIT](LICENSE) © Wassim AZI
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agy-powerline",
3
- "version": "1.1.0",
4
- "description": "Interactive statusline for Google Antigravity",
3
+ "version": "1.2.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
  },
@@ -43,13 +43,21 @@
43
43
  },
44
44
  "keywords": [
45
45
  "antigravity",
46
+ "antigravity-cli",
47
+ "google-antigravity",
48
+ "agy",
49
+ "agy-cli",
46
50
  "agy-powerline",
47
51
  "statusline",
48
52
  "status-line",
49
53
  "powerline",
50
54
  "cli",
51
55
  "terminal",
52
- "gemini"
56
+ "tui",
57
+ "gemini",
58
+ "quota",
59
+ "nerd-fonts",
60
+ "windows"
53
61
  ],
54
62
  "license": "MIT",
55
63
  "engines": {
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+
3
+ // Builds the installed statusline.js: the runtime script and the library
4
+ // files in RUNTIME_FILES, joined into one file. Node loads a single file much
5
+ // faster than ~16 small ones (on Windows, opening each file costs more than
6
+ // running its code), and Antigravity starts the script on every refresh.
7
+ //
8
+ // Each file keeps its own scope: its source is wrapped in a function that
9
+ // gets its own module, exports and require, the way Node wraps a file. No
10
+ // eval, no code generation beyond that wrapper. LINES records where each file
11
+ // starts, so the problem log can still name the original file and line.
12
+
13
+ const fs = require("fs");
14
+ const path = require("path");
15
+ const { RUNTIME_FILES } = require("../lib/paths");
16
+
17
+ const LIB_DIR = path.join(__dirname, "..", "lib");
18
+ const ENTRY = path.join(__dirname, "..", "runtime", "statusline.js");
19
+
20
+ // Requires between bundled files resolve inside the bundle; anything else
21
+ // (Node built-ins) goes to Node's own require.
22
+ const PRELUDE = `const __files = {};
23
+ const __cache = {};
24
+ function __require(from, id) {
25
+ if (!id.startsWith(".")) {
26
+ return require(id);
27
+ }
28
+ let key = require("path").posix.join(require("path").posix.dirname(from), id);
29
+ if (!key.endsWith(".js")) {
30
+ key += ".js";
31
+ }
32
+ if (!__files[key]) {
33
+ const err = new Error(\`Cannot find module '\${id}' from '\${from}'\`);
34
+ err.code = "MODULE_NOT_FOUND";
35
+ throw err;
36
+ }
37
+ if (!__cache[key]) {
38
+ const module = { exports: {} };
39
+ __cache[key] = module;
40
+ __files[key](module, module.exports, (next) => __require(key, next));
41
+ }
42
+ return __cache[key].exports;
43
+ }
44
+ `;
45
+
46
+ function toKey(rel) {
47
+ return rel.split(path.sep).join("/");
48
+ }
49
+
50
+ function wrapperLine(key) {
51
+ return `__files[${JSON.stringify(key)}] = function (module, exports, require) {`;
52
+ }
53
+
54
+ function buildRuntimeBundle() {
55
+ const files = [
56
+ ...RUNTIME_FILES.map((rel) => [toKey(rel), path.join(LIB_DIR, rel)]),
57
+ ["statusline.js", ENTRY],
58
+ ];
59
+ const parts = ["#!/usr/bin/env node", PRELUDE];
60
+
61
+ for (const [key, file] of files) {
62
+ const body = fs
63
+ .readFileSync(file, "utf8")
64
+ .replace(/^#!.*\n/, "")
65
+ .replace(/\n+$/, "");
66
+ parts.push(wrapperLine(key), body, "};");
67
+ }
68
+
69
+ // [first line of the file in the bundle, file name]; 1-based like stack traces.
70
+ const text = parts.join("\n");
71
+ const bundleLines = text.split("\n");
72
+ const lines = files.map(([key]) => [bundleLines.indexOf(wrapperLine(key)) + 2, key]);
73
+
74
+ return [
75
+ text,
76
+ `__require("statusline.js", "./log").setBundleLines(${JSON.stringify(lines)});`,
77
+ `__require("statusline.js", "./statusline");`,
78
+ "",
79
+ ].join("\n");
80
+ }
81
+
82
+ module.exports = { buildRuntimeBundle };