mickyyang-1407

Usage Radar — AI skill for Claude Code

AI community

用量雷達 Usage Radar: a private, self-hosted dashboard for your AI subscription quotas (Claude, Codex, Gemini via CodexBar).

How to install Usage Radar

This entry records only its repository, not the path inside it, so there is no exact command to give. Open mickyyang-1407/usage-radar and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Usage Radar does

用量雷達 Usage Radar: a private, self-hosted dashboard for your AI subscription quotas (Claude, Codex, Gemini via CodexBar). Mobile via Tailscale Serve. Python stdlib · MIT.

Alternatives in AI

  • AIUsage — One dashboard to manage all your AI subscriptions — track quotas, costs, accounts, Claude Code proxy, and Code 635 ★
  • Skillport — Bring Agent Skills to Any AI Agent and Coding Agent — via CLI or MCP 408 ★
  • Image Use — Use your ChatGPT subscription to generate images from the command line — no OPENAI_API_KEY, no gateway, no dae 373 ★

README

用量雷達(Usage Radar)

在自己的Mac上跑一個小網頁,用手機隨時看各家AI訂閱(Claude、Codex、Gemini…)**還剩多少額度、什麼時候重置**。

[English README](README.en.md)

手機(淺色) 手機(深色)
手機淺色 手機深色

![桌面](docs/screenshots/radar-desktop-light.png)

截圖全部是**示範資料**,不是任何人的真實額度。

它做什麼、不做什麼

  • 每5分鐘在背景讀一次各家額度(瀏覽器關掉也照讀),網頁每30秒更新畫面。
  • 每個數字都標示來源和資料時間。
  • 讀取失敗時保留最近一次有效值,並標出失敗時間和原因;不會把舊數字假裝成新的。
  • 沒裝讀取工具時顯示「不可用」;不知道的值顯示「—」,不會當成0。
  • 三個分頁:雷達(總覽、即將重置、雷達儀表與各帳戶細節)、趨勢(24小時/7天/30天曲線)、設定(資料來源狀態)。
  • 跟隨系統淺色/深色模式。
  • 不保存、不顯示你的email、帳號ID或任何金鑰;只存百分比、重置時間和credits餘額。
  • 只用Python標準函式庫,不用pip install任何東西。

需求

  • macOS(其他系統也能跑網頁,但讀額度用的CodexBar是Mac app)
  • Python 3.9以上:打開「終端機」輸入python3 --version檢查。沒有的話,macOS會跳出視窗請你安裝「命令列開發者工具」,按安裝即可。
  • CodexBar:負責實際讀取各家額度的Mac選單列app(附命令列工具codexbar)。
  • (想用手機看)Tailscale,Mac和手機都要裝。

一、安裝CodexBar

  1. 用Homebrew安裝(或到 下載):

    brew install --cask codexbar
  2. 打開CodexBar,在它的設定裡把你有訂閱的服務打開、照指示登入。

  3. 確認命令列工具能用:

    codexbar --version
    codexbar usage --provider claude --format json

    第二行若印出一段JSON(裡面有`usedPercent`),代表讀得到。用Homebrew安裝會自動把`codexbar`指令放進`/opt/homebrew/bin`;若顯示`command not found`,請在CodexBar設定裡找安裝命令列工具(CLI)的選項。

用量雷達只呼叫`codexbar usage … --format json`,不會碰你的瀏覽器cookie、鑰匙圈或任何密碼。

二、下載並啟動

git clone <這個repo的網址> usage-radar
cd usage-radar
python3 server.py

看到 `打開 http://127.0.0.1:8844` 後,用Mac的瀏覽器打開 。

**第一次啟動會是示範模式**(頂端有一條琥珀色「DEMO」標籤),讓你先看到畫面長什麼樣。要讀自己的額度:

cp config.example.json config.json
python3 server.py

停止服務:在終端機按`Ctrl` + `C`。

設定檔config.json

{
  "host": "127.0.0.1",
  "port": 8844,
  "refresh_seconds": 300,
  "codexbar_bin": "",
  "data_dir": "data",
  "allowed_logins": [],
  "providers": [
    { "id": "claude", "label": "Claude", "type": "codexbar", "provider": "claude" },
    { "id": "codex"