ccboard

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ccboard - Claude Code Dashboard

ccboard - Claude Code 仪表盘

Comprehensive TUI/Web dashboard for monitoring and managing your Claude Code usage.
用于监控和管理你的Claude Code使用情况的全功能TUI/网页仪表盘。

Overview

概述

ccboard provides a unified interface to visualize and explore all your Claude Code data:
  • Sessions: Browse all conversations across your projects
  • Statistics: Real-time token usage, cache hit rates, activity trends
  • MCP Servers: Monitor and manage Model Context Protocol servers
  • Costs: Track spending with detailed token breakdown and pricing
  • Configuration: View cascading settings (Global > Project > Local)
  • Hooks: Explore pre/post execution hooks and automation
  • Agents: Manage custom agents, commands, and skills
  • History: Search across all messages with full-text search
ccboard提供了统一界面来可视化和探索你所有的Claude Code数据:
  • 会话:浏览你所有项目下的全部对话
  • 统计数据:实时Token使用量、缓存命中率、活跃度趋势
  • MCP服务器:监控和管理Model Context Protocol服务器
  • 成本:通过详细的Token明细和定价追踪支出
  • 配置:查看层级设置(全局>项目>本地)
  • 钩子:浏览执行前后的钩子和自动化功能
  • Agents:管理自定义Agent、命令和技能
  • 历史记录:通过全文搜索查找所有消息

Installation

安装

Via Cargo (Recommended)

通过Cargo安装(推荐)

bash
undefined
bash
undefined

Using Claude Code command

使用Claude Code命令

/ccboard-install
/ccboard-install

Or manually

或手动安装

cargo install ccboard
undefined
cargo install ccboard
undefined

Requirements

依赖要求

  • Rust 1.70+ and Cargo
  • Claude Code installed (reads from
    ~/.claude/
    )
  • Rust 1.70+ 与 Cargo
  • 已安装Claude Code(从
    ~/.claude/
    读取数据)

Commands

命令

CommandDescriptionShortcut
/dashboard
Launch TUI dashboard
ccboard
/mcp-status
Open MCP servers tabPress
8
/costs
Open costs analysisPress
6
/sessions
Browse sessionsPress
2
/ccboard-web
Launch web UI
ccboard web
/ccboard-install
Install/update ccboard-
命令描述快捷键
/dashboard
启动TUI仪表盘
ccboard
/mcp-status
打开MCP服务器标签页
8
/costs
打开成本分析页
6
/sessions
浏览会话
2
/ccboard-web
启动网页UI
ccboard web
/ccboard-install
安装/更新ccboard-

Features

功能特性

8 Interactive Tabs

8个交互式标签页

1. Dashboard (Press
1
)

1. 仪表盘(按
1

  • Token usage statistics
  • Session count
  • Messages sent
  • Cache hit ratio
  • MCP server count
  • 7-day activity sparkline
  • Top 5 models usage gauges
  • Token使用统计
  • 会话数量
  • 已发送消息数
  • 缓存命中率
  • MCP服务器数量
  • 7天活跃度迷你图
  • 前5大模型使用量仪表盘

2. Sessions (Press
2
)

2. 会话(按
2

  • Dual-pane: Project tree + Session list
  • Metadata: timestamps, duration, tokens, models
  • Search: Filter by project, message, or model (press
    /
    )
  • File operations:
    e
    to edit JSONL,
    o
    to reveal in finder
  • 双面板布局:项目树 + 会话列表
  • 元数据:时间戳、会话时长、Token数、使用模型
  • 搜索:按项目、消息或模型筛选(按
    /
  • 文件操作:按
    e
    编辑JSONL,按
    o
    在文件管理器中打开

3. Config (Press
3
)

3. 配置(按
3

  • 4-column cascading view: Global | Project | Local | Merged
  • Settings inheritance visualization
  • MCP servers configuration
  • Rules (CLAUDE.md) preview
  • Permissions, hooks, environment variables
  • Edit config with
    e
    key
  • 4列层级视图:全局 | 项目 | 本地 | 合并后
  • 设置继承关系可视化
  • MCP服务器配置
  • 规则(CLAUDE.md)预览
  • 权限、钩子、环境变量
  • e
    键编辑配置

4. Hooks (Press
4
)

4. 钩子(按
4

  • Event-based hook browsing (PreToolUse, UserPromptSubmit)
  • Hook bash script preview
  • Match patterns and conditions
  • File path tracking for easy editing
  • 基于事件的钩子浏览(PreToolUse、UserPromptSubmit)
  • 钩子Bash脚本预览
  • 匹配模式和条件
  • 文件路径追踪,方便编辑

5. Agents (Press
5
)

5. Agents(按
5

  • 3 sub-tabs: Agents (12) | / Commands (5) | ★ Skills (0)
  • Frontmatter metadata extraction
  • File preview and editing
  • Recursive directory scanning
  • 3个子标签:Agents (12) | / 命令 (5) | ★ 技能 (0)
  • Frontmatter元数据提取
  • 文件预览和编辑
  • 递归目录扫描

6. Costs (Press
6
)

6. 成本(按
6

  • 3 views: Overview | By Model | Daily Trend
  • Token breakdown: input, output, cache read/write
  • Pricing: total estimated costs
  • Model distribution breakdown
  • 3种视图:概览 | 按模型拆分 | 每日趋势
  • Token明细:输入、输出、缓存读/写
  • 定价:预估总成本
  • 模型使用分布拆分

7. History (Press
7
)

7. 历史记录(按
7

  • Full-text search across all sessions
  • Activity by hour histogram (24h)
  • 7-day sparkline
  • All messages searchable
  • 所有会话的全文搜索
  • 每小时活跃度直方图(24小时)
  • 7天活跃度迷你图
  • 所有消息均可搜索

8. MCP (Press
8
) NEW

8. MCP(按
8
新功能

  • Dual-pane: Server list (35%) | Details (65%)
  • Live status detection: ● Running, ○ Stopped, ? Unknown
  • Full server details: command, args, environment vars
  • Quick actions:
    e
    edit config,
    o
    reveal file,
    r
    refresh status
  • 双面板布局:服务器列表(35%) | 详情(65%)
  • 实时状态检测:● 运行中、○ 已停止、? 未知
  • 完整服务器详情:命令、参数、环境变量
  • 快捷操作:
    e
    编辑配置、
    o
    打开文件所在位置、
    r
    刷新状态

Navigation

导航操作

Global Keys:
  • 1-8
    : Jump to tab
  • Tab
    /
    Shift+Tab
    : Navigate tabs
  • q
    : Quit
  • F5
    : Refresh data
Vim-style:
  • h/j/k/l
    : Navigate (left/down/up/right)
  • ←/→/↑/↓
    : Arrow alternatives
Common Actions:
  • Enter
    : View details / Focus pane
  • e
    : Edit file in $EDITOR
  • o
    : Reveal file in finder
  • /
    : Search (in Sessions/History tabs)
  • Esc
    : Close popup / Cancel
全局按键
  • 1-8
    :跳转至对应标签页
  • Tab
    /
    Shift+Tab
    :切换标签页
  • q
    :退出
  • F5
    :刷新数据
Vim风格操作
  • h/j/k/l
    :导航(左/下/上/右)
  • ←/→/↑/↓
    :方向键替代方案
通用操作
  • Enter
    :查看详情 / 聚焦面板
  • e
    :在$EDITOR中打开文件编辑
  • o
    :在文件管理器中打开文件
  • /
    :搜索(在会话/历史记录标签页中)
  • Esc
    :关闭弹窗 / 取消操作

Real-time Monitoring

实时监控

ccboard includes a file watcher that monitors
~/.claude/
for changes:
  • Stats updates: Live refresh when
    stats-cache.json
    changes
  • Session updates: New sessions appear automatically
  • Config updates: Settings changes reflected in UI
  • 500ms debounce: Prevents excessive updates
ccboard内置文件监听器,监控
~/.claude/
目录的变更:
  • 统计数据更新
    stats-cache.json
    变更时实时刷新
  • 会话更新:新会话自动展示
  • 配置更新:设置变更会实时同步到UI
  • 500ms防抖:避免过度更新

File Editing

文件编辑

Press
e
on any item to open in your preferred editor:
  • Uses
    $VISUAL
    >
    $EDITOR
    > platform default (nano/notepad)
  • Supports: Sessions (JSONL), Config (JSON), Hooks (Shell), Agents (Markdown)
  • Terminal state preserved (alternate screen mode)
  • Cross-platform (macOS, Linux, Windows)
在任意条目上按
e
即可在你偏好的编辑器中打开:
  • 优先顺序:
    $VISUAL
    >
    $EDITOR
    > 平台默认编辑器(nano/notepad)
  • 支持编辑:会话(JSONL)、配置(JSON)、钩子(Shell)、Agents(Markdown)
  • 终端状态保留(备用屏幕模式)
  • 跨平台支持(macOS、Linux、Windows)

MCP Server Management

MCP服务器管理

The MCP tab provides comprehensive server monitoring:
Status Detection (Unix):
  • Checks running processes via
    ps aux
  • Extracts package name from command
  • Displays PID when running
  • Windows shows "Unknown" status
Server Details:
  • Full command and arguments
  • Environment variables with values
  • Config file path (
    ~/.claude/claude_desktop_config.json
    )
  • Quick edit/reveal actions
Navigation:
  • h/l
    or
    ←/→
    : Switch between list and details
  • j/k
    or
    ↑/↓
    : Select server
  • Enter
    : Focus detail pane
  • e
    : Edit MCP config
  • o
    : Reveal config in finder
  • r
    : Refresh server status
MCP标签页提供全面的服务器监控能力:
状态检测(Unix系统):
  • 通过
    ps aux
    检查运行中的进程
  • 从命令中提取包名
  • 运行时展示PID
  • Windows系统默认显示"未知"状态
服务器详情
  • 完整命令和参数
  • 带值的环境变量
  • 配置文件路径(
    ~/.claude/claude_desktop_config.json
  • 快捷编辑/打开操作
导航操作
  • h/l
    ←/→
    :在列表和详情页之间切换
  • j/k
    ↑/↓
    :选择服务器
  • Enter
    :聚焦详情面板
  • e
    :编辑MCP配置
  • o
    :在文件管理器中打开配置
  • r
    :刷新服务器状态

Usage Examples

使用示例

Daily Monitoring

日常监控

bash
undefined
bash
undefined

Launch dashboard

启动仪表盘

/dashboard
/dashboard

Check activity and costs

查看活跃度和成本

Press '1' for overview

按'1'查看概览

Press '6' for costs breakdown

按'6'查看成本明细

Press '7' for recent history

按'7'查看最近历史记录

undefined
undefined

MCP Troubleshooting

MCP故障排查

bash
undefined
bash
undefined

Open MCP tab

打开MCP标签页

/mcp-status
/mcp-status

Or: ccboard then press '8'

或者:执行ccboard后按'8'

Check server status (● green = running)

检查服务器状态(● 绿色 = 运行中)

Press 'e' to edit config if needed

如需修改配置按'e'编辑

Press 'r' to refresh status after changes

修改后按'r'刷新状态

undefined
undefined

Session Analysis

会话分析

bash
undefined
bash
undefined

Browse sessions

浏览会话

/sessions
/sessions

Press '/' to search

按'/'搜索

Filter by project: /my-project

按项目筛选:/my-project

Filter by model: /opus

按模型筛选:/opus

Press 'e' on session to view full JSONL

在会话上按'e'查看完整JSONL内容

undefined
undefined

Cost Tracking

成本追踪

bash
undefined
bash
undefined

View costs

查看成本

/costs
/costs

Press '1' for overview

按'1'查看概览

Press '2' for breakdown by model

按'2'查看按模型拆分的明细

Press '3' for daily trend

按'3'查看每日趋势

Identify expensive sessions

识别高成本会话

Track cache efficiency (99.9% hit rate)

追踪缓存效率(99.9% 命中率)

undefined
undefined

Web Interface

网页界面

Launch browser-based interface for remote monitoring:
bash
undefined
启动基于浏览器的界面用于远程监控:
bash
undefined

Launch web UI

启动网页UI

/ccboard-web
/ccboard-web

Or with custom port

或使用自定义端口

ccboard web --port 8080
ccboard web --port 8080

**Features**:
- Same data as TUI (shared backend)
- Server-Sent Events (SSE) for live updates
- Responsive design (desktop/tablet/mobile)
- Concurrent multi-user access

**Run both simultaneously**:
```bash
ccboard both --port 3333

**功能特性**:
- 和TUI使用相同数据(共享后端)
- 服务器发送事件(SSE)实现实时更新
- 响应式设计(桌面/平板/移动端适配)
- 支持多用户同时访问

**同时运行两个界面**:
```bash
ccboard both --port 3333

Architecture

架构

ccboard is a single Rust binary with dual frontends:
ccboard/
├── ccboard-core/      # Parsers, models, data store, watcher
├── ccboard-tui/       # Ratatui frontend (8 tabs)
└── ccboard-web/       # Axum + Leptos frontend
Data Sources:
  • ~/.claude/stats-cache.json
    - Statistics
  • ~/.claude/claude_desktop_config.json
    - MCP config
  • ~/.claude/projects/*/
    - Session JSONL files
  • ~/.claude/settings.json
    - Global settings
  • .claude/settings.json
    - Project settings
  • .claude/settings.local.json
    - Local overrides
  • .claude/CLAUDE.md
    - Rules and behavior
ccboard是单一Rust二进制文件,包含双前端:
ccboard/
├── ccboard-core/      # 解析器、模型、数据存储、监听器
├── ccboard-tui/       # Ratatui前端(8个标签页)
└── ccboard-web/       # Axum + Leptos前端
数据来源
  • ~/.claude/stats-cache.json
    - 统计数据
  • ~/.claude/claude_desktop_config.json
    - MCP配置
  • ~/.claude/projects/*/
    - 会话JSONL文件
  • ~/.claude/settings.json
    - 全局设置
  • .claude/settings.json
    - 项目设置
  • .claude/settings.local.json
    - 本地覆盖设置
  • .claude/CLAUDE.md
    - 规则和行为配置

Troubleshooting

故障排除

ccboard not found

找不到ccboard命令

bash
undefined
bash
undefined

Check installation

检查安装情况

which ccboard
which ccboard

Install if needed

如需安装执行

/ccboard-install
undefined
/ccboard-install
undefined

No data visible

没有展示任何数据

bash
undefined
bash
undefined

Verify Claude Code is installed

确认已安装Claude Code

ls ~/.claude/
ls ~/.claude/

Check stats file exists

检查统计文件是否存在

cat ~/.claude/stats-cache.json
cat ~/.claude/stats-cache.json

Run with specific project

指定项目运行

ccboard --project ~/path/to/project
undefined
ccboard --project ~/path/to/project
undefined

MCP status shows "Unknown"

MCP状态显示"未知"

  • Status detection requires Unix (macOS/Linux)
  • Windows shows "Unknown" by default
  • Check if server process is actually running:
    ps aux | grep <server-name>
  • 状态检测仅支持Unix系统(macOS/Linux)
  • Windows系统默认显示"未知"
  • 检查服务器进程是否实际运行:
    ps aux | grep <server-name>

File watcher not working

文件监听器不工作

  • Ensure
    notify
    crate supports your platform
  • Check file permissions on
    ~/.claude/
  • Restart ccboard if file system events missed
  • 确认
    notify
    库支持你的操作系统
  • 检查
    ~/.claude/
    目录的文件权限
  • 如果文件系统事件丢失,重启ccboard

Advanced Usage

高级用法

Command-line Options

命令行参数

bash
ccboard --help              # Show all options
ccboard --claude-home PATH  # Custom Claude directory
ccboard --project PATH      # Specific project
ccboard stats               # Print stats and exit
ccboard web --port 8080     # Web UI on port 8080
ccboard both                # TUI + Web simultaneously
bash
ccboard --help              # 查看所有参数
ccboard --claude-home PATH  # 自定义Claude目录
ccboard --project PATH      # 指定项目
ccboard stats               # 打印统计数据后退出
ccboard web --port 8080     # 网页UI使用8080端口
ccboard both                # 同时运行TUI和网页界面

Environment Variables

环境变量

bash
undefined
bash
undefined

Editor preference

编辑器偏好设置

export EDITOR=vim export VISUAL=code
export EDITOR=vim export VISUAL=code

Custom Claude home

自定义Claude主目录

export CLAUDE_HOME=~/custom/.claude
undefined
export CLAUDE_HOME=~/custom/.claude
undefined

Integration with Claude Code

与Claude Code集成

ccboard reads read-only from Claude Code directories:
  • Non-invasive monitoring
  • No modifications to Claude data
  • Safe to run concurrently with Claude Code
  • File watcher detects changes in real-time
ccboard以只读方式读取Claude Code目录:
  • 非侵入式监控
  • 不会修改Claude数据
  • 可与Claude Code同时安全运行
  • 文件监听器可实时检测变更

Performance

性能

  • Binary size: 2.4MB (release build)
  • Initial load: <2s for 1,000+ sessions
  • Memory: ~50MB typical usage
  • CPU: <5% during monitoring
  • Lazy loading: Session content loaded on-demand
  • 二进制文件大小:2.4MB(Release构建)
  • 初始加载时间:1000+会话小于2秒
  • 内存占用:典型使用约50MB
  • CPU占用:监控期间小于5%
  • 懒加载:会话内容按需加载

Limitations

限制

Current version (0.1.0):
  • Read-only: No write operations to Claude data
  • MCP status: Unix only (Windows shows "Unknown")
  • Web UI: In development (TUI is primary interface)
  • Search: Basic substring matching (no fuzzy search yet)
Future roadmap:
  • Enhanced MCP server management (start/stop)
  • MCP protocol health checks
  • Export reports (PDF, JSON, CSV)
  • Config editing (write settings.json)
  • Session resume integration
  • Enhanced search with fuzzy matching
当前版本(0.1.0):
  • 只读:不会对Claude数据执行写入操作
  • MCP状态:仅支持Unix系统(Windows显示"未知")
  • 网页UI:开发中(TUI是主要界面)
  • 搜索:基础子字符串匹配(暂不支持模糊搜索)
未来路线图:
  • 增强MCP服务器管理(启动/停止)
  • MCP协议健康检查
  • 导出报告(PDF、JSON、CSV)
  • 配置编辑(写入settings.json)
  • 会话恢复集成
  • 支持模糊搜索的增强搜索功能

Contributing

贡献

ccboard is open source (MIT OR Apache-2.0).
Contributions welcome:
  • Bug reports and feature requests
  • Pull requests for new features
  • Documentation improvements
  • Platform-specific testing (Windows, Linux)
ccboard是开源项目(MIT OR Apache-2.0许可)。
欢迎贡献:
  • 提交Bug报告和功能需求
  • 提交新功能的Pull Request
  • 文档改进
  • 平台特定测试(Windows、Linux)

Credits

致谢

Built with:
基于以下技术构建:

License

许可

MIT OR Apache-2.0

Questions?
MIT OR Apache-2.0

有疑问?