How to set up a Claude Code status line
The status line is the bar at the bottom of Claude Code. Each time it refreshes, Claude Code runs your shell script, sends it a JSON snapshot on stdin, and shows whatever the script prints. Start with a fast path, or skip to wiring a script by hand.
The fast paths
Two pitfalls
Git status isn't in the payload. Scripts that show a branch run git themselves against workspace.current_dir. That's how gallery configs do it, even though Claude Code never sends a branch.
context_window.used_percentage is null at the start of a fresh session. Guard it (// 0 in jq) or the bar reads "null" until the first response.
Going further
Want more than a few fields? The tools & resources list has themes, widgets, and usage trackers. Or copy a status line from the gallery and tweak it. If you build one you like, submit it to the gallery.