Class: SwarmMemory::CLI::Commands
- Inherits:
-
Object
- Object
- SwarmMemory::CLI::Commands
- Defined in:
- lib/swarm_memory/cli/commands.rb
Overview
CLI commands for managing SwarmMemory embeddings
Registers with SwarmCLI to provide:
swarm memory setup - Download embedding model
swarm memory status - Check model cache status
swarm memory model-path - Show cache location
swarm memory defrag - Optimize memory storage
swarm memory rebuild - Rebuild all embeddings
Class Method Summary collapse
-
.execute(args) ⇒ void
Execute memory command (called by SwarmCLI).
Class Method Details
.execute(args) ⇒ void
This method returns an undefined value.
Execute memory command (called by SwarmCLI)
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/swarm_memory/cli/commands.rb', line 19 def execute(args) subcommand = args.first subcommand_args = args[1..] # Remaining args after subcommand case subcommand when "setup" when "status" show_status when "model-path" show_model_path when "defrag" defrag_memory(subcommand_args) when "rebuild" (subcommand_args) else show_help exit(1) end rescue StandardError => e $stderr.puts "Error: #{e.}" exit(1) end |