{
  "name": "k3d",
  "description": "K3d is a lightweight wrapper to run k3s in Docker",
  "options": [
    {
      "names": [
        "-h",
        "--help"
      ],
      "description": "Help for k3d",
      "isPersistent": true
    },
    {
      "names": [
        "--verbose"
      ],
      "description": "Verbose output",
      "isPersistent": true
    },
    {
      "names": [
        "--trace"
      ],
      "description": "Trace output",
      "isPersistent": true
    },
    {
      "names": [
        "--version"
      ],
      "description": "Print version information"
    },
    {
      "names": [
        "--timestamps"
      ],
      "description": "Print timestamp in log output",
      "isPersistent": true
    }
  ],
  "subcommands": [
    {
      "name": "cluster",
      "description": "Manage k3s clusters",
      "subcommands": [
        {
          "name": "create",
          "description": "Create a new k3s cluster",
          "options": [
            {
              "names": [
                "-a",
                "--agents"
              ],
              "description": "Number of agents to create",
              "args": [
                {
                  "name": "number of agents",
                  "description": "Number of agents to create"
                }
              ]
            },
            {
              "names": [
                "--agents-memory"
              ],
              "description": "Memory limit imposed on the agents nodes",
              "args": [
                {
                  "name": "memory limit",
                  "description": "Memory limit imposed on the agents nodes"
                }
              ]
            },
            {
              "names": [
                "--api-port"
              ],
              "description": "Specify the Kubernetes API server port exposed on the LoadBalancer",
              "args": [
                {
                  "name": "port",
                  "description": "Specify the Kubernetes API server port exposed on the LoadBalancer"
                }
              ]
            },
            {
              "names": [
                "-c",
                "--config"
              ],
              "description": "Path of a config file to use",
              "args": [
                {
                  "name": "path",
                  "description": "Path of a config file to use"
                }
              ]
            },
            {
              "names": [
                "-e",
                "--env"
              ],
              "description": "Add environment variables to nodes",
              "args": [
                {
                  "name": "environment variables",
                  "description": "Add environment variables to nodes"
                }
              ]
            },
            {
              "names": [
                "--gpus"
              ],
              "description": "GPU devices to add to the cluster node containers",
              "args": [
                {
                  "name": "devices",
                  "description": "GPU devices to add to the cluster node containers"
                }
              ]
            },
            {
              "names": [
                "-h",
                "--help"
              ],
              "description": "Help for create"
            },
            {
              "names": [
                "--host-alias"
              ],
              "description": "Add ip:host[,host,...] mappings",
              "args": [
                {
                  "name": "ip:host[,host,...]",
                  "description": "Add ip:host[,host,...] mappings"
                }
              ]
            },
            {
              "names": [
                "--host-pid-mode"
              ],
              "description": "Enable host pid mode of server(s) and agent(s)"
            },
            {
              "names": [
                "-i",
                "--image"
              ],
              "description": "Specify k3s image that you want to use for the nodes",
              "args": [
                {
                  "name": "image",
                  "description": "Specify k3s image that you want to use for the nodes"
                }
              ]
            },
            {
              "names": [
                "--k3s-arg"
              ],
              "description": "Additional args passed to k3s command",
              "args": [
                {
                  "name": "ARG@NODEFILTER[;@NODEFILTER]",
                  "description": "Additional args passed to k3s command"
                }
              ]
            },
            {
              "names": [
                "--k3s-node-label"
              ],
              "description": "Add label to k3s node",
              "args": [
                {
                  "name": "KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]",
                  "description": "Add label to k3s node"
                }
              ]
            },
            {
              "names": [
                "--kubeconfig-switch-context"
              ],
              "description": "Directly switch the default kubeconfig's current-context to the new cluster's context (requires --kubeconfig-update-default) (default true)"
            },
            {
              "names": [
                "--kubeconfig-update-default"
              ],
              "description": "Directly update the default kubeconfig with the new cluster's context (default true)"
            },
            {
              "names": [
                "--lb-config-override"
              ],
              "description": "Use dotted YAML path syntax to override nginx loadbalancer settings",
              "args": [
                {
                  "name": "path"
                }
              ]
            },
            {
              "names": [
                "--network"
              ],
              "description": "Specify the docker network to use",
              "args": [
                {
                  "name": "network",
                  "description": "Specify the docker network to use"
                }
              ]
            },
            {
              "names": [
                "--no-image-volume"
              ],
              "description": "Don't create a volume for the container's root filesystem"
            },
            {
              "names": [
                "--no-lb"
              ],
              "description": "Don't create a loadbalancer for the cluster"
            },
            {
              "names": [
                "--no-rollback"
              ],
              "description": "Don't rollback changes if cluster creation failed"
            },
            {
              "names": [
                "-p",
                "--port"
              ],
              "description": "Map ports from the node containers (via the serverlb) to the host",
              "args": [
                {
                  "name": "port",
                  "description": "Map ports from the node containers (via the serverlb) to the host"
                }
              ]
            },
            {
              "names": [
                "--registry-config"
              ],
              "description": "Specify path to an extra registries.yaml file",
              "args": [
                {
                  "name": "path",
                  "description": "Specify path to an extra registries.yaml file"
                }
              ]
            },
            {
              "names": [
                "--registry-create"
              ],
              "description": "Create a k3d-managed registry and connect it to the cluster (Format: NAME[:HOST][:HOSTPORT] - Example: `k3d cluster create --registry-create mycluster-registry",
              "args": [
                {
                  "name": "NAME[:HOST][:HOSTPORT]",
                  "description": "Create a k3d-managed registry and connect it to the cluster (Format: NAME[:HOST][:HOSTPORT] - Example: `k3d cluster create --registry-create mycluster-registry"
                }
              ]
            },
            {
              "names": [
                "--registry-use"
              ],
              "description": "Connect to one or more k3d-managed registries running locally",
              "args": [
                {
                  "name": "NAME[:HOST][:HOSTPORT]"
                }
              ]
            },
            {
              "names": [
                "--runtime-label"
              ],
              "description": "Add label to container runtime (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]] - Example: `k3d cluster create --agents 2 --runtime-label \"my.label@agent:0,1\" --runtime-label \"other.label=somevalue@server:0\"`"
            },
            {
              "names": [
                "-s",
                "--servers"
              ],
              "description": "Specify how many servers you want to create",
              "args": [
                {
                  "name": "int",
                  "description": "Specify how many servers you want to create"
                }
              ]
            },
            {
              "names": [
                "--servers-memory"
              ],
              "description": "Memory limit imposed on the server nodes [From docker]",
              "args": [
                {
                  "name": "string",
                  "description": "Memory limit imposed on the server nodes [From docker]"
                }
              ]
            },
            {
              "names": [
                "--subnet"
              ],
              "description": "[Experimental: IPAM] Define a subnet for the newly created container network",
              "args": [
                {
                  "name": "string"
                }
              ]
            },
            {
              "names": [
                "--timeout"
              ],
              "description": "Rollback changes if cluster couldn't be created in specified duration",
              "args": [
                {
                  "name": "duration",
                  "description": "Rollback changes if cluster couldn't be created in specified duration"
                }
              ]
            },
            {
              "names": [
                "--token"
              ],
              "description": "Specify a cluster token. By default, we generate one",
              "args": [
                {
                  "name": "string",
                  "description": "Specify a cluster token. By default, we generate one"
                }
              ]
            },
            {
              "names": [
                "-v",
                "--volume"
              ],
              "description": "Mount volumes into the nodes",
              "args": [
                {
                  "name": "[SOURCE:]DEST[@NODEFILTER[;NODEFILTER...]]",
                  "description": "Mount volumes into the nodes"
                }
              ]
            },
            {
              "names": [
                "--wait"
              ],
              "description": "Wait for the server(s) to be ready before returning"
            }
          ],
          "args": [
            {
              "name": "cluster name",
              "description": "Name of the cluster to create"
            }
          ]
        },
        {
          "name": "delete",
          "aliases": [
            "del",
            "rm"
          ],
          "description": "Delete a cluster",
          "options": [
            {
              "names": [
                "-a",
                "--all"
              ],
              "description": "Delete all clusters"
            },
            {
              "names": [
                "-c",
                "--config"
              ],
              "description": "Path of a config file to use",
              "args": [
                {
                  "name": "path",
                  "description": "Path of a config file to use"
                }
              ]
            }
          ],
          "args": [
            {
              "name": "cluster",
              "description": "Cluster to delete",
              "generators": [
                {
                  "script": [
                    "k3d",
                    "cluster",
                    "list",
                    "--no-headers"
                  ]
                }
              ]
            }
          ]
        },
        {
          "name": "edit",
          "aliases": [
            "update"
          ],
          "description": "Edit a cluster",
          "options": [
            {
              "names": [
                "--port-add"
              ],
              "description": "Map ports from the node containers"
            }
          ],
          "args": [
            {
              "name": "cluster",
              "description": "Cluster to edit",
              "generators": [
                {
                  "script": [
                    "k3d",
                    "cluster",
                    "list",
                    "--no-headers"
                  ]
                }
              ]
            }
          ]
        },
        {
          "name": "list",
          "aliases": [
            "ls",
            "get"
          ],
          "description": "List clusters",
          "options": [
            {
              "names": [
                "--no-headers"
              ],
              "description": "Don't print headers"
            },
            {
              "names": [
                "-o",
                "--output"
              ],
              "description": "Output format",
              "args": [
                {
                  "name": "string",
                  "description": "Output format",
                  "suggestions": [
                    "json",
                    "yaml"
                  ]
                }
              ]
            },
            {
              "names": [
                "--token"
              ],
              "description": "Print k3s cluster token"
            }
          ],
          "args": [
            {
              "name": "cluster",
              "description": "Cluster to list",
              "generators": [
                {
                  "script": [
                    "k3d",
                    "cluster",
                    "list",
                    "--no-headers"
                  ]
                }
              ]
            }
          ]
        },
        {
          "name": "start",
          "description": "Start a cluster",
          "options": [
            {
              "names": [
                "a",
                "--all"
              ],
              "description": "Start all clusters"
            },
            {
              "names": [
                "--timeout"
              ],
              "description": "Maximum waiting time for '--wait' before canceling/returning",
              "args": [
                {
                  "name": "duration",
                  "description": "Maximum waiting time for '--wait' before canceling/returning"
                }
              ]
            },
            {
              "names": [
                "--wait"
              ],
              "description": "Wait for the server(s) (and loadbalancer) to be ready before returning"
            }
          ],
          "args": [
            {
              "name": "cluster",
              "description": "Cluster to start",
              "generators": [
                {
                  "script": [
                    "k3d",
                    "cluster",
                    "list",
                    "--no-headers"
                  ]
                }
              ]
            }
          ]
        },
        {
          "name": "stop",
          "description": "Stop a cluster",
          "options": [
            {
              "names": [
                "-a",
                "--all"
              ],
              "description": "Stop all clusters"
            }
          ],
          "args": [
            {
              "name": "cluster",
              "description": "Cluster to stop",
              "generators": [
                {
                  "script": [
                    "k3d",
                    "cluster",
                    "list",
                    "--no-headers"
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "completion",
      "description": "Generate shell completion scripts",
      "args": [
        {
          "name": "shell",
          "description": "Shell to generate completion script for",
          "suggestions": [
            "bash",
            "zsh",
            "fish",
            "powershell"
          ]
        }
      ]
    },
    {
      "name": "config",
      "description": "Manage k3d config",
      "subcommands": [
        {
          "name": "init",
          "aliases": [
            "create"
          ],
          "description": "Create a new config file",
          "options": [
            {
              "names": [
                "-f",
                "--force"
              ],
              "description": "Force overwrite of target file"
            },
            {
              "names": [
                "-o",
                "--output"
              ],
              "description": "Write a default k3d config (default \"k3d-default.yaml\")"
            }
          ]
        },
        {
          "name": "migrate",
          "aliases": [
            "update"
          ],
          "description": "Migrate a config file to the latest version"
        }
      ]
    },
    {
      "name": "image",
      "description": "Manage k3d images",
      "subcommands": [
        {
          "name": "import",
          "aliases": [
            "load"
          ],
          "description": "Import image(s) from docker into k3d cluster(s)",
          "options": [
            {
              "names": [
                "-c",
                "--cluster"
              ],
              "description": "Cluster to import image(s) into",
              "args": [
                {
                  "name": "cluster",
                  "description": "Cluster to import image(s) into",
                  "generators": [
                    {
                      "script": [
                        "k3d",
                        "cluster",
                        "list",
                        "--no-headers"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "names": [
                "-k",
                "--keep-tarball"
              ],
              "description": "Do not delete the tarball containing the saved images from the shared volume"
            },
            {
              "names": [
                "-t",
                "--keep-tools"
              ],
              "description": "Do not delete the tools node after import"
            },
            {
              "names": [
                "-m",
                "--mode"
              ],
              "description": "Import mode",
              "args": [
                {
                  "name": "mode",
                  "description": "Import mode",
                  "suggestions": [
                    "auto",
                    "direct",
                    "tools"
                  ]
                }
              ]
            }
          ],
          "args": [
            {
              "name": "image",
              "description": "Image to import",
              "generators": [
                {
                  "script": [
                    "docker",
                    "image",
                    "ls",
                    "--format",
                    "{{.Repository}}:{{.Tag}}"
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "kubeconfig",
      "description": "Manage k3d kubeconfig",
      "subcommands": [
        {
          "name": "get",
          "aliases": [
            "print",
            "show"
          ],
          "options": [
            {
              "names": [
                "-a",
                "--all"
              ]
            }
          ],
          "args": [
            {
              "name": "cluster",
              "description": "Cluster to get kubeconfig for",
              "generators": [
                {
                  "script": [
                    "k3d",
                    "cluster",
                    "list",
                    "--no-headers"
                  ]
                }
              ]
            }
          ]
        },
        {
          "name": "merge",
          "aliases": [
            "write"
          ],
          "description": "Write/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file",
          "options": [
            {
              "names": [
                "-a",
                "--all"
              ]
            },
            {
              "names": [
                "-d",
                "--kubeconfig-merge-default"
              ],
              "description": "Merge into the default kubeconfig ($KUBECONFIG or /Users/balli/.kube/config)"
            },
            {
              "names": [
                "-s",
                "--kubeconfig-switch-context"
              ],
              "description": "Switch to new context (default true)"
            },
            {
              "names": [
                "-o",
                "--output"
              ],
              "description": "Define output [ - | FILE ] (default from $KUBECONFIG or /Users/balli/.kube/config",
              "args": [
                {
                  "name": "string",
                  "description": "Define output [ - | FILE ] (default from $KUBECONFIG or /Users/balli/.kube/config"
                }
              ]
            },
            {
              "names": [
                "--overwrite"
              ],
              "description": "[Careful!] Overwrite existing file, ignoring its contents",
              "isDangerous": true
            },
            {
              "names": [
                "-u",
                "--update"
              ],
              "description": "Update conflicting fields in existing kubeconfig (default true)"
            }
          ],
          "args": [
            {
              "name": "cluster",
              "description": "Cluster to get kubeconfig for",
              "generators": [
                {
                  "script": [
                    "k3d",
                    "cluster",
                    "list",
                    "--no-headers"
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "node",
      "description": "Manage k3d nodes",
      "subcommands": [
        {
          "name": "create",
          "description": "Create a new node",
          "options": [
            {
              "names": [
                "-c",
                "--cluster"
              ],
              "description": "Cluster URL or k3d cluster name to connect to. (default \"k3s-default\")",
              "args": [
                {
                  "name": "cluster",
                  "description": "Cluster to connect to",
                  "generators": [
                    {
                      "script": [
                        "k3d",
                        "cluster",
                        "list",
                        "--no-headers"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "names": [
                "-i",
                "--image"
              ],
              "description": "Node image to use",
              "args": [
                {
                  "name": "image",
                  "description": "Node image to use"
                }
              ]
            },
            {
              "names": [
                "--k3s-arg"
              ],
              "description": "Additional k3s arguments",
              "args": [
                {
                  "name": "k3s-arg",
                  "description": "Additional k3s arguments"
                }
              ]
            },
            {
              "names": [
                "--k3s-node-label"
              ],
              "description": "Specify k3s node labels in format",
              "args": [
                {
                  "name": "k3s-node-label",
                  "description": "Specify k3s node labels in format \"foo=bar\""
                }
              ]
            },
            {
              "names": [
                "--memory"
              ],
              "description": "Memory limit for the node container",
              "args": [
                {
                  "name": "memory",
                  "description": "Memory limit for the node container"
                }
              ]
            },
            {
              "names": [
                "-n",
                "--network"
              ],
              "description": "Add node to (another) runtime network",
              "args": [
                {
                  "name": "network"
                }
              ]
            },
            {
              "names": [
                "--replicas"
              ],
              "description": "Number of replicas to create",
              "args": [
                {
                  "name": "replicas",
                  "description": "Number of replicas to create",
                  "suggestions": [
                    "1",
                    "2",
                    "3",
                    "4",
                    "5"
                  ]
                }
              ]
            },
            {
              "names": [
                "--role"
              ],
              "description": "Node role",
              "args": [
                {
                  "name": "role",
                  "description": "Node role",
                  "suggestions": [
                    "agent",
                    "server"
                  ]
                }
              ]
            },
            {
              "names": [
                "--runtime-label"
              ],
              "description": "Specify runtime labels in format",
              "args": [
                {
                  "name": "runtime-label",
                  "description": "Specify runtime labels in format \"foo=bar\""
                }
              ]
            },
            {
              "names": [
                "--timeout"
              ],
              "description": "Maximum waiting time for '--wait' before canceling/returning",
              "args": [
                {
                  "name": "timeout",
                  "description": "Maximum waiting time for '--wait' before canceling/returning"
                }
              ]
            },
            {
              "names": [
                "-t",
                "--token"
              ],
              "description": "Override cluster token",
              "args": [
                {
                  "name": "token"
                }
              ]
            },
            {
              "names": [
                "--wait"
              ],
              "description": "Wait for the node(s) to be ready before returning"
            }
          ],
          "args": [
            {
              "name": "Node Name",
              "description": "Name of the node"
            }
          ]
        },
        {
          "name": "delete",
          "description": "Delete a node",
          "options": [
            {
              "names": [
                "-a",
                "--all"
              ],
              "description": "Delete all existing nodes"
            },
            {
              "names": [
                "-r",
                "--registry"
              ],
              "description": "Also delete registries"
            }
          ],
          "args": [
            {
              "name": "Node Name",
              "description": "Name of the node",
              "generators": [
                {
                  "script": [
                    "k3d",
                    "node",
                    "list",
                    "--no-headers"
                  ]
                }
              ]
            }
          ]
        },
        {
          "name": "edit",
          "aliases": [
            "update"
          ],
          "description": "[EXPERIMENTAL] Edit node(s)",
          "options": [
            {
              "names": [
                "--port-add"
              ],
              "description": "Map ports from the node container to the host",
              "args": [
                {
                  "name": "port-add",
                  "description": "Map ports from the node container to the host"
                }
              ]
            }
          ],
          "args": [
            {
              "name": "Node Name",
              "description": "Name of the node",
              "generators": [
                {
                  "script": [
                    "k3d",
                    "node",
                    "list",
                    "--no-headers"
                  ]
                }
              ]
            }
          ]
        },
        {
          "name": "list",
          "aliases": [
            "ls",
            "get"
          ],
          "description": "List nodes",
          "options": [
            {
              "names": [
                "--no-headers"
              ],
              "description": "Don't print headers (default print headers)"
            },
            {
              "names": [
                "-o",
                "--output"
              ],
              "description": "Output format",
              "args": [
                {
                  "name": "output",
                  "description": "Output format",
                  "suggestions": [
                    "json",
                    "yaml"
                  ]
                }
              ]
            }
          ]
        },
        {
          "name": "start",
          "description": "Start a node",
          "args": [
            {
              "name": "Node Name",
              "description": "Name of the node",
              "generators": [
                {
                  "script": [
                    "k3d",
                    "node",
                    "list",
                    "--no-headers"
                  ]
                }
              ]
            }
          ]
        },
        {
          "name": "stop",
          "description": "Stop a node",
          "args": [
            {
              "name": "Node Name",
              "description": "Name of the node",
              "generators": [
                {
                  "script": [
                    "k3d",
                    "node",
                    "list",
                    "--no-headers"
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "registry",
      "aliases": [
        "registries",
        "reg"
      ],
      "description": "Manage registry/registries",
      "subcommands": [
        {
          "name": "create",
          "description": "Create a new registry",
          "options": [
            {
              "names": [
                "--default-network"
              ],
              "description": "Specify the network connected to the registry (default \"bridge\")"
            },
            {
              "names": [
                "-i",
                "--image"
              ],
              "description": "Specify image used for the registry (default \"docker.io/library/registry:2\")",
              "args": [
                {
                  "name": "image"
                }
              ]
            },
            {
              "names": [
                "--no-help"
              ],
              "description": "Disable the help text (How-To use the registry)"
            },
            {
              "names": [
                "-p",
                "--port"
              ],
              "description": "Select which port the registry should be listening on your machine (localhost) (Format: [HOST:]HOSTPORT)",
              "args": [
                {
                  "name": "port"
                }
              ]
            },
            {
              "names": [
                "--proxy-password"
              ],
              "description": "Specify the password of the proxied remote registry",
              "args": [
                {
                  "name": "proxy-password"
                }
              ]
            },
            {
              "names": [
                "--proxy-remote-url"
              ],
              "description": "Specify the url of the proxied remote registry",
              "args": [
                {
                  "name": "proxy-remote-url"
                }
              ]
            },
            {
              "names": [
                "--proxy-username"
              ],
              "description": "Specify the username of the proxied remote registry",
              "args": [
                {
                  "name": "proxy-username"
                }
              ]
            },
            {
              "names": [
                "-v",
                "--volume"
              ],
              "description": "Mount volumes into the registry node (Format: [SOURCE:]DEST",
              "args": [
                {
                  "name": "volume"
                }
              ]
            }
          ],
          "args": [
            {
              "name": "Registry Name",
              "description": "Name of the registry"
            }
          ]
        },
        {
          "name": "delete",
          "aliases": [
            "del",
            "rm"
          ],
          "description": "Delete registry/registries",
          "options": [
            {
              "names": [
                "-a",
                "--all"
              ]
            }
          ],
          "args": [
            {
              "name": "Registry Name",
              "description": "Name of the registry",
              "generators": [
                {
                  "script": [
                    "k3d",
                    "registry",
                    "list",
                    "--no-headers"
                  ]
                }
              ]
            }
          ]
        },
        {
          "name": "list",
          "aliases": [
            "ls",
            "get"
          ],
          "description": "List registries",
          "options": [
            {
              "names": [
                "--no-headers"
              ],
              "description": "Don't print headers (default print headers)"
            },
            {
              "names": [
                "-o",
                "--output"
              ],
              "description": "Output format",
              "args": [
                {
                  "name": "output",
                  "description": "Output format",
                  "suggestions": [
                    "json",
                    "yaml"
                  ]
                }
              ]
            }
          ],
          "args": [
            {
              "name": "Registry Name",
              "description": "Name of the registry",
              "isOptional": true,
              "generators": [
                {
                  "script": [
                    "k3d",
                    "registry",
                    "list",
                    "--no-headers"
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "version",
      "description": "Show k3d and default k3s version"
    }
  ]
}
