Skip to main content

Yet Another Claude Code statusline editor — interactive TUI for composing the Claude Code statusline.

Project description

yacc-statusline-editor

Yet Another Claude Code statusline editor. Interactive Textual TUI for composing a Claude Code statusline by picking, ordering, and configuring pre-built segments. It outputs a Bash script (using jq) and merges a statusLine block into your chosen scope's settings.json.

Requirements

  • Python ≥ 3.11
  • jq on PATH (the editor still launches without it, but the test-run modal is disabled)

Install

Recommended — install as an isolated tool:

# with uv
uv tool install yacc-statusline-editor

# or with pipx
pipx install yacc-statusline-editor

Then launch:

statusline-editor

From source (development)

uv sync
uv run statusline-editor
# equivalent
uv run python -m statusline_editor

What it does

  • Pick segments from a registry, reorder them, configure each with typed options (color, bool, int, string, enum, threshold), and split rows with a newline segment.
  • Live in-process preview against mock JSON fixtures (FULL / MINIMAL / NULLED) so you see exactly what the statusline will render.
  • On save: writes statusline.sh (Bash + jq) and merges a statusLine block into settings.json for the chosen scope. Existing settings.json is backed up to settings.json.bak; the write is atomic. Unrelated keys (hooks, env, permissions, …) are preserved in original order.
  • Sidecar statusline.config.json is the source of truth — reopening the editor reads the sidecar, never re-parses the generated Bash.
  • Hand-edit detection: if statusline.sh exists without the editor's marker, you'll get a warning before overwrite.

Scope

  • User scope: ~/.claude/
  • Project scope: <cwd>/.claude/

You pick the scope at save time. On load, project beats user when both have a sidecar.

Built-in segments

model, directory, git, context_bar, context_pct, context_tokens, cost, duration, lines_changed, rate_5h, rate_7d, pr, effort, output_style, session_name, worktree, vim_mode, custom_text, newline.

Adding a new segment

  1. Create src/statusline_editor/segments/<id>.py with a class implementing id, label, default_options, options_schema, render, to_bash.
  2. Add one entry to SEGMENT_REGISTRY in segments/__init__.py.

The edit panel renders itself from options_schema — no UI code needed. Every segment is automatically opted into a parameterized matrix test that asserts render (Python) and to_bash (Bash) produce byte-identical output (modulo ANSI) across the three fixtures.

Tests

uv run pytest
uv run pytest -k duplicate
uv run pytest tests/test_composition_refresh.py::test_refresh_after_initial_load_keeps_unique_ids

Project layout

src/statusline_editor/
├── app.py          # Textual App + modals (only impure layer)
├── config.py       # Composition / SegmentInstance + atomic_write + scope resolution
├── generator.py    # Composition → statusline.sh
├── settings.py     # Merge statusLine into settings.json (atomic, backed up)
├── preview.py      # In-process live render + subprocess test-run
├── fixtures.py     # FULL / MINIMAL / NULLED mock JSON
└── segments/       # Segment registry — one file per id

See CLAUDE.md for architecture notes and docs/superpowers/specs/2026-06-03-statusline-editor-design.md for the full design spec.

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

yacc_statusline_editor-0.1.0.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

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

yacc_statusline_editor-0.1.0-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file yacc_statusline_editor-0.1.0.tar.gz.

File metadata

  • Download URL: yacc_statusline_editor-0.1.0.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for yacc_statusline_editor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 36445a8974766724d5fb3877e72eb42f45e10ca96da7c7121aee8ea873600c87
MD5 4748ba4a18f7cb39e70822e96c9f2c95
BLAKE2b-256 c6370b3bdde11b1c80c96853a11a6a7e68a28e1f743a54343e1e67cc057ddb1a

See more details on using hashes here.

File details

Details for the file yacc_statusline_editor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for yacc_statusline_editor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b67cfcbe4c043ac3feca2f96bb219a1e7a290f83897e54c3afeee5cf73d520fe
MD5 9eb95c94727555e88349737ef6de6f6c
BLAKE2b-256 77e90d51d7f7f79c3efba7626fff717b7ee50c4c09a21f9b237b4fb8b24e7419

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