即時查看 session 費用累積
何時使用: 你曾被意外的帳單嚇到。
步驟
-
安裝將 ccstatusline 加入你的執行環境設定。✓ 已複製→ 狀態列可見
-
設定固定成本 + token 小工具。✓ 已複製→ 成本追蹤中
-
工作即時查看費用增長。✓ 已複製→ 更好的預算管理
結果: 不再有意外的 Anthropic 帳單。
作者 sirmalloc · sirmalloc/ccstatusline
Claude Code CLI 的真實狀態列——powerline 風格、可自訂小工具、即時成本/使用量追蹤,工作時一目了然。
ccstatusline 以 tmux/powerline 風格的狀態列取代裸提示。小工具顯示模型、消耗的 token、當前成本、git 分支等。讓你實際了解 session 的費用。
%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"sirmalloc-ccstatusline": {
"command": "git",
"args": [
"clone",
"https://github.com/sirmalloc/ccstatusline"
],
"_inferred": true
}
}
}
開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。
{
"mcpServers": {
"sirmalloc-ccstatusline": {
"command": "git",
"args": [
"clone",
"https://github.com/sirmalloc/ccstatusline"
],
"_inferred": true
}
}
}
Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。
{
"mcpServers": {
"sirmalloc-ccstatusline": {
"command": "git",
"args": [
"clone",
"https://github.com/sirmalloc/ccstatusline"
],
"_inferred": true
}
}
}
點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。
{
"mcpServers": {
"sirmalloc-ccstatusline": {
"command": "git",
"args": [
"clone",
"https://github.com/sirmalloc/ccstatusline"
],
"_inferred": true
}
}
}
格式與 Claude Desktop 相同。重啟 Windsurf 生效。
{
"mcpServers": [
{
"name": "sirmalloc-ccstatusline",
"command": "git",
"args": [
"clone",
"https://github.com/sirmalloc/ccstatusline"
]
}
]
}
Continue 使用伺服器物件陣列,而非映射。
{
"context_servers": {
"sirmalloc-ccstatusline": {
"command": {
"path": "git",
"args": [
"clone",
"https://github.com/sirmalloc/ccstatusline"
]
}
}
}
}
加入 context_servers。Zed 儲存後熱重載。
claude mcp add sirmalloc-ccstatusline -- git clone https://github.com/sirmalloc/ccstatusline
一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。
何時使用: 你曾被意外的帳單嚇到。
結果: 不再有意外的 Anthropic 帳單。
狀態列 + 安全 hook = 更好的日常 UX
| 工具 | 輸入參數 | 何時呼叫 | 成本 |
|---|---|---|---|
| statusline-widgets | (詳見文件) | 可設定的小工具,非可呼叫的工具 | 1 次呼叫 |
字形缺失安裝 Nerd Font;powerline 字形需要它
| 替代方案 | 何時用它替代 | 權衡 |
|---|---|---|
| 預設提示 | 你不介意裸提示 | 無成本可視性 |