Skip to content

Instantly share code, notes, and snippets.

View merchako's full-sized avatar

Alex Mercado merchako

View GitHub Profile
@merchako
merchako / statusline-command.sh
Created May 15, 2026 19:18
Claude Code two-line graphical status line: context bar, cost, model on line 1; cwd + clickable GitHub repo/branch on line 2
#!/usr/bin/env bash
# Two-line graphical status line with clickable GitHub links.
# Line 1: cwd repo ⎇ branch
# Line 2: model ▓▓▓░ pct (tokens) $cost
input=$(cat)
MODEL=$(echo "$input" | jq -r '.model.display_name // empty')
CWD=$(echo "$input" | jq -r '.workspace.current_dir // .cwd // empty')
PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)
IN_TOK=$(echo "$input" | jq -r '.context_window.total_input_tokens // 0')