Claude Code can display a custom status line at the bottom of your terminal that updates in real-time. Show token counts, estimated costs, model name, or git branch.
Setup
Add this to your .claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "/path/to/your/statusline.sh"
}
}
Example Script
Create statusline.sh:
#!/bin/bash
INPUT=$(cat)
MODEL=$(echo "$INPUT" | jq -r '.model // "unknown"')
INPUT_TOKENS=$(echo "$INPUT" | jq -r '.tokenUsage.input // 0')
OUTPUT_TOKENS=$(echo "$INPUT" | jq -r '.tokenUsage.output // 0')
COST=$(echo "$INPUT" | jq -r '.costUsd // 0')
GIT_BRANCH=$(git branch --show-current 2>/dev/null || echo "no-git")
COST_FMT=$(printf "%.4f" "$COST")
echo "$MODEL | In: ${INPUT_TOKENS} Out: ${OUTPUT_TOKENS} | \$${COST_FMT} | ${GIT_BRANCH}"
chmod +x statusline.sh
What You Can Display
- Model being used (Opus, Sonnet, Haiku)
- Token counts (input/output/thinking)
- Running cost in dollars
- Current git branch
- Custom alerts when costs exceed thresholds