Class: RubynCode::CLI::Commands::InstallSkills
- Inherits:
-
Base
- Object
- Base
- RubynCode::CLI::Commands::InstallSkills
show all
- Defined in:
- lib/rubyn_code/cli/commands/install_skills.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
aliases, all_names, hidden?
Class Method Details
.command_name ⇒ Object
7
|
# File 'lib/rubyn_code/cli/commands/install_skills.rb', line 7
def self.command_name = '/install-skills'
|
.description ⇒ Object
8
|
# File 'lib/rubyn_code/cli/commands/install_skills.rb', line 8
def self.description = 'Install skill packs from the Rubyn registry'
|
Instance Method Details
#execute(args, ctx) ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/rubyn_code/cli/commands/install_skills.rb', line 10
def execute(args, ctx)
if args.empty?
ctx.renderer.warning('Usage: /install-skills <pack-name> [pack-name ...]')
return
end
pack_manager = RubynCode::Skills::PackManager.new
registry = RubynCode::Skills::RegistryClient.new
args.each { |name| install_pack(name, registry, pack_manager, ctx) }
rescue RubynCode::Skills::RegistryError => e
ctx.renderer.error(e.message)
end
|