Claude Code Status line on Windows

Claude Code 在大家軍備戰發布了 Status line 這個功能,讓使用者可以在 Claude Code 的輸入框下方自訂自己想要的訊息,官方提供幾個方式可以實現這功能(Bash, Node.js, Python),最後我選擇使用 Node.js
。
趁著週末寫玩了一下,剛開始照著官方文件做,結果啥都沒顯示出來,接著叫 Claude Code 幫我做,他說成功了,結果還是啥都沒有...最後才發現可能是官方提供設定檔案的問題
{
"statusLine": {
"type": "command",
"command": "~/.claude/statusline.sh",
"padding": 0 // Optional: set to 0 to let status line go to edge
}
}
command
的路徑不知道為何使用~/...
的方式會出錯,最後直接給絕對路徑就好了- 官方
padding
後面給我加上了註解,整個雷阿,刪掉後就沒問題了。
最後寫了一個小工具來幫助自己建置 status line: claude-code-statusline