Skip to content

Instantly share code, notes, and snippets.

View DmitryPogrebnoy's full-sized avatar

Dmitry Pogrebnoy DmitryPogrebnoy

View GitHub Profile
@DmitryPogrebnoy
DmitryPogrebnoy / statusline-command
Last active February 16, 2026 07:57
Example of Claude Code status line command script
#!/bin/bash
# Read JSON input from stdin
input=$(cat)
# Extract git remote repo name
cwd=$(echo "$input" | jq -r '.workspace.current_dir // empty')
reponame=""
if [ -n "$cwd" ] && [ -d "$cwd" ]; then
remote_url=$(git -C "$cwd" --no-optional-locks remote get-url origin 2>/dev/null)