{
  "id": "k3d",
  "name": "k3d",
  "description": "A lightweight wrapper to run k3s clusters in Docker.",
  "homepage": "https://k3d.io",
  "executables": [
    "k3d"
  ],
  "commands": {
    "format": 1,
    "label": "k3d",
    "description": "Create and manage k3s clusters in Docker. Node, registry, image and kubeconfig commands are left out.",
    "quality": "ai-draft",
    "base": "fig:k3d",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "src",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/k3d.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "verbose",
        "label": "Verbose output",
        "description": "Verbose output.",
        "type": "boolean",
        "option": [
          "--verbose"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "trace",
        "label": "Trace output",
        "description": "Trace output.",
        "type": "boolean",
        "option": [
          "--trace"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "timestamps",
        "label": "Log timestamps",
        "description": "Print timestamps in log output.",
        "type": "boolean",
        "option": [
          "--timestamps"
        ],
        "sources": [
          "src"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "verbose",
          "trace",
          "timestamps"
        ]
      }
    ],
    "subcommand": [
      {
        "path": [
          "cluster",
          "create"
        ],
        "label": "Create a cluster",
        "description": "Create a new k3s cluster.",
        "source": [
          {
            "id": "src",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/k3d.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "name",
            "label": "Cluster name",
            "description": "Name of the cluster to create.",
            "type": "string",
            "position": 0,
            "sources": [
              "src"
            ]
          },
          {
            "id": "servers",
            "label": "Servers",
            "description": "How many servers to create.",
            "type": "integer",
            "option": [
              "--servers",
              "-s"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "agents",
            "label": "Agents",
            "description": "Number of agents to create.",
            "type": "integer",
            "option": [
              "--agents",
              "-a"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "port",
            "label": "Port mapping",
            "description": "Map ports from node containers to the host (repeatable).",
            "type": "string",
            "option": [
              "--port",
              "-p"
            ],
            "multiple": true,
            "sources": [
              "src"
            ]
          },
          {
            "id": "volume",
            "label": "Volume mount",
            "description": "Mount volumes into the nodes (repeatable).",
            "type": "string",
            "option": [
              "--volume",
              "-v"
            ],
            "multiple": true,
            "sources": [
              "src"
            ]
          },
          {
            "id": "image",
            "label": "k3s image",
            "description": "k3s image for the nodes.",
            "type": "string",
            "option": [
              "--image",
              "-i"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "api_port",
            "label": "API port",
            "description": "Kubernetes API server port exposed on the load balancer.",
            "type": "string",
            "option": [
              "--api-port"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "network",
            "label": "Docker network",
            "description": "Docker network to use.",
            "type": "string",
            "option": [
              "--network"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "no_lb",
            "label": "No load balancer",
            "description": "Do not create a load balancer.",
            "type": "boolean",
            "option": [
              "--no-lb"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "wait",
            "label": "Wait until ready",
            "description": "Wait for the servers to be ready before returning.",
            "type": "boolean",
            "option": [
              "--wait"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "timeout",
            "label": "Timeout",
            "description": "Roll back if the cluster is not created within this duration.",
            "type": "string",
            "option": [
              "--timeout"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "config",
            "label": "Config file",
            "type": "path",
            "option": [
              "--config",
              "-c"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "src"
            ]
          }
        ],
        "task": [
          {
            "id": "create",
            "label": "Create a cluster",
            "fields": [
              "name",
              "servers",
              "agents",
              "wait"
            ],
            "required": [
              "name"
            ]
          },
          {
            "id": "create_ports",
            "label": "Create with port mapping",
            "fields": [
              "name",
              "port",
              "agents"
            ],
            "required": [
              "name",
              "port"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "name",
              "servers",
              "agents",
              "port",
              "volume",
              "wait"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "image",
              "api_port",
              "network",
              "no_lb",
              "timeout",
              "config"
            ]
          }
        ]
      },
      {
        "path": [
          "cluster",
          "list"
        ],
        "label": "List clusters",
        "description": "List clusters.",
        "source": [
          {
            "id": "src",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/k3d.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "cluster",
            "label": "Cluster",
            "description": "Cluster to list; leave empty for all.",
            "type": "string",
            "position": 0,
            "sources": [
              "src"
            ]
          },
          {
            "id": "no_headers",
            "label": "No headers",
            "description": "Do not print headers.",
            "type": "boolean",
            "option": [
              "--no-headers"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "output",
            "label": "Output format",
            "description": "Output format.",
            "type": "string",
            "option": [
              "--output",
              "-o"
            ],
            "suggestions": [
              {
                "value": "json",
                "label": "json"
              },
              {
                "value": "yaml",
                "label": "yaml"
              }
            ],
            "sources": [
              "src"
            ]
          }
        ],
        "task": [
          {
            "id": "list",
            "label": "List clusters",
            "fields": [],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "cluster",
              "no_headers",
              "output"
            ]
          }
        ]
      },
      {
        "path": [
          "cluster",
          "start"
        ],
        "label": "Start a cluster",
        "description": "Start a stopped cluster.",
        "source": [
          {
            "id": "src",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/k3d.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "cluster",
            "label": "Cluster",
            "description": "Cluster to start.",
            "type": "string",
            "position": 0,
            "sources": [
              "src"
            ]
          },
          {
            "id": "all",
            "label": "All clusters",
            "description": "Start all clusters.",
            "type": "boolean",
            "option": [
              "--all"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "wait",
            "label": "Wait until ready",
            "description": "Wait for the servers and load balancer to be ready.",
            "type": "boolean",
            "option": [
              "--wait"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "timeout",
            "label": "Timeout",
            "description": "Maximum waiting time for the wait option.",
            "type": "string",
            "option": [
              "--timeout"
            ],
            "sources": [
              "src"
            ]
          }
        ],
        "task": [
          {
            "id": "start",
            "label": "Start a cluster",
            "fields": [
              "cluster",
              "wait"
            ],
            "required": [
              "cluster"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "cluster",
              "all",
              "wait",
              "timeout"
            ]
          }
        ]
      },
      {
        "path": [
          "cluster",
          "stop"
        ],
        "label": "Stop a cluster",
        "description": "Stop a running cluster.",
        "source": [
          {
            "id": "src",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/k3d.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "cluster",
            "label": "Cluster",
            "description": "Cluster to stop.",
            "type": "string",
            "position": 0,
            "sources": [
              "src"
            ]
          },
          {
            "id": "all",
            "label": "All clusters",
            "description": "Stop all clusters.",
            "type": "boolean",
            "option": [
              "--all",
              "-a"
            ],
            "sources": [
              "src"
            ]
          }
        ],
        "task": [
          {
            "id": "stop",
            "label": "Stop a cluster",
            "fields": [
              "cluster"
            ],
            "required": [
              "cluster"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "cluster",
              "all"
            ]
          }
        ]
      },
      {
        "path": [
          "cluster",
          "delete"
        ],
        "label": "Delete a cluster",
        "description": "Delete a cluster and its containers.",
        "source": [
          {
            "id": "src",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/k3d.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "cluster",
            "label": "Cluster",
            "description": "Cluster to delete.",
            "type": "string",
            "position": 0,
            "effect": "delete",
            "sources": [
              "src"
            ]
          },
          {
            "id": "all",
            "label": "All clusters",
            "description": "Delete all clusters.",
            "type": "boolean",
            "option": [
              "--all",
              "-a"
            ],
            "effect": "delete",
            "sources": [
              "src"
            ]
          }
        ],
        "task": [
          {
            "id": "delete",
            "label": "Delete a cluster",
            "fields": [
              "cluster"
            ],
            "required": [
              "cluster"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "cluster",
              "all"
            ]
          }
        ]
      }
    ]
  }
}
