Skip to main content

Custom status line for Claude Code with robbyrussell theme style

Project description

erk-statusline

Custom status line for Claude Code with robbyrussell theme style.

Screenshot

Status Line Components

The status line displays (left to right):

  • Git repo: (git:repo-name) - Current GitHub repository name
  • Worktree: ({wt, br}:name) or (wt:name) - Git worktree info ("root" for main worktree, or worktree name for linked worktrees)
  • Branch: (br:branch-name) - Current git branch (combined with worktree if names match)
  • Current directory: (cwd:path) - Relative path from git root (only shown if not at root)
  • Dirty indicator: - Shows when there are uncommitted changes
  • GitHub PR info: (gh:#123 plan:#456 st:XX chks:XX):
    • #123 - PR number
    • plan:#456 - Associated issue number from .impl/issue.json
    • st: - PR state emoji: 👀 published, 🚧 draft, 🎉 merged, closed, 💥 conflicts
    • chks: - CI checks status: passing, 🚫 failing, 🔄 pending
  • Model: (S) Sonnet, (O) Opus, or model initial

Installation

uv tool install git+https://github.com/dagster-io/erk-statusline

Or for development:

git clone https://github.com/dagster-io/erk-statusline
cd erk-statusline
uv sync

Usage

Add to ~/.claude/settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "erk-statusline"
  }
}

Debugging

The statusline writes debug logs to help diagnose issues like missing chks: indicator, timeouts, or API failures.

Log location: ~/.erk/logs/statusline/<session-id>.log

To view logs for your current session:

# Find recent logs
ls -lt ~/.erk/logs/statusline/ | head

# Tail the most recent log
tail -f ~/.erk/logs/statusline/$(ls -t ~/.erk/logs/statusline/ | head -1)

Example log output:

2025-01-05 12:34:56 DEBUG Statusline invoked: session=abc123 cwd=/path/to/repo
2025-01-05 12:34:56 DEBUG Fetching GitHub data for branch=feature-branch
2025-01-05 12:34:56 DEBUG Fetching PR details: owner/repo #4225
2025-01-05 12:34:56 DEBUG Fetching check runs: owner/repo sha=abc1234
2025-01-05 12:34:57 DEBUG PR details fetched: owner/repo #4225 in 0.8s -> MERGEABLE
2025-01-05 12:34:57 DEBUG Check runs fetched: owner/repo sha=abc1234 in 0.9s -> 5 checks
2025-01-05 12:34:57 DEBUG Final result: branch=feature-branch pr=4225 checks=🔄

Common issues to look for:

  • Timeout messages - API calls taking too long (default timeout: 1.5s per call)
  • Empty checks - Final result: ... checks=(empty) means no check runs were returned
  • Cache behavior - Look for "Cache hit/miss" messages to understand caching

Development

# Run all checks (lint, typecheck, tests)
make check

# Run individual checks
make lint
make typecheck
make test

# Run tests with coverage
make test-coverage

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

erk_statusline-0.7.0.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

erk_statusline-0.7.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file erk_statusline-0.7.0.tar.gz.

File metadata

  • Download URL: erk_statusline-0.7.0.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for erk_statusline-0.7.0.tar.gz
Algorithm Hash digest
SHA256 4e0c82299daa018e1b7839fc1d72a7b8176be4fd37e12c641c41dca68256cbb0
MD5 f4f3813de5b9b02db719b5202556bb68
BLAKE2b-256 466c19902f13b4ba4cd9d7ac479df6f70ff0fdb4796cc751717db46a53e76acc

See more details on using hashes here.

File details

Details for the file erk_statusline-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: erk_statusline-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for erk_statusline-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08d75eb1db3fcc335267a7840df7ec89e67de1f8b3d7a485c77b1cb655bb56f5
MD5 b30b44ad0bfd8a070fbbe9f189a4b698
BLAKE2b-256 53f6d1e07808dc03d736f15262325c8efc0ecc44775666fb6cfca29b004ced7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page