summaryrefslogtreecommitdiff
path: root/snippets/hyperstack
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-18 18:39:46 +0200
committerPaul Buetow <paul@buetow.org>2026-03-18 18:39:46 +0200
commitdfff40fba437841722e38bb2df0980f9b99c89af (patch)
tree14472fa2786207ef6bc9de9531f00434f889ee87 /snippets/hyperstack
parentb70c0f051fb7a0be3ae9504237b994864025b41b (diff)
cli: show help when called without arguments
Diffstat (limited to 'snippets/hyperstack')
-rwxr-xr-x[-rw-r--r--]snippets/hyperstack/hyperstack.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/snippets/hyperstack/hyperstack.rb b/snippets/hyperstack/hyperstack.rb
index 5cd4e21..85b766f 100644..100755
--- a/snippets/hyperstack/hyperstack.rb
+++ b/snippets/hyperstack/hyperstack.rb
@@ -1950,7 +1950,18 @@ module HyperstackVM
global_parser.order!(@argv)
command = @argv.shift
- raise Error, 'Missing command. Use create, delete, or status.' if command.nil?
+ if command.nil?
+ puts global_parser
+ puts
+ puts 'Commands:'
+ puts ' create [--replace] [--dry-run] [--vllm|--no-vllm] [--ollama|--no-ollama] [--model PRESET]'
+ puts ' delete [--vm-id ID] [--dry-run]'
+ puts ' status'
+ puts ' test'
+ puts ' model list'
+ puts ' model switch PRESET [--dry-run]'
+ exit 0
+ end
config_loader = ConfigLoader.load(global[:config_path])
state_store = StateStore.new(config_loader.config.state_file)