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.
Updated 2026-09-23
The fast paths
Common questions
Why isn't git in the JSON?
Claude Code does not send git state. Scripts that show a branch run git themselves against workspace.current_dir, including in a directory with no repo so you can see how they degrade.
Why is used_percentage null?
context_window.used_percentage is null at the start of a fresh session. Guard it (// 0 in jq) or the bar prints "null" until the first response. The gallery's new-session preview is that case.
How does this site know what a script prints?
It runs the submitted script in a sandbox against the same JSON scenarios on this page. The cards show that output, not a mock.
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.
Using Claude Desktop? Its Code tab doesn't show custom status lines. Here's how to show yours there.