{
  "description": "Scaffold, build, deploy and invoke OpenFaaS functions. Registry login, secrets, templates and store commands are left out.",
  "name": "faas-cli",
  "subcommands": [
    {
      "name": "new",
      "description": "Scaffold a new function from a template in the current folder.",
      "options": [
        {
          "names": [
            "--lang"
          ],
          "description": "Language / template",
          "args": {
            "name": "lang",
            "isOptional": false,
            "suggestions": [
              {
                "name": "node20",
                "description": "Node.js 20"
              },
              {
                "name": "python3-http",
                "description": "Python 3 (HTTP)"
              },
              {
                "name": "golang-middleware",
                "description": "Go (middleware)"
              }
            ]
          }
        },
        {
          "names": [
            "--prefix",
            "-p"
          ],
          "description": "Registry or user prefix for the function image, for example ghcr.io/user.",
          "args": {
            "name": "prefix",
            "description": "Registry or user prefix for the function image, for example ghcr.io/user.",
            "isOptional": false
          }
        },
        {
          "names": [
            "--gateway",
            "-g"
          ],
          "description": "Gateway URL starting with http(s)://. Defaults to the OPENFAAS_URL or http://127.0.0.1:8080.",
          "args": {
            "name": "gateway",
            "description": "Gateway URL starting with http(s)://. Defaults to the OPENFAAS_URL or http://127.0.0.1:8080.",
            "isOptional": false
          }
        },
        {
          "names": [
            "--list"
          ],
          "description": "List available languages"
        },
        {
          "names": [
            "--append",
            "-a"
          ],
          "description": "Append to stack file",
          "args": {
            "name": "append",
            "isOptional": false,
            "template": "filepaths"
          }
        },
        {
          "names": [
            "--quiet",
            "-q"
          ],
          "description": "Skip template notes"
        }
      ],
      "args": [
        {
          "name": "name",
          "isOptional": false
        }
      ]
    },
    {
      "name": "up",
      "description": "Run build, push and deploy for the functions in a stack file.",
      "options": [
        {
          "names": [
            "--yaml",
            "-f"
          ],
          "description": "Stack file",
          "args": {
            "name": "yaml",
            "isOptional": false,
            "template": "filepaths"
          }
        },
        {
          "names": [
            "--filter"
          ],
          "description": "Wildcard to match function names in the stack file.",
          "args": {
            "name": "filter",
            "description": "Wildcard to match function names in the stack file.",
            "isOptional": false
          }
        },
        {
          "names": [
            "--publish"
          ],
          "description": "Multi-arch publish"
        },
        {
          "names": [
            "--platforms"
          ],
          "description": "Used with publish.",
          "args": {
            "name": "platforms",
            "description": "Used with publish.",
            "isOptional": false,
            "suggestions": [
              {
                "name": "linux/amd64",
                "description": "linux/amd64"
              },
              {
                "name": "linux/arm64",
                "description": "linux/arm64"
              },
              {
                "name": "linux/amd64,linux/arm64",
                "description": "amd64 + arm64"
              }
            ]
          }
        },
        {
          "names": [
            "--skip-push"
          ],
          "description": "Skip push"
        },
        {
          "names": [
            "--skip-deploy"
          ],
          "description": "Skip deploy"
        },
        {
          "names": [
            "--watch"
          ],
          "description": "Watch and redeploy"
        }
      ]
    },
    {
      "name": "deploy",
      "description": "Deploy functions from a stack file or an existing image.",
      "options": [
        {
          "names": [
            "--yaml",
            "-f"
          ],
          "description": "Stack file",
          "args": {
            "name": "yaml",
            "isOptional": false,
            "template": "filepaths"
          }
        },
        {
          "names": [
            "--gateway",
            "-g"
          ],
          "description": "Gateway URL starting with http(s)://. Defaults to the OPENFAAS_URL or http://127.0.0.1:8080.",
          "args": {
            "name": "gateway",
            "description": "Gateway URL starting with http(s)://. Defaults to the OPENFAAS_URL or http://127.0.0.1:8080.",
            "isOptional": false
          }
        },
        {
          "names": [
            "--namespace",
            "-n"
          ],
          "description": "Namespace",
          "args": {
            "name": "namespace",
            "isOptional": false
          }
        },
        {
          "names": [
            "--image"
          ],
          "description": "Docker image to deploy (when not using a stack file).",
          "args": {
            "name": "image",
            "description": "Docker image to deploy (when not using a stack file).",
            "isOptional": false
          }
        },
        {
          "names": [
            "--name"
          ],
          "description": "Function name",
          "args": {
            "name": "name",
            "isOptional": false
          }
        },
        {
          "names": [
            "--env",
            "-e"
          ],
          "description": "ENVVAR=VALUE, repeatable.",
          "args": {
            "name": "env",
            "description": "ENVVAR=VALUE, repeatable.",
            "isOptional": false,
            "isVariadic": true
          },
          "isRepeatable": true
        },
        {
          "names": [
            "--label",
            "-l"
          ],
          "description": "LABEL=VALUE, repeatable.",
          "args": {
            "name": "label",
            "description": "LABEL=VALUE, repeatable.",
            "isOptional": false,
            "isVariadic": true
          },
          "isRepeatable": true
        },
        {
          "names": [
            "--secret"
          ],
          "description": "Secrets",
          "args": {
            "name": "secret",
            "isOptional": false,
            "isVariadic": true
          },
          "isRepeatable": true
        },
        {
          "names": [
            "--replace"
          ],
          "description": "Replace existing function",
          "isDangerous": true
        },
        {
          "names": [
            "--tls-no-verify"
          ],
          "description": "Skip TLS verification"
        }
      ]
    },
    {
      "name": "invoke",
      "description": "Call a deployed function; the request body is read from standard input.",
      "options": [
        {
          "names": [
            "--gateway",
            "-g"
          ],
          "description": "Gateway URL starting with http(s)://. Defaults to the OPENFAAS_URL or http://127.0.0.1:8080.",
          "args": {
            "name": "gateway",
            "description": "Gateway URL starting with http(s)://. Defaults to the OPENFAAS_URL or http://127.0.0.1:8080.",
            "isOptional": false
          }
        },
        {
          "names": [
            "--content-type"
          ],
          "description": "Content type",
          "args": {
            "name": "content_type",
            "isOptional": false,
            "suggestions": [
              {
                "name": "application/json",
                "description": "JSON"
              },
              {
                "name": "text/plain",
                "description": "Plain text"
              }
            ]
          }
        },
        {
          "names": [
            "--header",
            "-H"
          ],
          "description": "\"KEY: VALUE\", repeatable.",
          "args": {
            "name": "header",
            "description": "\"KEY: VALUE\", repeatable.",
            "isOptional": false,
            "isVariadic": true
          },
          "isRepeatable": true
        },
        {
          "names": [
            "--query"
          ],
          "description": "KEY=VALUE, repeatable.",
          "args": {
            "name": "query",
            "description": "KEY=VALUE, repeatable.",
            "isOptional": false,
            "isVariadic": true
          },
          "isRepeatable": true
        },
        {
          "names": [
            "--method",
            "-m"
          ],
          "description": "HTTP method",
          "args": {
            "name": "method",
            "isOptional": false,
            "suggestions": [
              {
                "name": "POST",
                "description": "POST"
              },
              {
                "name": "GET",
                "description": "GET"
              }
            ]
          }
        },
        {
          "names": [
            "--async",
            "-a"
          ],
          "description": "Asynchronous"
        }
      ],
      "args": [
        {
          "name": "function",
          "isOptional": false
        }
      ]
    }
  ]
}
