{
  "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": {
    "paths": [
      "~/.config/hcloud/",
      "%APPDATA%/hcloud/"
    ],
    "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
    },
    "subcommand": [
      {
        "path": [
          "server",
          "create"
        ],
        "label": "Create a server",
        "description": "Create a server from a type and an image.",
        "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 <name> --type <server-type> --image <image>\n      --firewall strings                  ID or name of Firewall to attach the Server to (can be specified multiple times)\n      --image string                      Image (ID or name) (required)\n      --label stringToString              User-defined labels ('key=value') (can be specified multiple times) (default [])\n      --location string                   Location (ID or name)\n      --name string                       Server name (required)\n      --network strings                   ID or name of Network to attach the Server to (can be specified multiple times)\n  -o, --output stringArray                output options: json|yaml\n      --ssh-key strings                   ID or name of SSH Key to inject (can be specified multiple times)\n      --type string                       Server Type (ID or name) (required)\n      --user-data-from-file stringArray   Read user data from specified file (use - to read from stdin)\n      --volume strings                    ID or name of Volume to attach (can be specified multiple times)"
          }
        ],
        "field": [
          {
            "id": "name",
            "label": "Server name",
            "type": "string",
            "option": [
              "--name"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "type",
            "label": "Server type",
            "type": "string",
            "option": [
              "--type"
            ],
            "suggestions": [
              {
                "value": "cx22",
                "label": "cx22"
              }
            ],
            "sources": [
              "help"
            ]
          },
          {
            "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"
            ]
          },
          {
            "id": "location",
            "label": "Location",
            "type": "string",
            "option": [
              "--location"
            ],
            "suggestions": [
              {
                "value": "fsn1",
                "label": "fsn1"
              },
              {
                "value": "nbg1",
                "label": "nbg1"
              },
              {
                "value": "hel1",
                "label": "hel1"
              }
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "ssh_key",
            "label": "SSH keys",
            "type": "string",
            "option": [
              "--ssh-key"
            ],
            "multiple": true,
            "sources": [
              "help"
            ]
          },
          {
            "id": "firewall",
            "label": "Firewalls",
            "type": "string",
            "option": [
              "--firewall"
            ],
            "multiple": true,
            "sources": [
              "help"
            ]
          },
          {
            "id": "network",
            "label": "Networks",
            "type": "string",
            "option": [
              "--network"
            ],
            "multiple": true,
            "sources": [
              "help"
            ]
          },
          {
            "id": "volume",
            "label": "Volumes",
            "type": "string",
            "option": [
              "--volume"
            ],
            "multiple": true,
            "sources": [
              "help"
            ]
          },
          {
            "id": "user_data",
            "label": "Cloud-init user data file",
            "type": "path",
            "path": {
              "kind": "file",
              "role": "input"
            },
            "option": [
              "--user-data-from-file"
            ],
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "create",
            "label": "Create a server",
            "fields": [
              "name",
              "type",
              "image",
              "location",
              "ssh_key"
            ],
            "required": [
              "name",
              "type",
              "image"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "name",
              "type",
              "image",
              "location",
              "ssh_key"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "firewall",
              "network",
              "volume",
              "user_data"
            ]
          }
        ]
      },
      {
        "path": [
          "server",
          "list"
        ],
        "label": "List servers",
        "description": "List servers, optionally filtered by label selector or status.",
        "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]\n  -o, --output stringArray   output options: noheader|columns=...|json|yaml\n  -l, --selector string      Selector to filter by labels\n  -s, --sort strings         Determine the sorting of the result\n      --status strings       Only Servers with one of these statuses are displayed"
          }
        ],
        "field": [
          {
            "id": "selector",
            "label": "Label selector",
            "type": "string",
            "option": [
              "--selector",
              "-l"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "status",
            "label": "Status",
            "type": "string",
            "option": [
              "--status"
            ],
            "multiple": true,
            "suggestions": [
              {
                "value": "running",
                "label": "running"
              },
              {
                "value": "off",
                "label": "off"
              }
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "sort",
            "label": "Sort by",
            "type": "string",
            "option": [
              "--sort",
              "-s"
            ],
            "multiple": true,
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "list",
            "label": "List servers",
            "fields": [
              "selector",
              "status",
              "sort"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "selector",
              "status",
              "sort"
            ]
          }
        ]
      }
    ]
  }
}
