mimo-ds-usage-pluginOpenCode TUI 插件 - MiMo Token Plan 用量 & DeepSeek 余额监控
0
206
11 in 7 days
33.0
Multi-signal model
29 days ago
2026-07-22
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["mimo-ds-usage-plugin@1.0.3"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["mimo-ds-usage-plugin@1.0.3"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D mimo-ds-usage-pluginopencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
OpenCode / MiMo Code TUI 插件,在侧边栏实时监控 MiMo Token Plan 用量和 DeepSeek 账户余额。
安装
OpenCode(推荐本地文件方式)
注意:OpenCode 加载 npm 包插件存在已知问题,推荐使用本地文件方式安装。
- 克隆本仓库
- 将
packages/opencode/下的mimo-usage.tsx和ds-balance.tsx复制到~/.config/opencode/plugins/ - 创建或编辑
~/.config/opencode/tui.json:
{
"plugin": ["./plugins/mimo-usage.tsx"]
}
MiMo Code
npm install -g mimo-ds-usage-plugin-mimocode
在 ~/.config/mimocode/tui.json 中添加:
{
"plugin": ["mimo-ds-usage-plugin-mimocode"]
}
使用
| 命令 | 说明 |
|---|---|
/mimo |
设置 MiMo 平台 Cookie |
/mimo-logout |
清除 MiMo Cookie |
/ds |
设置 DeepSeek API Key |
/ds-logout |
清除 DeepSeek API Key |
功能
- MiMo Token Plan 用量 — 显示本月和总套餐的进度条、已用/总量
- DeepSeek 余额 — 显示总额、赠金、充值金额
- 自动刷新(每 60 秒)
- 根据当前使用的 provider 自动显示对应面板
- 无套餐时显示"当前未订阅套餐"
- Cookie 过期时提示重新设置
项目结构
mimo-ds-usage-monitor/
├── packages/
│ ├── opencode/ # OpenCode 版本
│ │ ├── mimo-usage.tsx
│ │ ├── ds-balance.tsx
│ │ ├── package.json
│ │ └── README.md
│ └── mimocode/ # MiMo Code 版本
│ ├── mimo-usage.tsx
│ ├── ds-balance.tsx
│ ├── package.json
│ └── README.md
├── tui.json # OpenCode 配置示例
└── README.md
License
MIT