AiConfigCommand constructor

AiConfigCommand()

Creates the ai-config command.

Implementation

AiConfigCommand() {
  argParser
    ..addOption(
      'provider',
      allowed: ['anthropic', 'openai', 'gemini'],
      help: 'AI provider.',
    )
    ..addOption(
      'model',
      help:
          'Shared model id (e.g. claude-opus-4-8). Pass "default" to clear it '
          'back to the per-provider default.',
    )
    ..addOption(
      'planner-model',
      help:
          'Stronger model for planning (falls back to model). '
          '"default" clears.',
    )
    ..addOption(
      'executor-model',
      help:
          'Cheaper model for running commands (falls back to model). '
          '"default" clears.',
    )
    ..addOption(
      'explainer-model',
      help:
          'Model for explaining a command (falls back to model). '
          '"default" clears.',
    )
    ..addOption(
      'key',
      help:
          'API key. Use "-" to read it from a hidden prompt instead of the '
          'command line.',
    )
    ..addOption(
      'mode',
      allowed: ['standard', 'plan', 'auto'],
      help: 'Default agent mode.',
    )
    ..addOption(
      'language',
      help: 'Reply language (free-form, e.g. portuguese). "off" clears it.',
    )
    ..addOption(
      'base-url',
      help: 'Override the provider API base URL. "default" clears it.',
    )
    ..addOption('max-steps', help: 'Agent loop bound (positive integer).')
    ..addOption(
      'path',
      help: 'Config file path (default ~/.omnyserver/ai.yaml).',
    );
}