Related Video:

https://www.instagram.com/p/DZeti3qoj7c/

Description

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:

Prompt:

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 :)