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

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
👀 See Also

ARP: Stateless WebSocket Relay for Autonomous Agent Communication
ARP (Agent Relay Protocol) is a stateless WebSocket relay for autonomous agent communication featuring Ed25519 identity, HPKE encryption per RFC 9180, binary TLV framing, and 33 bytes overhead per message. No accounts or registration required—just generate a keypair and connect.

MetaBot: Open-Source Bridge Connects Claude Code to Telegram, Feishu, and WeChat
MetaBot is an open-source TypeScript bridge that connects the Claude Code Agent SDK to messaging platforms like Telegram, Feishu, and WeChat. It provides persistent memory, scheduled tasks, multi-agent collaboration, and real-time streaming of tool calls.

Vektori's Memory Architecture: Principles from Claude's Leaked System
Vektori implements a three-layer hierarchical sentence graph for AI memory, inspired by leaked principles from Claude's architecture. The system uses strict quality filters, skeptical retrieval with a 0.3 minimum score, and maintains correction history across sessions.

Benchmark Shows CLI Tool Reduces Claude Code Token Costs by 32% Through Structural Navigation
A developer built a Rust CLI tool that gives Claude Code agents structural navigation commands like 'show me a 180-token summary of this 6,000-token class.' Benchmarking on Sonnet 4.6 across 54 automated runs showed 32% lower cost per task and 67% more code edits per session.