npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@adamcjm/agy-statusline

v1.0.4

Published

An adaptive, multi-line responsive statusline for Google Antigravity CLI

Readme

agy-statusline

English Documentation

专为 Google Antigravity CLI (agy) 打造的智能自适应响应式底部状态栏(Statusline)。

实时展示当前工作目录、Git 分支、Token 输入输出统计、Prompt Cache 缓存命中率、上下文窗口占用比例,以及模型名称与思考强度。


特性亮点

  • ⚡ 全自动无感配置:安装即自动配置 settings.json,无需手动干预,装完即用!
  • 📁 完整路径与 Git 分支:展示清晰的完整路径(家目录智能缩写为 ~),实时显示 Git 分支。
  • 🎯 Token 与缓存统计:实时展示输入与输出 Token 流量(↑in ↓out)、Prompt Cache 命中率(🎯)、精确的上下文使用百分比及运行模式。
  • 🤖 模型与思考强度:展示原始大小写的模型名称及推理深度(model:effort),独立吸附在最右侧。
  • 📐 精准东亚字符与 Emoji 列宽对齐:原生支持中文路径和 Emoji 占位,分毫不差,杜绝溢出与换行错位。
  • 📱 三级自适应响应式断点:
    • 宽度足够(单行展示):目录在最左侧,紧随其后的是 Token 统计信息,模型与思考强度单独固定在终端最右侧。
    • 宽度变窄(自动换为两行):第一行保留目录在左、模型固定在最右;Token 统计信息挪至第二行顶格靠左对齐。
    • 极窄窗口(自动分三行):三块信息全部靠左对齐,逐行展示,杜绝任何信息被截断或隐藏。

效果预览

1. 宽窗口(单行三栏分布)

~/dev_code/my-project:main  ↑111.5k ↓58.9k 🎯49% • 10.6%/1M (default)                               gemini-3.8-flash:high

2. 中窄窗口(双行响应式)

~/dev_code/my-project:main                                                                            gemini-3.8-flash:high
↑111.5k ↓58.9k 🎯49% • 10.6%/1M (default)

3. 极窄窗口(三行全左对齐)

~/dev_code/my-project:main
↑111.5k ↓58.9k 🎯49% • 10.6%/1M (default)
gemini-3.8-flash:high

快速上手(全自动安装)

直接执行 npm 全局安装:

npm install -g @adamcjm/agy-statusline

⚡ 自动配置说明: 你不需要手动修改任何配置文件! 安装完成时,npm 钩子会自动检测你的用户配置文件 ~/.gemini/antigravity-cli/settings.json,并自动帮你在该文件中写入/覆盖好 statusLine 配置。安装完毕后直接打开或刷新 CLI,自定义状态栏就会立即生效!


底层原理与配置文件结构

Antigravity CLI 通过用户主目录下的 ~/.gemini/antigravity-cli/settings.json 来加载状态栏命令。自动安装程序会在该文件的根对象中注入/覆盖以下配置块:

{
  "statusLine": {
    "type": "command",
    "command": "agy-statusline"
  }
}

手动兜底方式

如果你的系统环境在 npm 安装时跳过了脚本钩子(例如带了 --ignore-scripts),也可以手动生效:

  1. 运行内置的一键配置命令:
    agy-statusline setup
  2. 或在 Antigravity CLI 交互界面直接绑定:
    /statusline agy-statusline

卸载指引

为了干净地移除状态栏并恢复系统默认状态栏,避免出现 command not found 报错,请按以下推荐步骤操作:

# 1. 先清理 settings.json 配置
agy-statusline uninstall
# (或者也可以在 Antigravity CLI 交互界面执行:/statusline reset)

# 2. 卸载 npm 全局包
npm uninstall -g @adamcjm/agy-statusline

开源协议

MIT © adam