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

pi-antigravity-status

v0.2.0

Published

Additive Pi status line for the active Antigravity account quota.

Readme

pi-antigravity-status 在 Pi 状态栏中显示当前 pi-antigravity 账号的配额状态,包括当前账号、 5 小时配额、每周配额、重置倒计时和剩余额度进度条。插件采用独立的 Extension Status, 不会替换现有 footer。

AG ra***[email protected] │ 5h 1h40m ███░░░░░ 31.8% │ Week 17h33m █████░░░ 67.8%

本项目是 pi-antigravity 的非官方配套扩展,与 Google 不存在从属或认可关系。

功能特性

  • 仅在当前模型使用 antigravity Provider 时显示配额状态。
  • 显示当前模型系列对应的 5 小时共享配额和每周共享配额。
  • 使用 8 格进度条表示剩余额度,同时保留精确百分比和重置倒计时。
  • 聚合配额不可用时,自动回退到当前模型的独立配额。
  • 邮箱本地部分在长度允许时保留首尾各 2 个字符;较短账号保留首尾各 1 个字符。
  • OAuth token、Project ID 和其他凭据字段不会进入状态栏。
  • 通过独立的 Extension Status key 与 statusline-pi 及其他扩展并存。

运行要求

  • Pi Coding Agent >= 0.80.0
  • pi-antigravity >= 0.8.1
  • 已获得相应 Antigravity / Cloud Code Assist 服务权限的 Google 账号

本项目在功能上依赖 pi-antigravity:

  • pi-antigravity 负责注册 antigravity Provider,并管理 Google OAuth、凭据和关联账号。
  • 本插件通过 Pi 的 modelRegistry 获取 Provider 凭据,读取 antigravity-accounts.json 中的 当前账号元数据,并请求配额接口。
  • 本插件不导入或复制 pi-antigravity 的运行时代码。
  • Pi 不会自动安装通过 peerDependencies 声明的其他 Pi Package,因此必须单独安装 pi-antigravity。

缺少已安装并完成认证的 pi-antigravity Provider 时,插件不会显示配额状态。

安装

依次安装 Provider 和状态栏插件:

pi install npm:pi-antigravity
pi install npm:pi-antigravity-status

重启 Pi 或执行 /reload,然后完成认证并选择 Antigravity 模型:

/login antigravity
/model antigravity/gemini-3.8-flash

已完成 pi-antigravity 安装和认证的环境,仅需安装状态栏插件并执行 /reload。

Git 安装方式:

pi install https://github.com/raythunder/pi-antigravity-status

使用方式

状态栏按照以下策略自动刷新:

  • Antigravity 会话启动后立即刷新
  • 当前模型或活动账号发生变化后刷新
  • 每分钟基于缓存数据更新重置倒计时
  • 配额 API 的请求频率不超过每 5 分钟一次

手动刷新命令:

/antigravity-status refresh

状态栏兼容性

插件仅调用:

ctx.ui.setStatus("antigravity-usage", text);

插件不会调用 ctx.ui.setFooter()。statusline-pi 会读取并追加 Extension Status, 因此两个扩展可以同时启用,无需 fork 或替换现有状态栏实现。

开发与验证

bun test

测试范围包括账号脱敏、凭据解析、配额解析、回退逻辑、进度条格式和状态栏输出。

友情链接

致谢

  • pi-antigravity:提供 Provider、配额接口行为和 关联账号存储格式。
  • Pi Extension API:提供 ctx.ui.setStatus() 和 Extension Status 集成能力。