Problem
ccstatusline is configured exclusively through the interactive TUI. That is great for humans, but it leaves one big workflow unserved:
- Coding agents cannot configure their own status line. The natural workflow — ask Claude Code to add, remove, or rearrange a widget — dead-ends, because the only configuration interface is an interactive React/Ink app that an agent cannot drive. Hand-writing
~/.config/ccstatusline/settings.json instead is risky: the schema is not documented as a stable contract, and there is no CLI validation before an agent saves a possibly-broken config.
- No scriptability. Dotfiles-style setup, scripted fleet installs, and config-as-code all currently require a human in the TUI.
- TUI startup cost. For a single tweak, launching the whole React/Ink app is heavy.
Proposal
Non-interactive CLI subcommands that operate on the same settings file the TUI uses:
ccstatusline get [--json] # print current (post-migration) config
ccstatusline widget add <line> <widget> [--index N] [--option value ...]
ccstatusline widget remove <line> <index-or-type>
ccstatusline widget move <line> <index> --to <index>
ccstatusline set <option-path> <value> # global options: padding, separators, etc.
ccstatusline validate [--file <path>] # exit code 0/1 + machine-readable report
ccstatusline install / uninstall # existing TUI actions, exposed non-interactively
Design notes / constraints:
- Reuse
applyImport() and the v2.2.27 import/export logic where possible — validate + merge semantics largely already exist there.
- Preserve the current guarantees: atomic saves, symlinked
settings.json written through the resolved target, invalid configs never silently overwritten. A validate-before-write step fits this naturally.
get --json + validate + set/widget ... gives an agent a safe read-modify-write loop without ever opening the TUI.
- Error output should be single-line and machine-parseable (ideally
--json) so agents can self-correct without guessing.
- The TUI stays the primary human interface; this is purely additive.
Related
Happy to follow up with a PR if the proposed shape sounds acceptable.
Problem
ccstatusline is configured exclusively through the interactive TUI. That is great for humans, but it leaves one big workflow unserved:
~/.config/ccstatusline/settings.jsoninstead is risky: the schema is not documented as a stable contract, and there is no CLI validation before an agent saves a possibly-broken config.Proposal
Non-interactive CLI subcommands that operate on the same settings file the TUI uses:
Design notes / constraints:
applyImport()and the v2.2.27 import/export logic where possible — validate + merge semantics largely already exist there.settings.jsonwritten through the resolved target, invalid configs never silently overwritten. Avalidate-before-write step fits this naturally.get --json+validate+set/widget ...gives an agent a safe read-modify-write loop without ever opening the TUI.--json) so agents can self-correct without guessing.Related
Happy to follow up with a PR if the proposed shape sounds acceptable.