Class: RubynCode::CLI::Commands::Skills
- Inherits:
-
Base
- Object
- Base
- RubynCode::CLI::Commands::Skills
show all
- Defined in:
- lib/rubyn_code/cli/commands/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/skills.rb', line 7
def self.command_name = '/skills'
|
.description ⇒ Object
8
|
# File 'lib/rubyn_code/cli/commands/skills.rb', line 8
def self.description = 'List installed skill packs or browse the 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/skills.rb', line 10
def execute(args, ctx)
case args.first
when 'search' then search_registry(args[1..].join(' '), ctx)
when 'available' then list_available(ctx)
when nil, 'list' then list_installed(ctx)
else
ctx.renderer.warning(
"Unknown subcommand '#{args.first}'. Try: /skills, /skills available, /skills search <term>"
)
end
rescue RubynCode::Skills::RegistryError => e
ctx.renderer.error(e.message)
end
|