Enhanced statusline for Claude Code with Git status, GitHub notifications, and smart path display.
Format: [branch] [staged] [unstaged] [path] (+ optional GitHub notifications)
~/project # Clean, no git repo
main ~/project # Clean, no changes
main ~1(1f+189-16) ~1(1f+242) ~/project # Detailed git stats
main ~1(1f+189-16) ~1(1f+242) 🔔3 ~/project # + GitHub notifications (optional)Required: Go 1.25+
-
Place the file
cp statusline.go ~/.claude/ -
Configure Claude Code (edit
~/.claude/settings.json){ "statusLine": { "type": "command", "command": "go run ~/.claude/statusline.go" } }
-
Create token: GitHub Settings → Generate → Select
notifications -
Create
~/.claude/.envfile:# ~/.claude/.env GITHUB_TOKEN=ghp_your_token_here SHOW_GITHUB_NOTIFICATIONS=true
| Symbol | Meaning |
|---|---|
+N |
N added files |
~N |
N modified files |
-N |
N deleted files |
(NfM+L-) |
N files, M+ lines, L- lines |
🔔N |
N GitHub notifications |
GitHub API calls cached in ~/.statusline_cache for 5 minutes:
{
"timestamp": "2025-08-20T05:08:17+09:00",
"key": "github_notifications",
"content": "1"
}