package main import "fmt" func (c *KVSClient) handleConnect(args []string) { if len(args) < 1 { fmt.Println(red("Usage: connect ")) return } c.baseURL = args[0] fmt.Println(green("Connected to:"), c.baseURL) } func (c *KVSClient) handleAuth(args []string) { if len(args) < 1 { fmt.Println(red("Usage: auth ")) return } c.currentToken = args[0] fmt.Println(green("Authentication token set")) } func (c *KVSClient) handleHelp(args []string) { help := ` KVS Interactive Shell - Available Commands: Connection & Authentication: connect - Connect to KVS server auth - Set authentication token profile - List all profiles profile add [url] - Add user profile profile use - Switch to user profile profile remove - Remove user profile profile save - Save profiles to ~/.kvs/config.json profile load - Load profiles from ~/.kvs/config.json Key-Value Operations: get - Retrieve value for key put - Store JSON value at key delete - Delete key Resource Metadata: meta get - Get metadata (owner, group) for a key meta set [flags] - Set metadata for a key Flags: --owner , --group , --permissions Cluster Management: members - List cluster members health - Check service health User Management: user get - Get user details user create - Create new user (admin only) Group Management: group create [members] - Create new group group get - Get group details group update - Replace all group members group delete - Delete group group add-member - Add member to group group remove-member - Remove member from group Export/Import: export ... - Export keys to JSON file export-list - Export keys listed in file import - Import keys from JSON file --skip-existing - Skip existing keys (default) --overwrite - Overwrite existing keys Shell Scripting: set - Set shell variable unset - Remove shell variable vars - List all variables Variables: $VAR or ${VAR} Environment: $ENV:VARNAME Batch Operations: batch - Execute commands from file source - Alias for batch --continue-on-error - Continue execution even if commands fail System: help - Show this help exit, quit - Exit shell clear - Clear screen ` fmt.Println(help) }