ConfigEditorExtensions extension

Config editor that presents a themed, searchable list of configurable fields and lets the user edit each one using the appropriate prompt.

Runs as a single terminal session that temporarily yields to sub-editors (text, slider, confirm, etc.) when a field is selected, then resumes. This avoids rendering artifacts from multiple prompt sessions.

If any field is a ThemeConfigurable, changing it updates the editor's own theme in real time -- the frame, icons, and hints re-render immediately with the newly selected palette.

Groups (GroupConfigurable) appear alongside regular fields and open a nested editor on Enter. Only the root level shows a "✓ Save & confirm" action; nested editors show "← Back" instead.

Controls:

  • ↑ / ↓ navigate through fields
  • / focuses search from results; Ctrl+F switches search/results focus
  • Search focus accepts literal Space and /; focus changes preserve the filter
  • Enter opens the editor for the focused field (or enters a group)
  • Select "✓ Save & confirm" to return the result
  • Esc / Ctrl+C cancels (returns null)
final result = terminice.configEditor(
  'App Settings',
  fields: [
    ThemeConfigurable(key: 'theme', label: 'Theme', value: 'dark'),
    BoolConfigurable(key: 'darkMode', label: 'Dark Mode', value: true),
    GroupConfigurable(
      key: 'network',
      label: 'Network',
      children: [
        StringConfigurable(key: 'host', label: 'Host', value: 'localhost'),
        NumberConfigurable(key: 'port', label: 'Port', value: 8080),
      ],
    ),
  ],
);
on

Methods

configEditor(String prompt, {required List<Configurable> fields, int maxVisible = 18}) → ConfigResult?

Available on Terminice, provided by the ConfigEditorExtensions extension

Opens a config editor for the given fields.