Class: GitAuto::Commands::SetupCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/git_auto/commands/setup_command.rb

Instance Method Summary collapse

Constructor Details

#initializeSetupCommand

Returns a new instance of SetupCommand.



9
10
11
12
13
# File 'lib/git_auto/commands/setup_command.rb', line 9

def initialize
  @prompt = TTY::Prompt.new
  @credential_store = Config::CredentialStore.new
  @settings = Config::Settings.new
end

Instance Method Details

#executeObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/git_auto/commands/setup_command.rb', line 15

def execute
  puts "\n🔧 Setting up GitAuto...".blue
  puts "This wizard will help you configure GitAuto with your preferred AI provider.\n"

  # Select AI provider
  configure_ai_provider

  # Configure preferences
  configure_preferences

  puts "\n✅ Setup completed successfully!".green
  display_configuration
rescue StandardError => e
  puts "\n❌ Setup failed: #{e.message}".red
  exit 1
end