Class: Aidp::CLI::ConfigCommand
- Inherits:
-
Object
- Object
- Aidp::CLI::ConfigCommand
- Includes:
- MessageDisplay
- Defined in:
- lib/aidp/cli/config_command.rb
Overview
Command handler for ‘aidp config` subcommand
Provides commands for managing AIDP configuration:
- Interactive configuration wizard
- Dry-run mode for testing configuration changes
Usage:
aidp config --interactive
aidp config --interactive --dry-run
Constant Summary
Constants included from MessageDisplay
Instance Method Summary collapse
-
#initialize(prompt: TTY::Prompt.new, wizard_class: nil, project_dir: nil) ⇒ ConfigCommand
constructor
A new instance of ConfigCommand.
-
#run(args) ⇒ Object
Main entry point for config command.
Methods included from MessageDisplay
#display_message, included, #message_display_prompt
Constructor Details
#initialize(prompt: TTY::Prompt.new, wizard_class: nil, project_dir: nil) ⇒ ConfigCommand
Returns a new instance of ConfigCommand.
20 21 22 23 24 |
# File 'lib/aidp/cli/config_command.rb', line 20 def initialize(prompt: TTY::Prompt.new, wizard_class: nil, project_dir: nil) @prompt = prompt @wizard_class = wizard_class || Aidp::Setup::Wizard @project_dir = project_dir || Dir.pwd end |
Instance Method Details
#run(args) ⇒ Object
Main entry point for config command
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/aidp/cli/config_command.rb', line 27 def run(args) interactive = false dry_run = false until args.empty? token = args.shift case token when "--interactive" interactive = true when "--dry-run" dry_run = true when "-h", "--help" display_usage return else ("Unknown option: #{token}", type: :error) display_usage return end end unless interactive display_usage return end wizard = @wizard_class.new(@project_dir, prompt: @prompt, dry_run: dry_run) wizard.run end |