{
  "name": "k3d",
  "description": "K3d is a lightweight wrapper to run k3s in Docker",
  "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",
              "takes_arg": true,
              "arg": {
                "name": "number of agents",
                "description": "Number of agents to create"
              }
            },
            {
              "names": [
                "--agents-memory"
              ],
              "description": "Memory limit imposed on the agents nodes",
              "takes_arg": true,
              "arg": {
                "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",
              "takes_arg": true,
              "arg": {
                "name": "port",
                "description": "Specify the Kubernetes API server port exposed on the LoadBalancer"
              }
            },
            {
              "names": [
                "-c",
                "--config"
              ],
              "description": "Path of a config file to use",
              "takes_arg": true,
              "arg": {
                "name": "path",
                "description": "Path of a config file to use"
              }
            },
            {
              "names": [
                "-e",
                "--env"
              ],
              "description": "Add environment variables to nodes",
              "takes_arg": true,
              "arg": {
                "name": "environment variables",
                "description": "Add environment variables to nodes"
              }
            },
            {
              "names": [
                "--gpus"
              ],
              "description": "GPU devices to add to the cluster node containers",
              "takes_arg": true,
              "arg": {
                "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",
              "takes_arg": true,
              "arg": {
                "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",
              "takes_arg": true,
              "arg": {
                "name": "image",
                "description": "Specify k3s image that you want to use for the nodes"
              }
            },
            {
              "names": [
                "--k3s-arg"
              ],
              "description": "Additional args passed to k3s command",
              "takes_arg": true,
              "arg": {
                "name": "ARG@NODEFILTER[;@NODEFILTER]",
                "description": "Additional args passed to k3s command"
              }
            },
            {
              "names": [
                "--k3s-node-label"
              ],
              "description": "Add label to k3s node",
              "takes_arg": true,
              "arg": {
                "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",
              "takes_arg": true,
              "arg": {
                "name": "path"
              }
            },
            {
              "names": [
                "--network"
              ],
              "description": "Specify the docker network to use",
              "takes_arg": true,
              "arg": {
                "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",
              "takes_arg": true,
              "arg": {
                "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",
              "takes_arg": true,
              "arg": {
                "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",
              "takes_arg": true,
              "arg": {
                "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",
              "takes_arg": true,
              "arg": {
                "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@s"
            },
            {
              "names": [
                "-s",
                "--servers"
              ],
              "description": "Specify how many servers you want to create",
              "takes_arg": true,
              "arg": {
                "name": "int",
                "description": "Specify how many servers you want to create"
              }
            },
            {
              "names": [
                "--servers-memory"
              ],
              "description": "Memory limit imposed on the server nodes [From docker]",
              "takes_arg": true,
              "arg": {
                "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",
              "takes_arg": true,
              "arg": {
                "name": "string"
              }
            },
            {
              "names": [
                "--timeout"
              ],
              "description": "Rollback changes if cluster couldn't be created in specified duration",
              "takes_arg": true,
              "arg": {
                "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",
              "takes_arg": true,
              "arg": {
                "name": "string",
                "description": "Specify a cluster token. By default, we generate one"
              }
            },
            {
              "names": [
                "-v",
                "--volume"
              ],
              "description": "Mount volumes into the nodes",
              "takes_arg": true,
              "arg": {
                "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",
              "takes_arg": true,
              "arg": {
                "name": "path",
                "description": "Path of a config file to use"
              }
            }
          ],
          "args": [
            {
              "name": "cluster",
              "description": "Cluster to delete"
            }
          ]
        },
        {
          "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"
            }
          ]
        },
        {
          "name": "list",
          "aliases": [
            "ls",
            "get"
          ],
          "description": "List clusters",
          "options": [
            {
              "names": [
                "--no-headers"
              ],
              "description": "Don't print headers"
            },
            {
              "names": [
                "-o",
                "--output"
              ],
              "description": "Output format",
              "takes_arg": true,
              "arg": {
                "name": "string",
                "description": "Output format",
                "suggestions": [
                  "json",
                  "yaml"
                ]
              }
            },
            {
              "names": [
                "--token"
              ],
              "description": "Print k3s cluster token"
            }
          ],
          "args": [
            {
              "name": "cluster",
              "description": "Cluster to list"
            }
          ]
        },
        {
          "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",
              "takes_arg": true,
              "arg": {
                "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"
            }
          ]
        },
        {
          "name": "stop",
          "description": "Stop a cluster",
          "options": [
            {
              "names": [
                "-a",
                "--all"
              ],
              "description": "Stop all clusters"
            }
          ],
          "args": [
            {
              "name": "cluster",
              "description": "Cluster to stop"
            }
          ]
        }
      ]
    },
    {
      "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",
              "takes_arg": true,
              "arg": {
                "name": "cluster",
                "description": "Cluster to import image(s) into"
              }
            },
            {
              "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",
              "takes_arg": true,
              "arg": {
                "name": "mode",
                "description": "Import mode",
                "suggestions": [
                  "auto",
                  "direct",
                  "tools"
                ]
              }
            }
          ],
          "args": [
            {
              "name": "image",
              "description": "Image to import"
            }
          ]
        }
      ]
    },
    {
      "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"
            }
          ]
        },
        {
          "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",
              "takes_arg": true,
              "arg": {
                "name": "string",
                "description": "Define output [ - | FILE ] (default from $KUBECONFIG or /Users/balli/.kube/config"
              }
            },
            {
              "names": [
                "--overwrite"
              ],
              "description": "[Careful!] Overwrite existing file, ignoring its contents"
            },
            {
              "names": [
                "-u",
                "--update"
              ],
              "description": "Update conflicting fields in existing kubeconfig (default true)"
            }
          ],
          "args": [
            {
              "name": "cluster",
              "description": "Cluster to get kubeconfig for"
            }
          ]
        }
      ]
    },
    {
      "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\")",
              "takes_arg": true,
              "arg": {
                "name": "cluster",
                "description": "Cluster to connect to"
              }
            },
            {
              "names": [
                "-i",
                "--image"
              ],
              "description": "Node image to use",
              "takes_arg": true,
              "arg": {
                "name": "image",
                "description": "Node image to use"
              }
            },
            {
              "names": [
                "--k3s-arg"
              ],
              "description": "Additional k3s arguments",
              "takes_arg": true,
              "arg": {
                "name": "k3s-arg",
                "description": "Additional k3s arguments"
              }
            },
            {
              "names": [
                "--k3s-node-label"
              ],
              "description": "Specify k3s node labels in format",
              "takes_arg": true,
              "arg": {
                "name": "k3s-node-label",
                "description": "Specify k3s node labels in format \"foo=bar\""
              }
            },
            {
              "names": [
                "--memory"
              ],
              "description": "Memory limit for the node container",
              "takes_arg": true,
              "arg": {
                "name": "memory",
                "description": "Memory limit for the node container"
              }
            },
            {
              "names": [
                "-n",
                "--network"
              ],
              "description": "Add node to (another) runtime network",
              "takes_arg": true,
              "arg": {
                "name": "network"
              }
            },
            {
              "names": [
                "--replicas"
              ],
              "description": "Number of replicas to create",
              "takes_arg": true,
              "arg": {
                "name": "replicas",
                "description": "Number of replicas to create",
                "suggestions": [
                  "1",
                  "2",
                  "3",
                  "4",
                  "5"
                ]
              }
            },
            {
              "names": [
                "--role"
              ],
              "description": "Node role",
              "takes_arg": true,
              "arg": {
                "name": "role",
                "description": "Node role",
                "suggestions": [
                  "agent",
                  "server"
                ]
              }
            },
            {
              "names": [
                "--runtime-label"
              ],
              "description": "Specify runtime labels in format",
              "takes_arg": true,
              "arg": {
                "name": "runtime-label",
                "description": "Specify runtime labels in format \"foo=bar\""
              }
            },
            {
              "names": [
                "--timeout"
              ],
              "description": "Maximum waiting time for '--wait' before canceling/returning",
              "takes_arg": true,
              "arg": {
                "name": "timeout",
                "description": "Maximum waiting time for '--wait' before canceling/returning"
              }
            },
            {
              "names": [
                "-t",
                "--token"
              ],
              "description": "Override cluster token",
              "takes_arg": true,
              "arg": {
                "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"
            }
          ]
        },
        {
          "name": "edit",
          "aliases": [
            "update"
          ],
          "description": "[EXPERIMENTAL] Edit node(s)",
          "options": [
            {
              "names": [
                "--port-add"
              ],
              "description": "Map ports from the node container to the host",
              "takes_arg": true,
              "arg": {
                "name": "port-add",
                "description": "Map ports from the node container to the host"
              }
            }
          ],
          "args": [
            {
              "name": "Node Name",
              "description": "Name of the node"
            }
          ]
        },
        {
          "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",
              "takes_arg": true,
              "arg": {
                "name": "output",
                "description": "Output format",
                "suggestions": [
                  "json",
                  "yaml"
                ]
              }
            }
          ]
        },
        {
          "name": "start",
          "description": "Start a node",
          "args": [
            {
              "name": "Node Name",
              "description": "Name of the node"
            }
          ]
        },
        {
          "name": "stop",
          "description": "Stop a node",
          "args": [
            {
              "name": "Node Name",
              "description": "Name of the node"
            }
          ]
        }
      ]
    },
    {
      "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\")",
              "takes_arg": true,
              "arg": {
                "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)",
              "takes_arg": true,
              "arg": {
                "name": "port"
              }
            },
            {
              "names": [
                "--proxy-password"
              ],
              "description": "Specify the password of the proxied remote registry",
              "takes_arg": true,
              "arg": {
                "name": "proxy-password"
              }
            },
            {
              "names": [
                "--proxy-remote-url"
              ],
              "description": "Specify the url of the proxied remote registry",
              "takes_arg": true,
              "arg": {
                "name": "proxy-remote-url"
              }
            },
            {
              "names": [
                "--proxy-username"
              ],
              "description": "Specify the username of the proxied remote registry",
              "takes_arg": true,
              "arg": {
                "name": "proxy-username"
              }
            },
            {
              "names": [
                "-v",
                "--volume"
              ],
              "description": "Mount volumes into the registry node (Format: [SOURCE:]DEST",
              "takes_arg": true,
              "arg": {
                "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"
            }
          ]
        },
        {
          "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",
              "takes_arg": true,
              "arg": {
                "name": "output",
                "description": "Output format",
                "suggestions": [
                  "json",
                  "yaml"
                ]
              }
            }
          ],
          "args": [
            {
              "name": "Registry Name",
              "description": "Name of the registry"
            }
          ]
        }
      ]
    },
    {
      "name": "version",
      "description": "Show k3d and default k3s version"
    }
  ],
  "options": [
    {
      "names": [
        "-h",
        "--help"
      ],
      "description": "Help for k3d"
    },
    {
      "names": [
        "--verbose"
      ],
      "description": "Verbose output"
    },
    {
      "names": [
        "--trace"
      ],
      "description": "Trace output"
    },
    {
      "names": [
        "--version"
      ],
      "description": "Print version information"
    },
    {
      "names": [
        "--timestamps"
      ],
      "description": "Print timestamp in log output"
    }
  ]
}
