Skip to content

Instantly share code, notes, and snippets.

@ezyang
Created June 20, 2026 19:33
Show Gist options
  • Select an option

  • Save ezyang/14612717bb538c0cf25bf04b986d9f2a to your computer and use it in GitHub Desktop.

Select an option

Save ezyang/14612717bb538c0cf25bf04b986d9f2a to your computer and use it in GitHub Desktop.
statusline-command.sh
#!/usr/bin/env bash
# Claude Code status line - shows context window remaining percentage
input=$(cat)
remaining=$(echo "$input" | jq -r '.context_window.remaining_percentage // empty')
if [ -n "$remaining" ]; then
printf 'Context: %s%% remaining' "$remaining"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment