mirror of
https://github.com/kitsiu1211-stack/mio-deepseek-balance.git
synced 2026-08-10 02:54:32 +00:00
31 lines
1.4 KiB
Markdown
31 lines
1.4 KiB
Markdown
# MioIsland DeepSeek Balance Plugin
|
||
|
||
MioIsland(刘海岛)插件:在 MacBook 刘海头部常驻显示 **DeepSeek 余额**和 **Kimi Code 用量**,点开查看明细。
|
||
|
||
  
|
||
|
||
## 功能
|
||
|
||
- **刘海头部常驻**:`¥` 徽章 + 余额数字(随余额比例蓝→红渐变,≤20% 红色脉冲预警);`K` 徽章 + Kimi Code 配额剩余百分比
|
||
- **点开明细面板**:
|
||
- DeepSeek:余额大数字 + 进度条 + 充值明细(本地快照推算)+ 近 24h 消耗
|
||
- Kimi Code:会员等级 + 本周配额用量条(used/limit/remaining)
|
||
|
||
## 数据源
|
||
|
||
- **DeepSeek 余额**:`~/.config/token-bar/status.json`(由 [token_bar.py](https://github.com/kitsiu1211-stack) 每 30 分钟抓取 DeepSeek API 写入)。DeepSeek 无公开账单 API,充值/消耗明细用 `~/.config/token-bar/balance_history.json` 快照差分推算(余额上涨 >¥1 记为充值)
|
||
- **Kimi Code 用量**:`GET https://api.kimi.com/coding/v1/usages`(OAuth token 读自 Kimi Code CLI 凭证 `~/.kimi-code/credentials/kimi-code.json`)
|
||
|
||
## 构建与安装
|
||
|
||
```bash
|
||
./build.sh install # 编译 + ad-hoc 签名 + 装入 ~/.config/codeisland/plugins/
|
||
# 重启 MioIsland 生效
|
||
```
|
||
|
||
arm64 only。插件协议见 [AGENTS.md](AGENTS.md)。
|
||
|
||
## License
|
||
|
||
MIT
|