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
jqonPATH(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
newlinesegment. - 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 astatusLineblock intosettings.jsonfor the chosen scope. Existingsettings.jsonis backed up tosettings.json.bak; the write is atomic. Unrelated keys (hooks,env,permissions, …) are preserved in original order. - Sidecar
statusline.config.jsonis the source of truth — reopening the editor reads the sidecar, never re-parses the generated Bash. - Hand-edit detection: if
statusline.shexists 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
- Create
src/statusline_editor/segments/<id>.pywith a class implementingid,label,default_options,options_schema,render,to_bash. - Add one entry to
SEGMENT_REGISTRYinsegments/__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.
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yacc_statusline_editor-0.1.0.tar.gz | 23.8 kB | Without provenance | Details for yacc_statusline_editor-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yacc_statusline_editor-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for yacc_statusline_editor-0.1.0-py3-none-any.whl |
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
|
Security for yacc-statusline-editor 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.