OpenProgram Docs

CLI and TUI configuration surface

One schema describes every setting; every surface renders it. A new setting is one SettingSpec and appears everywhere, with no per-surface code. No setting is web-only.

SurfaceReaches the schema through
openprogram config list, get KEY, set KEY VALUEget_settings, set_setting
openprogram setup wizard, openprogram portsget_settings, set_setting
TUI /config panelWebSocket get_settings, set_setting on the existing BackendClient
Web pagesREST /api/settings

Code: openprogram/state/settings.py, interfaces/server/ws_actions/settings.py, apps/cli/src/components/SettingsPanel.tsx. Command grammar: CLI naming convention. No new transport or process.

Commands

RuleBehaviour
Modes are verbsopenprogram web launches the web UI, bare openprogram launches chat. No --tui, --web or --cli.
Container verbs (programs, skills, plugins, sessions, channels, memory, worker, mcp, subagent)Invoked bare: print the subcommand list and exit non-zero, all through _need_subcommand(parser), because per-dispatcher print_help() calls drift
Verbs with a real defaultproviders lists pools, ports shows the port, config lists settings
Self-documentingEvery add_argument and add_parser has help=; top-level --help has a common-commands epilog
setupFirst-run walk; setup <section> jumps to one section, setup menu opens the picker
config get, config setScriptable, the stable target for documentation; same validated path as a panel edit

Schema

@dataclass(frozen=True)
class SettingSpec:
    key: str             # stable id, e.g. "ui.web_port"
    path: tuple[str, ...]  # dot-path into config.json
    group: str           # "Ports", "Memory", ...
    label: str
    widget: str          # "number", "toggle", "enum", "text", "json"
    apply: str           # "live" or "next_start"
    default: Any = None
    choices: Callable[[], list[str]] | None = None
    validate: Callable[[Any], str | None] | None = None  # error or None
    help: str = ""
    secret: bool = False
    minimum: int | None = None
PartDesign
SETTINGSThe ordered list; source of truth
get_settings()Reads config.json once, resolves values, computes choices() lazily, masks secrets
set_setting(key, value)Validates, then writes through the key's typed helper when one exists (set_ui_ports for ui.*), else a generic dot-path write. Returns {applied, value} or {error}
Blocked keysThe dot-path write refuses __proto__, constructor, prototype at every level
Location~/.openprogram/config.json, through the profile-aware get_config_path()
Dynamic keystools.disabled.<name> toggles a tool, live. providers.* status rows are read-only
Applylive: re-read per use. next_start: read once at bind time (ui.web_port, memory.backend). The surface says so at the moment of the edit

Per-agent model, effort and skills stay in the agent record, reached through the action rows below.

TUI panel

/config, also from the Ctrl+K palette: a persistent editor over live state, built on Picker with group, field and editor levels. Enum fields reuse Picker; number and text use LineInput.

AreaBehaviour
Schema groupsPorts, Models, Memory, Search, Tools, Execution, Security, Voice and the rest of SETTINGS, in registry order
Action rowsModel, thinking effort, permission mode, theme and Claude accounts launch /model, /effort, /permissions, /theme, /login instead of duplicating them
Portsconfig set adds the holder from with_port_owner_note. The panel reports rather than seizes
ThemePreviews on cursor move, rolls back on ESC; no Apply step
Providers, channelsStatus and an action, never inline secret entry; OAuth is not reimplemented in a text box
KeybindsNo settings group: the TUI has no keybind config file

Ctrl+K renders the slash-command registry (name and description) through the same Picker, with keybind hints; /config, /model and /theme surface there uniformly. It changes no grammar.

Implementation status

Schema, renderers and transport are implemented.

Last updated · 2026-11-25