Class: ClaudeMemory::Commands::UninstallCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
lib/claude_memory/commands/uninstall_command.rb

Overview

Removes ClaudeMemory configuration from a project or globally

Instance Attribute Summary

Attributes inherited from BaseCommand

#stderr, #stdin, #stdout

Instance Method Summary collapse

Methods inherited from BaseCommand

#initialize

Constructor Details

This class inherits a constructor from ClaudeMemory::Commands::BaseCommand

Instance Method Details

#call(args) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/claude_memory/commands/uninstall_command.rb', line 10

def call(args)
  opts = parse_options(args, {global: false, full: false}) do |o|
    OptionParser.new do |parser|
      parser.banner = "Usage: claude-memory uninstall [options]"
      parser.on("--global", "Uninstall from global ~/.claude/ settings") { o[:global] = true }
      parser.on("--full", "Remove databases and all configuration (not just hooks)") { o[:full] = true }
    end
  end
  return 1 if opts.nil?

  if opts[:global]
    uninstall_global(opts[:full])
  else
    uninstall_local(opts[:full])
  end
end