---
title: "claude-dashboard"
url: "https://claudemods.dev/zh-cn/builds/claude-dashboard-2487d7"
source: "https://github.com/uppinote20/claude-dashboard"
source_type: "github"
repo: "https://github.com/uppinote20/claude-dashboard"
author: "uppinote20"
author_handle: "uppinote20"
stars: 593
category: "其他"
categories: ["other"]
tags: []
permission_level: 3
scan_complete: false
install: "claude plugin marketplace add uppinote20/claude-dashboard\nclaude plugin install claude-dashboard"
added: "2026-10-05T17:30:14.776Z"
updated: "2026-11-03T23:02:24Z"
locale: "zh-cn"
content_locale: "zh-cn"
---

# claude-dashboard

Claude Code 的统一状态行，用于监控多 CLI（Claude、Codex、Gemini、Antigravity、z.ai）的用量、上下文、速率限制和成本追踪

## Description

# claude-dashboard

![许可证](https://img.shields.io/github/license/uppinote20/claude-dashboard)
![Stars](https://img.shields.io/github/stars/uppinote20/claude-dashboard)

面向 Claude Code 的完整状态行插件——统一监控 Claude、Codex、Gemini、Antigravity 和 z.ai CLI 的用量，并提供上下文、速率限制、成本追踪和模块化小组件系统。

## 演示

![演示](demo.gif)

## 安装

**要求：** Claude Code v1.0.80+ / Node.js 18+

### 从插件市场安装

```
/plugin marketplace add uppinote20/claude-dashboard
/plugin install claude-dashboard
/claude-dashboard:setup
```

### 手动安装

```bash
git clone https://github.com/uppinote20/claude-dashboard.git "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/claude-dashboard"
/claude-dashboard:setup
```

> `/claude-dashboard:setup` 会在 `plugins/cache/claude-dashboard/claude-dashboard/` 下查找插件，
> 但手动克隆到 `plugins/claude-dashboard/` 并不符合这个路径——setup 命令的 shim 查找不会找到任何可复制的内容。请把
> `statusLine.command` 直接指向 `settings.json` 中克隆目录的 `dist/index.js`（例如 `node "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/claude-dashboard/dist/index.js"`），
> 并注意手动安装不会自动获取版本——每次发布后都要自行 `git pull`，并更新这个路径。

## 显示模式

**紧凑（1 行）- 默认：**

![紧凑](images/compact.png)

> 模型、上下文进度条、成本、速率限制（5h/7d）或 z.ai 用量（由提供商互斥）

**普通（2 行）：**

![普通](images/normal.png)

> 增加项目资料、会话 ID、会话时长、消耗速率、待办进度

**详细（6 行）：**

![详细](images/detailed.png)

> 增加耗尽时间、配置数量、工具/代理状态、缓存命中、性能徽章、token 明细、预测、预算、Codex/Gemini/Antigravity 用量

多提供商支持：安装后自动检测 z.ai/ZHIPU、Codex、Gemini 和 Antigravity。


## 小组件

| 类别 | 小组件 | 描述 |
|----------|--------|-------------|
| **核心** | `model` | 带 emoji 的模型名称和版本（例如 `Opus 5.5`）、Opus/Sonnet/Fable 的 effort 级别（MAX/X/H/M/L），以及 Opus 的快速模式（↯）。从 stdin 读取实时的 `effort.level` / `fast_mode`；旧版 Claude Code 则回退到 `settings.json` |
| | `context` | 进度条、百分比、token（🟢 0-50% / 🟡 51-80% / 🔴 81-100%） |
| | `contextBar` | 仅显示进度条（`context` 的子小组件） |
| | `contextPercentage` | 仅显示百分比（`context` 的子小组件） |
| | `contextUsage` | 仅显示 token 数量，例如 `42K/200K`（`context` 的子小组件） |
| | `cost` | 会话成本（USD） |
| | `projectInfo` | 目录 + git 分支（可点击的 OSC8 链接）+ ahead/behind（↑↓），来自 project_dir 的子路径，以及 worktree 指示器（🌳） |
| **速率限制** | `rateLimit5h` | 5 小时速率限制和重置倒计时 |
| | `rateLimit7d` | 7 天速率限制（Pro 和 Max） |
| | `rateLimit7dSonnet` | 7 天 Sonnet 限制（仅 Max）——已弃用 ~2026-06：Anthropic 在 Sonnet 5 发布时将其合并到统一的每周配额，因此 API 返回 `null`，此字段恢复前小组件会保持隐藏 |
| | `rateLimit7dFable` | 7 天 Fable 限制（仅 Max） |
| **会话** | `sessionId` | 会话 ID（短 8-char） |
| | `sessionIdFull` | 会话 ID（完整 UUID） |
| | `sessionName` | 来自 /rename 命令的会话名称 |
| | `sessionDuration` | 会话时长 |
| | `lastPrompt` | 带时间戳的上一条用户提示 |
| | `configCounts` | CLAUDE.md、AGENTS.md、rules、MCPs、hooks、+Dirs |
| **活动** | `toolActivity` | 带目标的运行中/已完成工具（例如 `Read(app.ts)`） |
| | `agentStatus` | 已解析模型的子代理进度，例如 `Explore(Opus)`（来自 Agent 工具的 `model` 参数或 `CLAUDE_CODE_SUBAGENT_MODEL`） |
| | `todoProgress` | todo 完成率 |
| **分析** | `burnRate` | 每分钟 token 消耗，会话平均值（输入 + 缓存写入 + 输出） |
| | `cacheHit` | 缓存命中率百分比（上一次请求） |
| | `promptCache` | 会话提示缓存状态：♨️ 温热，还剩变冷前的时间 / ❄️ 冷，命中率、未命中次数，例如 `♨️ 4m 91% miss 2`（来自 `prompt_cache`，Claude Code ≥ 2.1.251）。温热→冷的切换会自动发生；设置 `statusLine.refreshInterval`（例如 `60`）可让闲置时的分钟倒计时继续更新 |
| | `promptCacheState` | 仅显示温热/冷图标和剩余时间，例如 `♨️ 4m`（`promptCache` 的子小组件） |
| | `promptCacheHit` | 仅显示会话缓存命中率（`promptCache` 的子小组件） |
| | `promptCacheMisses` | 仅显示未命中次数，例如 `miss 2`；为 0 时隐藏（`promptCache` 的子小组件） |
| | `depletionTime` | 预计距离速率限制还有多久（近似值）¹ |
| **多 CLI** | `codexUsage` | OpenAI Codex CLI 用量（未安装时自动隐藏）² |
| | `geminiUsage` | Google Gemini CLI - 当前模型（未安装时自动隐藏）³ |
| | `geminiUsageAll` | Google Gemini CLI - 所有模型（未安装时自动隐藏）³ |
| | `antigravityUsage` | Google Antigravity CLI - 按模型系列划分的每周配额（未安装时自动隐藏）⁸ |
| | `antigravityUsageAll` | Google Antigravity CLI - 按模型划分的配额（未安装时自动隐藏）⁸ |
| | `zaiUsage` | z.ai/ZHIPU 用量（未使用 z.ai 时自动隐藏）⁴ |
| **洞察** | `tokenBreakdown` | 输入/输出/缓存写入/读取 token 明细 |
| | `performance` | 综合效率徽章（缓存命中 + 输出比例） |
| | `forecast` | 根据会话速率估算每小时成本 |
| | `budget` | 每日支出与配置的预算上限对比⁵ |
| | `tokenSpeed` | 输出 token 生成速度（tok/s），会话平均值 |
| | `tokenSpeedLast` | 仅显示最近一次响应的输出 token 生成速度 |
| | `todayCost` | 今天所有会话的总支出 |
| **状态** | `peakHours` | 带倒计时的高峰时段指示器（[基于 PeakClaude](https://github.com/pforret/PeakClaude)）⁶ |
| | `tagStatus` | 超前于匹配 git 标签的提交数（默认模式 `v*`，可通过 `tagPatterns` 自定义）⁷ |
| | `slashCommand` | 当前轮次活动中的 slash 命令（🎯），下一条纯文本消息到来时清除 |
| | `agentMode` | 会话代理身份：👤 自定义代理（通过 `/agent <name>`）或 🤖 子代理类型 |
| **信息** | `linesChanged` | 未提交的新增/删除行数，包括未跟踪文件（+N -N） |
| | `outputStyle` | 当前输出样式（为 "default" 时隐藏） |
| | `version` | Claude Code 版本显示 |
| | `vimMode` | Vim 模式（NORMAL/INSERT），禁用 Vim 时自动隐藏 |
| | `apiDuration` | API 时间占整个会话时间的百分比 |

> ¹ 假设所有用量都来自本会话；会话运行时间越长，估算越准确。
> ² 找不到 `~/.codex/auth.json` 时自动隐藏。 ³ 找不到 `~/.gemini/oauth_creds.json` 时自动隐藏——Gemini CLI 个人层级已于 2026-06-18 退役，改由 Antigravity CLI 取代（企业层级仍受支持）。 ⁴ 无法通过 `ANTHROPIC_BASE_URL` 检测到时自动隐藏。 ⁵ 配置中需要 `"dailyBudget"`。 ⁶ Peak = 工作日太平洋时间 5-11 AM；显示距离下一次切换的倒计时。 ⁷ 使用 `tagPatterns` 配置（默认 `["v*"]`）；当可访问标签没有匹配任何模式时自动隐藏。 ⁸ 找不到 `~/.gemini/antigravity-cli/antigravity-oauth-token` 时自动隐藏。

i18n：支持英语和韩语（自动检测或通过 setup 设置）。

## 配置

```bash
# Preset modes
/claude-dashboard:setup compact             # 1 line (default)
/claude-dashboard:setup normal en pro       # 2 lines, English, Pro plan
/claude-dashboard:setup detailed ko max     # 6 lines, Korean, Max plan

# Custom mode: control widget order and line composition
# Format: "widget1,widget2,...|widget3,widget4,..." (| separates lines)
/claude-dashboard:setup custom auto max "model,context,cost|projectInfo,todoProgress"
```

**计划差异：**

| 功能 | Max | Pro |
|---------|--------|-----|
| 5h 速率限制 + 倒计时 | ✅ | ✅ |
| 7d 所有模型 | ✅ | ❌ |

<details>
<summary><strong>高级配置</strong></summary>

**交互模式：** 不带参数运行 `/claude-dashboard:setup`。适合选择预设；如果要完整控制小组件，请使用直接模式或直接编辑 JSON 文件。

**显示模式预设**（`zaiUsage` 和 `rateLimit*` 会根据提供商互斥）：

| 模式 | 行数 | 小组件 |
|---------|-------|---------|
| `compact` | 1 | model, context, cost, rateLimit5h/7d/7dSonnet, zaiUsage |
| `normal` | 2 | + projectInfo, sessionId, sessionDuration, burnRate, todoProgress |
| `detailed` | 6 | + depletionTime, configCounts, toolActivity, agentStatus, cacheHit, promptCache, performance, tokenBreakdown, forecast, budget, codexUsage, geminiUsage, antigravityUsage, linesChanged, outputStyle, version, peakHours, lastPrompt, vimMode, apiDuration, tagStatus |

**配置文件**（`~/.claude/claude-dashboard.local.json`）：

```json
{
  "language": "auto",
  "plan": "max",
  "displayMode": "custom",
  "lines": [
    ["model", "context", "cost", "rateLimit5h"],
    ["projectInfo", "todoProgress"]
  ],
  "theme": "default",
  "separator": "pipe",
  "dailyBudget": 15,
  "disabledWidgets": [],
  "modPane": "detailed",
  "modBand": "MC$R|BDO",
  "modBandDefault": false,
  "cache": { "ttlSeconds": 60 }
}
```

或者使用预设简写快速配置：
```json
{
  "preset": "MC$R|BDO",
  "theme": "tokyoNight",
  "separator": "dot"
}
```

**主题：** `default`（pastel）/ `minimal`（monochrome）/ `catppuccin` / `catppuccinLatte`（light-mode）/ `dracula` / `gruvbox` / `nord` / `tokyoNight` / `solarized`

**分隔符：** `pipe`（│，默认）/ `space` / `dot`（·）/ `arrow`（›）

**预设快捷方式：** 使用单个字符的快速布局——`"preset": "MC$R|BDO"`（M=model，C=context，$=cost，R=rateLimit5h 等）

**预算追踪：** 设置 `"dailyBudget": 15` 以追踪每日支出。在 80% 显示 ⚠️，在 95% 显示 🚨。

**标签状态：** 通过 `"tagPatterns": ["v*", "release-*"]` 自定义 `tagStatus` 模式。默认是 `["v*"]`。当可访问标签没有匹配模式时，小组件会自动隐藏。

**小组件开关：** 将小组件 ID 加入 `disabledWidgets`，即可从任何显示模式中隐藏。

**Mod 布局：** `modPane`（`/claude-dashboard-pane` 面板，默认 `detailed`）和 `modBand`（`/claude-dashboard-band` 横条，默认为状态行布局）可以使用显示模式名称（`compact` / `normal` / `detailed`）或类似 `"MC$R|BDO"` 的预设字符串。设置 `"modBandDefault": true` 可在会话开始时打开横条。请参阅 [Mods](#mods-pane--band)。

**颜色图例：** 🟢 0-50% 安全 / 🟡 51-80% 警告 / 🔴 81-100% 严重

</details>

## 命令

### `/claude-dashboard:setup`

配置状态行的显示模式、语言和计划。请参阅 [配置](#configuration)。

### `/claude-dashboard:check-usage`

一次检查所有 AI CLI（Claude、Codex、Gemini、Antigravity、z.ai）的用量限制，并建议当前可用容量最多的 CLI。

```bash
/claude-dashboard:check-usage              # Interactive output with colors
/claude-dashboard:check-usage --json       # JSON output for scripting
/claude-dashboard:check-usage --lang ko    # Specify language
```

![check-usage](images/check-usage.png)

### `/claude-dashboard:setup-alias`

添加 `check-ai` shell 别名，以便从终端快速检查所有 AI CLI 的用量。支持 macOS/Linux（zsh/bash）和 Windows（PowerShell）。

```bash
/claude-dashboard:setup-alias
```

设置完成后：
```bash
check-ai          # Pretty output
check-ai --json   # JSON output for scripting
```

### `/claude-dashboard:update`

修复或验证 statusLine shim。通常不需要——`/plugin update` 后，状态行会自行获取新版本。如果禁用了 hooks，或状态行停止更新，请使用它。

```bash
/claude-dashboard:update
```

## Mods（面板和横条）

claude-dashboard 也作为 Claude Code **mod**（function-hook 插件，早期访问版，已在 Claude Code 2.1.289 上测试）随附。它和同一个插件一起打包（`hooks/hooks.json` → `"modules": ["../dist/mod.js"]`），所以不需要额外安装。Mods 用于绘制

## Install

```
claude plugin marketplace add uppinote20/claude-dashboard
claude plugin install claude-dashboard
```

## Original README

# claude-dashboard

![License](https://img.shields.io/github/license/uppinote20/claude-dashboard)
![Stars](https://img.shields.io/github/stars/uppinote20/claude-dashboard)

Comprehensive status line plugin for Claude Code — unified usage monitoring across Claude, Codex, Gemini, Antigravity, and z.ai CLIs, with context, rate limits, cost tracking, and a modular widget system.

## Demo

![Demo](demo.gif)

## Installation

**Requirements:** Claude Code v1.0.80+ / Node.js 18+

### From Plugin Marketplace

```
/plugin marketplace add uppinote20/claude-dashboard
/plugin install claude-dashboard
/claude-dashboard:setup
```

### Manual Installation

```bash
git clone https://github.com/uppinote20/claude-dashboard.git "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/claude-dashboard"
/claude-dashboard:setup
```

> `/claude-dashboard:setup` looks for the plugin under `plugins/cache/claude-dashboard/claude-dashboard/`,
> which a manual clone into `plugins/claude-dashboard/` does not match — the setup command's shim lookup
> will find nothing to copy. Point `statusLine.command` in `settings.json` directly at your clone's
> `dist/index.js` instead (e.g. `node "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/claude-dashboard/dist/index.js"`),
> and note that manual installs do not get automatic version pickup — `git pull` and update the path
> yourself after each release.

## Display Modes

**Compact (1 line) - Default:**

![Compact](images/compact.png)

> Model, context progress bar, cost, rate limits (5h/7d) or z.ai usage (mutually exclusive by provider)

**Normal (2 lines):**

![Normal](images/normal.png)

> Adds project info, session ID, session duration, burn rate, todo progress

**Detailed (6 lines):**

![Detailed](images/detailed.png)

> Adds depletion time, config counts, tool/agent status, cache hit, performance badge, token breakdown, forecast, budget, Codex/Gemini/Antigravity usage

Multi-provider support: z.ai/ZHIPU, Codex, Gemini, Antigravity auto-detected when installed.


## Widgets

| Category | Widget | Description |
|----------|--------|-------------|
| **Core** | `model` | Model name and version with emoji (e.g. `Opus 5.5`), effort level for Opus/Sonnet/Fable (MAX/X/H/M/L), fast mode for Opus (↯). Reads the live `effort.level` / `fast_mode` from stdin, falling back to `settings.json` on older Claude Code |
| | `context` | Progress bar, percentage, tokens (🟢 0-50% / 🟡 51-80% / 🔴 81-100%) |
| | `contextBar` | Progress bar only (sub-widget of `context`) |
| | `contextPercentage` | Percentage only (sub-widget of `context`) |
| | `contextUsage` | Token count only, e.g. `42K/200K` (sub-widget of `context`) |
| | `cost` | Session cost in USD |
| | `projectInfo` | Directory + git branch (clickable OSC8 link) + ahead/behind (↑↓), subpath from project_dir, worktree indicator (🌳) |
| **Rate Limits** | `rateLimit5h` | 5-hour rate limit with reset countdown |
| | `rateLimit7d` | 7-day rate limit (Pro and Max) |
| | `rateLimit7dSonnet` | 7-day Sonnet limit (Max only) — deprecated ~2026-06: Anthropic merged it into the unified weekly bucket at the Sonnet 5 launch, so the API returns `null` and the widget stays hidden until/unless the field returns |
| | `rateLimit7dFable` | 7-day Fable limit (Max only) |
| **Session** | `sessionId` | Session ID (short 8-char) |
| | `sessionIdFull` | Session ID (full UUID) |
| | `sessionName` | Session name from /rename command |
| | `sessionDuration` | Session duration |
| | `lastPrompt` | Last user prompt with timestamp |
| | `configCounts` | CLAUDE.md, AGENTS.md, rules, MCPs, hooks, +Dirs |
| **Activity** | `toolActivity` | Running/completed tools with targets (e.g., `Read(app.ts)`) |
| | `agentStatus` | Subagent progress with resolved model, e.g. `Explore(Opus)` (from the Agent tool's `model` param or `CLAUDE_CODE_SUBAGENT_MODEL`) |
| | `todoProgress` | Todo completion rate |
| **Analytics** | `burnRate` | Token consumption per minute, session average (input + cache write + output) |
| | `cacheHit` | Cache hit rate percentage (last request) |
| | `promptCache` | Session prompt-cache health: ♨️ warm with time left before it goes cold / ❄️ cold, hit ratio, miss count, e.g. `♨️ 4m 91% miss 2` (from `prompt_cache`, Claude Code ≥ 2.1.251). The warm→cold switch happens on its own; set `statusLine.refreshInterval` (e.g. `60`) to keep the minute countdown ticking while idle |
| | `promptCacheState` | Warm/cold icon + time left only, e.g. `♨️ 4m` (sub-widget of `promptCache`) |
| | `promptCacheHit` | Session cache hit ratio only, e.g. `91%` (sub-widget of `promptCache`) |
| | `promptCacheMisses` | Miss count only, e.g. `miss 2`; hidden at 0 (sub-widget of `promptCache`) |
| | `depletionTime` | Estimated time to rate limit (approx)¹ |
| **Multi-CLI** | `codexUsage` | OpenAI Codex CLI usage (auto-hide if not installed)² |
| | `geminiUsage` | Google Gemini CLI - current model (auto-hide if not installed)³ |
| | `geminiUsageAll` | Google Gemini CLI - all models (auto-hide if not installed)³ |
| | `antigravityUsage` | Google Antigravity CLI - weekly quota by model family (auto-hide if not installed)⁸ |
| | `antigravityUsageAll` | Google Antigravity CLI - per-model quota (auto-hide if not installed)⁸ |
| | `zaiUsage` | z.ai/ZHIPU usage (auto-hide if not using z.ai)⁴ |
| **Insights** | `tokenBreakdown` | Input/output/cache write/read token breakdown |
| | `performance` | Composite efficiency badge (cache hit + output ratio) |
| | `forecast` | Estimated hourly cost based on session rate |
| | `budget` | Daily spending vs configured budget limit⁵ |
| | `tokenSpeed` | Output token generation speed (tok/s), session average |
| | `tokenSpeedLast` | Output token generation speed of the most recent response only |
| | `todayCost` | Total spending across all sessions today |
| **Status** | `peakHours` | Peak hours indicator with countdown ([based on PeakClaude](https://github.com/pforret/PeakClaude))⁶ |
| | `tagStatus` | Commits ahead of matched git tags (default pattern `v*`, customize via `tagPatterns`)⁷ |
| | `slashCommand` | Active slash command for the current turn (🎯), cleared by next plain-text message |
| | `agentMode` | Session agent identity: 👤 custom agent (via `/agent <name>`) or 🤖 subagent type |
| **Info** | `linesChanged` | Uncommitted lines added/removed, including untracked files (+N -N) |
| | `outputStyle` | Current output style (hidden when "default") |
| | `version` | Claude Code version display |
| | `vimMode` | Vim mode (NORMAL/INSERT), auto-hides when vim disabled |
| | `apiDuration` | API time as % of total session time |

> ¹ Assumes all utilization came from this session; improves as session runs longer.
> ² Auto-hides if `~/.codex/auth.json` not found. ³ Auto-hides if `~/.gemini/oauth_creds.json` not found — Gemini CLI personal tiers were retired 2026-06-18 in favor of Antigravity CLI (enterprise still supported). ⁴ Auto-hides if not detected via `ANTHROPIC_BASE_URL`. ⁵ Requires `"dailyBudget"` in config. ⁶ Peak = weekdays 5-11 AM PT; shows countdown to next transition. ⁷ Uses `tagPatterns` config (default `["v*"]`); auto-hides when no pattern matches a reachable tag. ⁸ Auto-hides if `~/.gemini/antigravity-cli/antigravity-oauth-token` not found.

i18n: English and Korean supported (auto-detect or set via setup).

## Configuration

```bash
# Preset modes
/claude-dashboard:setup compact             # 1 line (default)
/claude-dashboard:setup normal en pro       # 2 lines, English, Pro plan
/claude-dashboard:setup detailed ko max     # 6 lines, Korean, Max plan

# Custom mode: control widget order and line composition
# Format: "widget1,widget2,...|widget3,widget4,..." (| separates lines)
/claude-dashboard:setup custom auto max "model,context,cost|projectInfo,todoProgress"
```

**Plan differences:**

| Feature | Max | Pro |
|---------|-----|-----|
| 5h rate limit + countdown | ✅ | ✅ |
| 7d all models | ✅ | ❌ |

<details>
<summary><strong>Advanced Configuration</strong></summary>

**Interactive Mode:** Run `/claude-dashboard:setup` without arguments. Best for preset selection; for full widget control, use Direct Mode or edit the JSON file directly.

**Display Mode Presets** (`zaiUsage` and `rateLimit*` are mutually exclusive based on provider):

| Mode | Lines | Widgets |
|------|-------|---------|
| `compact` | 1 | model, context, cost, rateLimit5h/7d/7dSonnet, zaiUsage |
| `normal` | 2 | + projectInfo, sessionId, sessionDuration, burnRate, todoProgress |
| `detailed` | 6 | + depletionTime, configCounts, toolActivity, agentStatus, cacheHit, promptCache, performance, tokenBreakdown, forecast, budget, codexUsage, geminiUsage, antigravityUsage, linesChanged, outputStyle, version, peakHours, lastPrompt, vimMode, apiDuration, tagStatus |

**Configuration file** (`~/.claude/claude-dashboard.local.json`):

```json
{
  "language": "auto",
  "plan": "max",
  "displayMode": "custom",
  "lines": [
    ["model", "context", "cost", "rateLimit5h"],
    ["projectInfo", "todoProgress"]
  ],
  "theme": "default",
  "separator": "pipe",
  "dailyBudget": 15,
  "disabledWidgets": [],
  "modPane": "detailed",
  "modBand": "MC$R|BDO",
  "modBandDefault": false,
  "cache": { "ttlSeconds": 60 }
}
```

Or use preset shorthand for quick configuration:
```json
{
  "preset": "MC$R|BDO",
  "theme": "tokyoNight",
  "separator": "dot"
}
```

**Themes:** `default` (pastel) / `minimal` (monochrome) / `catppuccin` / `catppuccinLatte` (light-mode) / `dracula` / `gruvbox` / `nord` / `tokyoNight` / `solarized`

**Separators:** `pipe` (│, default) / `space` / `dot` (·) / `arrow` (›)

**Preset Shortcuts:** Quick layout with single characters — `"preset": "MC$R|BDO"` (M=model, C=context, $=cost, R=rateLimit5h, etc.)

**Budget Tracking:** Set `"dailyBudget": 15` to track daily spending. Shows ⚠️ at 80% and 🚨 at 95%.

**Tag Status:** Customize `tagStatus` patterns via `"tagPatterns": ["v*", "release-*"]`. Default is `["v*"]`. The widget auto-hides when no pattern matches a reachable tag.

**Widget Toggle:** Add widget IDs to `disabledWidgets` to hide them from any display mode.

**Mod Layouts:** `modPane` (the `/claude-dashboard-pane` pane, default `detailed`) and `modBand` (the `/claude-dashboard-band` band, default = your status line layout) take a display mode name (`compact` / `normal` / `detailed`) or a preset string like `"MC$R|BDO"`. Set `"modBandDefault": true` to turn the band on at session start. See [Mods](#mods-pane--band).

**Color Legend:** 🟢 0-50% Safe / 🟡 51-80% Warning / 🔴 81-100% Critical

</details>

## Commands

### `/claude-dashboard:setup`

Configure the status line display mode, language, and plan. See [Configuration](#configuration).

### `/claude-dashboard:check-usage`

Check usage limits for all AI CLIs (Claude, Codex, Gemini, Antigravity, z.ai) at once and get a recommendation for which CLI has the most available capacity.

```bash
/claude-dashboard:check-usage              # Interactive output with colors
/claude-dashboard:check-usage --json       # JSON output for scripting
/claude-dashboard:check-usage --lang ko    # Specify language
```

![check-usage](images/check-usage.png)

### `/claude-dashboard:setup-alias`

Add a `check-ai` shell alias to quickly check all AI CLI usage from your terminal. Supports macOS/Linux (zsh/bash) and Windows (PowerShell).

```bash
/claude-dashboard:setup-alias
```

After setup:
```bash
check-ai          # Pretty output
check-ai --json   # JSON output for scripting
```

### `/claude-dashboard:update`

Repair or verify the statusLine shim. Usually unnecessary — after `/plugin update`, the
status line picks up the new version on its own. Use this if you have hooks disabled or the
status line stops updating.

```bash
/claude-dashboard:update
```

## Mods (pane & band)

claude-dashboard also ships as a Claude Code **mod** (function-hook plugin, early access, tested on Claude Code 2.1.289). It is bundled in the same plugin (`hooks/hooks.json` → `"modules": ["../dist/mod.js"]`), so there is nothing extra to install. Mods are drawn only in the terminal and the desktop Code tab (not the VS Code panel, not `claude -p`).

| Command | What it does |
|---------|--------------|
| `/claude-dashboard-pane [on\|off]` | Open or close a dashboard pane beside the transcript (no argument flips it). Layout from `modPane` (default `detailed`). |
| `/claude-dashboard-band [on\|off]` | Draw the dashboard above the prompt and hide the status line for **this session only** (`settings.json` is untouched). Layout from `modBand` (default = your status line layout). |

```json
{
  "modPane": "detailed",
  "modBand": "MC$R|BDO",
  "modBandDefault": true
}
```

- `modPane` / `modBand` accept a display mode name (`compact` / `normal` / `detailed`) or a preset string. `modBandDefault: true` turns the band on at session start.
- Interactive `/claude-dashboard:setup` asks how you want to use the mod dashboard (status line only, peek with pane, replace with band, or both) and writes these keys; rerunning setup keeps keys it does not ask about.
- **How hiding works:** the band writes a per-session heartbeat marker (`~/.cache/claude-dashboard/band-<sessionId>`), refreshed on every render (at most every 60s) and ignored after 180s. It is deleted on `off` and at session end, so if the mod stops the status line comes back by itself within 3 minutes.
- Theme, language, and `disabledWidgets` follow your normal config. `cacheHit`, `tokenBreakdown`, and `performance` are hidden in the pane and band (the mod API has no per-request cache usage).
- Data comes from the mod API (context, rate limits, and cost pushed by Claude Code) and the unchanged renderer `dist/index.js`, run as a subprocess.

## Troubleshooting

<details>
<summary><strong>Status line not showing</strong></summary>

1. Check if plugin is installed: `/plugin list`
2. Verify `settings.json` has a `statusLine` entry pointing at
   `plugins/data/claude-dashboard-claude-dashboard/statusline.mjs`
3. If it's still not showing, try restarting Claude Code

</details>

<details>
<summary><strong>Rate limits showing ⚠️</strong></summary>

- API token may be expired - re-login to Claude Code
- Network issue - check internet connection
- API rate limited - wait for the cache to refresh (`cache.ttlSeconds`, default 300 seconds)

</details>

<details>
<summary><strong>Multiple accounts (CLAUDE_CONFIG_DIR)</strong></summary>

Claude Code relocates its whole config directory — credentials, settings, and history — when `CLAUDE_CONFIG_DIR` is set. That is how two accounts run side by side:

```bash
# Personal Max account, kept separate from the default ~/.claude
CLAUDE_CONFIG_DIR=~/.claude-max claude
```

The status line follows the same variable, so each session reports the account that is actually rendering it. Leave it unset and the default `~/.claude` is used, as before.

Notes:

- The variable must be a single directory path, and must be exported to the session.
- On macOS the OAuth token comes from the Keychain, which holds one entry for all accounts — `CLAUDE_CONFIG_DIR` separates `settings.json` and `history.jsonl` reads, but rate-limit API calls use whichever OAuth token the Keychain holds.
- `/claude-dashboard:setup` and `/claude-dashboard:update` register the status line into the session's config dir (`$CLAUDE_CONFIG_DIR` if set, `~/.claude` otherwise) — run them once per account. The dashboard's own display config `~/.claude/claude-dashboard.local.json` is intentionally shared across accounts.

</details>

<details>
<summary><strong>Wrong language</strong></summary>

Run setup with explicit language:

```
/claude-dashboard:setup normal ko  # Korean
/claude-dashboard:setup normal en  # English
```

</details>

<details>
<summary><strong>Cache issues</strong></summary>

API response cache is stored in `~/.cache/claude-dashboard/`. To clear:

```bash
rm -rf ~/.cache/claude-dashboard/
```

Cache files are automatically cleaned up after 1 hour.

</details>

## Development

```bash
npm install && npm run build
```

See [CONTRIBUTING.md](CONTRIBUTING.md) for details.

## Star History

[![Star History Chart](https://star-history.dera.page/svg?repos=uppinote20/claude-dashboard&type=Date)](https://star-history.dera.page/#uppinote20/claude-dashboard&Date)

## ☕ Support

If you find this plugin useful, support development:

<div style="display: flex; gap: 20px; align-items: center;">
  <a href="https://ko-fi.com/uppinote" target="_blank">
    <img src="https://storage.ko-fi.com/cdn/kofi5.png" alt="Buy Me a Coffee at ko-fi.com" style="height:60px; width:217px;">
  </a>
  <a href="https://www.buymeacoffee.com/uppinote" target="_blank">
    <img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height:60px; width:217px;">
  </a>
</div>

## License

MIT
