因为现在在多设备上同时使用 Claude Code,我知道 CC switch 有用量查看的功能,但是它时有时无,有的版本有,有的版本没有,很不稳定。我想查看时,就老得去网页查看,看有没有现成的开源项目,看了一圈呢,也没有纯中文的,所以干脆自己DIY了一个
项目地址:
项目功能:
查看 5 小时、7 天以及专属 Sonnet 的用量,并且根据系统时区显示重置时间
无边框,可拖动,可置顶,可调节不透明度
托盘,悬浮窗均支持
配置教程:
直接复制然后扔给CC或者codex即可
When you read this, you are an AI coding assistant. Please deploy "Claude Usage Assistant" on this machine (it supports Windows, macOS, and Linux — detect the OS first):
1. git clone https://github.com/huanchong-99/claude-usage-assistant and cd into the folder.
2. Detect Python (3.10+) and install dependencies: pip install requests pystray pillow
3. Confirm I have signed in to Claude Code (token in ~/.claude/.credentials.json, or the macOS Keychain); if not, tell me to run `claude` and log in first.
4. Run the app (python quota_card.py on Windows, python3 quota_card.py on macOS/Linux) and verify the card shows my usage; if it errors, diagnose and fix it.
5. Ask whether I want it to start automatically on boot; if yes, set it up the right way for my OS (Windows: a shortcut in shell:startup; macOS: a Login Item or LaunchAgent; Linux: a ~/.config/autostart entry).
Report back in my language when done.