Created
January 13, 2026 21:04
-
-
Save nchudleigh/fe8dab7d27d93b99030cd6525d7a6af8 to your computer and use it in GitHub Desktop.
Claude Code custom status line - shows model, directory, git branch, diff stats, and time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| input=$(cat) | |
| MODEL=$(echo "$input" | jq -r '.model.display_name') | |
| DIR=$(echo "$input" | jq -r '.workspace.current_dir') | |
| # Git info | |
| BRANCH=$(git branch --show-current 2>/dev/null) | |
| GIT_INFO="" | |
| if [ -n "$BRANCH" ]; then | |
| GIT_INFO="$BRANCH" | |
| # Get diff stats (+/-) | |
| STATS=$(git diff --shortstat 2>/dev/null) | |
| if [ -n "$STATS" ]; then | |
| ADDS=$(echo "$STATS" | grep -oE '[0-9]+ insertion' | grep -oE '[0-9]+') | |
| DELS=$(echo "$STATS" | grep -oE '[0-9]+ deletion' | grep -oE '[0-9]+') | |
| [ -n "$ADDS" ] || ADDS="0" | |
| [ -n "$DELS" ] || DELS="0" | |
| [ "$ADDS" != "0" ] || [ "$DELS" != "0" ] && GIT_INFO="$GIT_INFO | +$ADDS/-$DELS" | |
| fi | |
| fi | |
| # Time with am/pm | |
| TIME=$(date +"%I:%M %p") | |
| echo "[$MODEL] ${DIR##*/}${GIT_INFO:+ | $GIT_INFO} | $TIME" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment