Expand description
gw config edit — interactive TUI editor.
Lets the user browse every known ConfigKey alongside the values stored
in both scopes (global and repo) and edit either one in place. Saving
writes the modified entries back to disk in pretty JSON.
Why a TUI and not a “$EDITOR-opens-the-json-file” flow:
- We want users to see both scopes at once so they can spot overrides. A raw-JSON editor only shows one file.
- We control the value parser per key, so booleans / numbers / arg arrays get validated on save instead of producing a JSON file the runtime silently rejects on next load.
Layout (alternate screen, ratatui Crossterm backend):
┌─ gw config edit ─────────────────────────────────────────┐ │ Scope: ●global ○repo (.cwconfig.json) [Tab] swap│ ├──────────────────────────────────────────────────────────┤ │ ai-tool.command claude │ │ ▶ launch.method tmux │ │ … │ ├──────────────────────────────────────────────────────────┤ │ ↑↓ navigate Enter edit Tab swap scope s save q quit │ └──────────────────────────────────────────────────────────┘
Structs§
Functions§
- run
- Entry point — call from the CLI dispatcher.