The Claude Code CLI has a status bar built into the bottom of the terminal. By default, it displays very little information. Having come from GitHub Copilot, I needed to customise it slightly.
Here’s what mine looks like:

How it works
Claude Code runs a shell script of your choice, passes session data as JSON on stdin, and prints whatever your script outputs to the status bar. The JSON includes model info, context window usage, and rate limit percentages with reset timestamps.
Setup
1. Create ~/.claude/statusline.sh
#!/bin/bash
input=$(cat)
MODEL=$(echo "$input" | jq -r '.model.display_name // "?"')
EFFORT=$(echo "$input" | jq -r '.effort.level // empty')
PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)
FIVE_H=$(echo "$input" | jq -r '.rate_limits.five_hour.used_percentage // empty')
WEEK=$(echo "$input" | jq -r '.rate_limits.seven_day.used_percentage // empty')
RESETS_AT=$(echo "$input" | jq -r '.rate_limits.five_hour.resets_at // empty')
RESETS_AT_7D=$(echo "$input" | jq -r '.rate_limits.seven_day.resets_at // empty')
CYAN='\033[36m'; YELLOW='\033[33m'; RED='\033[31m'; GRAY='\033[90m'; RESET='\033[0m'
LINE="${CYAN}${MODEL}${RESET}"
[ -n "$EFFORT" ] && LINE="${LINE} ${GRAY}[${EFFORT}]${RESET}"
if [ "$PCT" -ge 80 ]; then CTX_COLOR="$RED"
elif [ "$PCT" -ge 50 ]; then CTX_COLOR="$YELLOW"
else CTX_COLOR="$GRAY"; fi
LINE="${LINE} ${CTX_COLOR}CTX: ${PCT}%${RESET}"
if [ -n "$FIVE_H" ]; then
FIVE_H_INT=$(printf '%.0f' "$FIVE_H")
WEEK_INT=$(printf '%.0f' "$WEEK")
if [ "$FIVE_H_INT" -ge 80 ]; then FIVE_H_COLOR="$RED"
elif [ "$FIVE_H_INT" -ge 50 ]; then FIVE_H_COLOR="$YELLOW"
else FIVE_H_COLOR="$GRAY"; fi
if [ "$WEEK_INT" -ge 80 ]; then WEEK_COLOR="$RED"
elif [ "$WEEK_INT" -ge 50 ]; then WEEK_COLOR="$YELLOW"
else WEEK_COLOR="$GRAY"; fi
FIVE_H_SUFFIX=""
[ -n "$RESETS_AT" ] && RESET_TIME=$(date -d "@$RESETS_AT" '+%H:%M' 2>/dev/null) && [ -n "$RESET_TIME" ] && FIVE_H_SUFFIX=" (${RESET_TIME})"
WEEK_SUFFIX=""
[ -n "$RESETS_AT_7D" ] && RESET_DAY=$(date -d "@$RESETS_AT_7D" '+%a %H:%M' 2>/dev/null) && [ -n "$RESET_DAY" ] && WEEK_SUFFIX=" (${RESET_DAY})"
LINE="${LINE} | ${FIVE_H_COLOR}5h: ${FIVE_H_INT}%${FIVE_H_SUFFIX}${RESET} | ${WEEK_COLOR}7d: ${WEEK_INT}%${WEEK_SUFFIX}${RESET}"
fi
echo -e "$LINE"
Make it executable:
chmod +x ~/.claude/statusline.sh
2. Add to ~/.claude/settings.json
{
"statusLine": {
"type": "command",
"command": "~/.claude/statusline.sh",
"refreshInterval": 5
}
}
The refreshInterval is in seconds.
3. Install jq
# Debian/Ubuntu
apt install jq
# macOS
brew install jq
What you get
- Model + effort level â useful when you switch models mid-session
- CTX â context window usage, turns red when you’re running out
- 5h / 7d â rate limit usage for the 5-hour and 7-day windows, each colored independently (gray â yellow â red)
- Reset times â the 5-hour limit shows a clock time like
(14:10), the 7-day limit shows day and time like(Wed 05:00)