Skip to main content

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.

Release files for yacc-statusline-editor 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yacc-statusline-editor 0.1.0
File Size Uploaded
yacc_statusline_editor-0.1.0.tar.gz 23.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yacc-statusline-editor 0.1.0
File Interpreter ABI Platform
yacc_statusline_editor-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 62.1 kB

Release files / yacc_statusline_editor-0.1.0.tar.gz

Download URL yacc_statusline_editor-0.1.0.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
36445a8974766724d5fb3877e72eb42f45e10ca96da7c7121aee8ea873600c87
BLAKE2b-256 checksum
How to use checksums
c6370b3bdde11b1c80c96853a11a6a7e68a28e1f743a54343e1e67cc057ddb1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / yacc_statusline_editor-0.1.0-py3-none-any.whl

Download URL yacc_statusline_editor-0.1.0-py3-none-any.whl
Size 38.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b67cfcbe4c043ac3feca2f96bb219a1e7a290f83897e54c3afeee5cf73d520fe
BLAKE2b-256 checksum
How to use checksums
77e90d51d7f7f79c3efba7626fff717b7ee50c4c09a21f9b237b4fb8b24e7419
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page