# ๐ MiniMax Quota Monitor > A [DeepSeek Harness](https://github.com/deepseek-ai/dsh) plugin that displays your MiniMax Coding Plan quota usage directly in the sidebar. [](https://github.com/deepseek-ai/dsh) [](https://github.com/deepseek-ai/dsh) [](https://www.npmjs.com/) [](./LICENSE) **English** ยท **[ไธญๆ](./README.zh-CN.md)** ยท **[ๆฅๆฌ่ช](./README.ja.md)** ยท **[Espaรฑol](./README.es.md)** --- ## โจ Features - **5-Hour Quota Bar** โ real-time progress of your current interval remaining - **Weekly Quota Bar** โ weekly allowance usage at a glance - **Reset Countdown** โ shows exactly when each window resets (e.g. `้็ฝฎไบ 2h 17m`) - **Collapsible Panel** โ click the arrow to collapse/expand; collapsed state shows a compact summary - **Auto Refresh** โ updates every 60 seconds via server-side cache - **Sidebar Integration** โ renders in `sidebar.footer.action`, right above the Settings button - **Lightweight** โ pure React.createElement, no CSS frameworks, no external images ## ๐ธ Preview ``` โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โผ MINIMAX โ โ 5 ๅฐๆถ 42 / 100 (42%) โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ ้็ฝฎไบ 2h 17m โ โ ๆฌๅจ 78 / 100 (78%) โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ ้็ฝฎไบ 3d 12h โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ click to toggle โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โถ MINIMAX 5h: 42% ยท ๅจ: 78%โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ``` ## ๐ Installation ### Quick Install (recommended) ```bash cd ~/.dsh/profiles/web npm link /path/to/this/plugin # then add the patch entry (see below) ``` ### Using pnpm ```bash cd ~/.dsh/profiles/web pnpm add /path/to/this/plugin ``` ### Via npm registry (when published) ```bash cd ~/.dsh/profiles/web pnpm add @dsh-external/minimax-usage ``` ### 1. Add to cordis.patch.yml Append this to `~/.dsh/profiles/web/cordis.patch.yml`: ```yaml - insert: - id: minimax-usage name: '@dsh-external/minimax-usage' ``` ### 2. Set your API key The plugin reads `MINIMAX_API_KEY` from `~/.zshrc.secret` (or your shell secrets file): ```bash # In ~/.zshrc.secret or ~/.bashrc.secret export MINIMAX_API_KEY="your-minimax-api-key-here" ``` Get your API key from [MiniMax Open Platform](https://www.minimaxi.com/). ### 3. Restart & Refresh ```bash # Restart the DSH web server dsh web # Hard-refresh your browser (Cmd+Shift+R / Ctrl+Shift+R) ``` ## โ๏ธ Configuration | Environment Variable | Description | Default | |---|---|---| | `MINIMAX_API_KEY` | Your MiniMax API key | *(required)* | The API key is loaded at request time from `~/.zshrc.secret` via `source`. If the key is not set, the plugin will display an error message in the sidebar instead of crashing. ## ๐๏ธ Architecture ``` โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ Host (Node.js) โ โ lib/index.js โ โ โโ registers /api/minimax/quotaโ โ โโ reads MINIMAX_API_KEY โ โ โโ calls MiniMax REST API โ โ โโ 60s server-side cache โ โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ โ fetch('/api/minimax/quota') โผ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ Client (Browser) โ โ lib/client.js โ โ โโ Slot: sidebar.footer.action โ โ โโ Collapsible QuotaCard โ โ โโ 60s auto-refresh โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ``` ## ๐ค Contributing 1. Fork this repository 2. Create your feature branch (`git checkout -b feature/amazing-feature`) 3. Commit your changes (`git commit -m 'Add amazing feature'`) 4. Push to the branch (`git push origin feature/amazing-feature`) 5. Open a Pull Request ## ๐ Notes - The MiniMax API's `remains_time` / `weekly_remains_time` fields are unreliable (may return ~96 days for a 5h window). This plugin derives reset countdowns from `end_time - Date.now()` instead, which is accurate. - The `end_time`, `start_time`, `weekly_end_time`, and `weekly_start_time` fields are unix-millisecond timestamps despite the field names. - Quota percentages are reported by the API as 0โ100 integers. ## ๐ DSH Plugin Manifest This plugin is designed for **DeepSeek Harness** and follows the DSH npm-package plugin format: - **`dsh.bundle.patch`** โ Cordis patch file for automatic registration - **`dsh.client.inject`** โ No external service dependencies - **`dsh.client.platform`** โ `web` (browser-only client) - **Slot** โ `sidebar.footer.action` ### Tags / Keywords `deepseek-harness` ยท `dsh` ยท `dsh-plugin` ยท `dsh-client-plugin` ยท `minimax` ยท `quota` ยท `usage-monitor` ยท `sidebar` ยท `coding-plan` ## ๐ License [MIT](./LICENSE) ยฉ 2026 ovensi ---
Built for DeepSeek Harness ๐