73dc31ae-848d-485b-8333-383.../README.md

31 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# MioIsland DeepSeek Balance Plugin
MioIsland刘海岛插件在 MacBook 刘海头部常驻显示 **DeepSeek 余额**和 **Kimi Code 用量**,点开查看明细。
![MioIsland](https://img.shields.io/badge/MioIsland-plugin-blue) ![macOS](https://img.shields.io/badge/macOS-15%2B-black) ![Swift](https://img.shields.io/badge/Swift-6.0-orange)
## 功能
- **刘海头部常驻**`¥` 徽章 + 余额数字随余额比例蓝→红渐变≤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