Class: ClaudeCodeSlashCommands::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/claude_code_slash_commands/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ CLI



11
12
13
# File 'lib/claude_code_slash_commands/cli.rb', line 11

def initialize(args)
  @args = args
end

Class Method Details

.start(args) ⇒ Object



7
8
9
# File 'lib/claude_code_slash_commands/cli.rb', line 7

def self.start(args)
  new(args).run
end

Instance Method Details

#runObject



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/claude_code_slash_commands/cli.rb', line 15

def run
  case @args.first
  when "install"
    local = @args.include?("--local")
    Installer.new(local: local).install
  when "help", "-h", "--help", nil
    show_help
  else
    puts "Unknown command: #{@args.first}"
    show_help
    exit(1)
  end
end