id = "hcloud" name = "Hetzner Cloud CLI" homepage = "https://github.com/hetznercloud/cli" description = "A command-line interface for managing Hetzner Cloud resources." executables = ["hcloud"] [dotfiles] # https://github.com/hetznercloud/cli/blob/main/docs/reference/manual/hcloud.md # — the official manual documents ~/.config/hcloud/cli.toml as the default # config path. The same CLI manual and its source support %APPDATA% on Windows. paths = [ "~/.config/hcloud/", "%APPDATA%/hcloud/", ] # The official CLI stores API tokens in the config file's `token` or context # entries (https://github.com/hetznercloud/cli/issues/808), so each whole file # is withheld as a credential rather than copied in clear text. secret = [ "~/.config/hcloud/cli.toml", "%APPDATA%/hcloud/cli.toml", ] side_effect = false [commands] format = 1 label = "Hetzner Cloud CLI" description = "Create and list Hetzner Cloud servers. Boolean-valued flags that take true/false, other resources and other subcommands are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.subcommand]] path = ["server", "create"] label = "Create a server" description = "Create a server from a type and an image." [[commands.subcommand.source]] id = "help" kind = "manual" url = "https://github.com/hetznercloud/cli/blob/main/docs/reference/manual/hcloud_server_create.md" evidence = """hcloud server create [options] --name --type --image --firewall strings ID or name of Firewall to attach the Server to (can be specified multiple times) --image string Image (ID or name) (required) --label stringToString User-defined labels ('key=value') (can be specified multiple times) (default []) --location string Location (ID or name) --name string Server name (required) --network strings ID or name of Network to attach the Server to (can be specified multiple times) -o, --output stringArray output options: json|yaml --ssh-key strings ID or name of SSH Key to inject (can be specified multiple times) --type string Server Type (ID or name) (required) --user-data-from-file stringArray Read user data from specified file (use - to read from stdin) --volume strings ID or name of Volume to attach (can be specified multiple times)""" [[commands.subcommand.field]] id = "name" label = "Server name" type = "string" option = ["--name"] sources = ["help"] [[commands.subcommand.field]] id = "type" label = "Server type" type = "string" option = ["--type"] suggestions = [{ value = "cx22", label = "cx22" }] sources = ["help"] [[commands.subcommand.field]] id = "image" label = "Image" type = "string" option = ["--image"] suggestions = [{ value = "ubuntu-24.04", label = "ubuntu-24.04" }, { value = "debian-12", label = "debian-12" }] sources = ["help"] [[commands.subcommand.field]] id = "location" label = "Location" type = "string" option = ["--location"] suggestions = [{ value = "fsn1", label = "fsn1" }, { value = "nbg1", label = "nbg1" }, { value = "hel1", label = "hel1" }] sources = ["help"] [[commands.subcommand.field]] id = "ssh_key" label = "SSH keys" type = "string" option = ["--ssh-key"] multiple = true sources = ["help"] [[commands.subcommand.field]] id = "firewall" label = "Firewalls" type = "string" option = ["--firewall"] multiple = true sources = ["help"] [[commands.subcommand.field]] id = "network" label = "Networks" type = "string" option = ["--network"] multiple = true sources = ["help"] [[commands.subcommand.field]] id = "volume" label = "Volumes" type = "string" option = ["--volume"] multiple = true sources = ["help"] [[commands.subcommand.field]] id = "user_data" label = "Cloud-init user data file" type = "path" path = { kind = "file", role = "input" } option = ["--user-data-from-file"] sources = ["help"] [[commands.subcommand.task]] id = "create" label = "Create a server" fields = ["name", "type", "image", "location", "ssh_key"] required = ["name", "type", "image"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["name", "type", "image", "location", "ssh_key"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["firewall", "network", "volume", "user_data"] [[commands.subcommand]] path = ["server", "list"] label = "List servers" description = "List servers, optionally filtered by label selector or status." [[commands.subcommand.source]] id = "help" kind = "manual" url = "https://github.com/hetznercloud/cli/blob/main/docs/reference/manual/hcloud_server_list.md" evidence = """hcloud server list [options] -o, --output stringArray output options: noheader|columns=...|json|yaml -l, --selector string Selector to filter by labels -s, --sort strings Determine the sorting of the result --status strings Only Servers with one of these statuses are displayed""" [[commands.subcommand.field]] id = "selector" label = "Label selector" type = "string" option = ["--selector", "-l"] sources = ["help"] [[commands.subcommand.field]] id = "status" label = "Status" type = "string" option = ["--status"] multiple = true suggestions = [{ value = "running", label = "running" }, { value = "off", label = "off" }] sources = ["help"] [[commands.subcommand.field]] id = "sort" label = "Sort by" type = "string" option = ["--sort", "-s"] multiple = true sources = ["help"] [[commands.subcommand.task]] id = "list" label = "List servers" fields = ["selector", "status", "sort"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["selector", "status", "sort"]