Skip to content

Claude Code 状态栏插件

状态栏插件可以在终端显示模型信息、Git 分支、Token 使用量、会话成本等实时指标。以下是几款流行的状态栏插件。

CCometixLine(推荐)

用 Rust 编写的高性能 Claude Code 状态栏工具,相比 Node.js 实现更轻量、启动更快。

  • GitHub
  • 实时 Token 使用追踪和成本计算
  • Git 分支和状态集成
  • 交互式 TUI 配置界面

安装:

npm install -g @cometix/ccline
# 镜像加速
npm install -g @cometix/ccline --registry https://registry.npmmirror.com

配置:

ccline --config

配置文件位置:~/.claude/ccline/config.toml

添加到 Claude Code(Linux/macOS):

~/.claude/settings.json 中添加:

json
{
  "statusLine": {
    "type": "command",
    "command": "~/.claude/ccline/ccline",
    "padding": 0
  }
}

添加到 Claude Code(Windows):

json
{
  "statusLine": {
    "type": "command",
    "command": "%USERPROFILE%\\.claude\\ccline\\ccline.exe",
    "padding": 0
  }
}

ccstatusline

较早的状态栏插件,功能基础但稳定。使用 Node.js 编写。

npm install -g ccstatusline
json
{
  "statusLine": {
    "type": "command",
    "command": "ccstatusline"
  }
}

claude-powerline

类似 Powerline 风格的状态栏插件,界面美观。

npm install -g claude-powerline
json
{
  "statusLine": {
    "type": "command",
    "command": "claude-powerline"
  }
}

cc-statusline

轻量级状态栏插件,简洁实用。

npm install -g cc-statusline
json
{
  "statusLine": {
    "type": "command",
    "command": "cc-statusline"
  }
}

claude-code-statusline

社区维护的状态栏插件,功能完善。

npm install -g claude-code-statusline
json
{
  "statusLine": {
    "type": "command",
    "command": "claude-code-statusline"
  }
}