https://www.instagram.com/p/DZeti3qoj7c/
Want a beautiful status line while using Claude Code?
You can show useful details like:
The easiest way? Ask Claude to build it for you.
Copy this prompt, paste it into Claude Code, and let it create the full setup:
Create a status line script at ~/.claude/statusline-command.sh and reference it from ~/.claude/settings.json as
"command": "sh ~/.claude/statusline-command.sh".
Exact format and field order, separated by | (space-pipe-space):
πͺΎ [branch] | π€ [model] | πΈ [cost] | β±οΈ [time] | πͺ [tokens] | π² [context%]
Data sources (read the status line JSON from stdin with jq):
- πͺΎ branch β .worktree.branch, fallback .workspace.git_worktree. Only show if inside a git repo. Color: bold
magenta.
- π€ model β .model.display_name. Color: cyan.
- πΈ cost β real value from .cost.total_cost_usd. Format $0.14 when β₯ $0.01, else $0.0023 (4 decimals) for
sub-cent. Color: yellow.
- β±οΈ time β .cost.total_duration_ms, formatted human-readable: 45s, 3m 12s, 1h 4m. Color: blue.
- πͺ tokens β .context_window.total_input_tokens + .context_window.total_output_tokens, human-readable (12.3k, or
raw number underΒ 1000). Color: dim. Only show after first API call.
- π² context β .context_window.used_percentage, rounded to whole %. Color-coded: green < 50%, yellow 50β80%, red >
80%.
Each field is only rendered if its data exists, and | separators must only appear between present fields (no
leading/trailing/doubled separators). Use POSIX sh and awk for formatting.
You can customize the emojis, colors, fields, and layout however you like.
Happy hacking :)