Custom Status Line for Claude Code Shows Context Usage, Cost, and Git Branch

✍️ OpenClawRadar📅 Published: April 19, 2026🔗 Source
Custom Status Line for Claude Code Shows Context Usage, Cost, and Git Branch
Ad

Claude Code has a configurable statusLine setting that allows users to run a custom script to render their own status bar. A developer has built a bash script using this feature to address common annoyances during CLI sessions, such as losing track of context window limits, running the wrong model, or forgetting the current git branch.

What the Script Displays

The custom status bar renders two lines of information:

  • Line 1: Current model · Clickable repository link · Git branch
  • Line 2: Context usage bar (green → yellow → red) · Usage percentage · Session cost · Session duration

Requirements and Setup

The script requires jq to be installed. The GitHub repository includes installation instructions for Windows, macOS, and Linux. The script is designed to be further customized by the user.

Source and Availability

The script is hosted on GitHub at https://github.com/hsinhan-h/ClaudeCode_statusline-command. A preview image of the status line in action is also available in the source post.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also