Class: Aidp::CLI::ProvidersCommand
- Inherits:
-
Object
- Object
- Aidp::CLI::ProvidersCommand
- Includes:
- MessageDisplay
- Defined in:
- lib/aidp/cli/providers_command.rb
Overview
Command handler for ‘aidp providers info` and `aidp providers refresh` subcommands
Provides commands for viewing and managing provider information:
- info: Show detailed information about a specific provider or models catalog
- refresh: Refresh provider information cache
Usage:
aidp providers info <provider> [--refresh]
aidp providers refresh [<provider>]
Constant Summary
Constants included from MessageDisplay
Instance Method Summary collapse
-
#initialize(prompt: TTY::Prompt.new, provider_info_class: nil, capability_registry_class: nil, config_manager_class: nil, project_dir: nil) ⇒ ProvidersCommand
constructor
A new instance of ProvidersCommand.
-
#run(args, subcommand:) ⇒ Object
Main entry point for providers info/refresh subcommands.
Methods included from MessageDisplay
#display_message, included, #message_display_prompt
Constructor Details
#initialize(prompt: TTY::Prompt.new, provider_info_class: nil, capability_registry_class: nil, config_manager_class: nil, project_dir: nil) ⇒ ProvidersCommand
Returns a new instance of ProvidersCommand.
24 25 26 27 28 29 30 |
# File 'lib/aidp/cli/providers_command.rb', line 24 def initialize(prompt: TTY::Prompt.new, provider_info_class: nil, capability_registry_class: nil, config_manager_class: nil, project_dir: nil) @prompt = prompt @provider_info_class = provider_info_class || Aidp::Harness::ProviderInfo @capability_registry_class = capability_registry_class || Aidp::Harness::CapabilityRegistry @config_manager_class = config_manager_class || Aidp::Harness::ConfigManager @project_dir = project_dir || Dir.pwd end |
Instance Method Details
#run(args, subcommand:) ⇒ Object
Main entry point for providers info/refresh subcommands
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/aidp/cli/providers_command.rb', line 33 def run(args, subcommand:) case subcommand when "info" run_info_command(args) when "refresh" run_refresh_command(args) when "catalog" run_models_catalog_command else ("Unknown providers subcommand: #{subcommand}", type: :error) display_help 1 end end |