爱意满满的作品展示区。
hanzhang1024

做了个 macOS 菜单栏工具,看 Cursor、Grok Bot、Codex、Kimi 还剩多少额度

  •  
  •   hanzhang1024 · 3 days ago · 798 views

    Cursor 、Grok Bot 、Codex 、Kimi 的剩余额度散落在各自的页面里。写了个只待在 macOS 菜单栏的小工具,读这台电脑上已经登录的账号,瞄一眼就知道还剩多少。

    菜单栏上的百分比是剩余。低于 40% 变橙色,低于 15% 变红色。点开可以看到每个窗口的重置时间。

    • Cursor 、Grok Bot:读 Cursor 本地登录。第一次打开会问钥匙串「 Cursor Safe Storage 」,选始终允许即可
    • Codex:读 ~/.codex/auth.json
    • Kimi:优先用还没过期的 Kimi Code 登录,否则用桌面版已经保存的密钥。不会去刷新这些登录

    不会另外把 token 存一份。

    仓库: https://github.com/QinGeneral/ai-quota-bar

    git clone https://github.com/QinGeneral/ai-quota-bar
    cd ai-quota-bar
    make install
    

    也可以从 GitHub Actions 下载名为 QuotaBar-macos 的 zip 。产物是临时签名,第一次打不开的话:

    xattr -cr QuotaBar.app
    open QuotaBar.app
    

    菜单栏

    菜单

    这些用量接口没有公开的稳定契约,字段一变会显示读取失败,不会把空数据当成 0%。MIT 。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2212 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 14:14 · PVG 22:14 · LAX 06:14 · JFK 09:14
    ♥ Do have faith in what you're doing.