id = "faas-cli" name = "faas-cli" homepage = "https://github.com/openfaas/faas-cli" executables = ["faas-cli"] [dotfiles] # The official CLI stores the credentials created by `faas-cli login` in # ~/.openfaas/config.yml by default; OPENFAAS_CONFIG can override this path. # https://github.com/openfaas/faas-cli/blob/master/README.md # https://pkg.go.dev/github.com/openfaas/faas-cli/stack paths = [] exclude = [] secret = ["~/.openfaas/config.yml"] [commands] format = 1 label = "Work with OpenFaaS functions" description = "Scaffold, build, deploy and invoke OpenFaaS functions. Registry login, secrets, templates and store commands are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "help" kind = "help" url = "https://github.com/openfaas/faas-cli" revision = "master 2026-10-27" evidence = """ (Rendered from the cobra flag definitions in commands/*.go of openfaas/faas-cli) faas-cli new FUNCTION_NAME --lang=FUNCTION_LANGUAGE [--gateway=http://host:port] | --list | --append=STACK_FILE) --lang string Language or template to use -g, --gateway string Gateway URL to store in YAML stack file -p, --prefix string Set prefix for the function image --list List available languages -a, --append string Append to existing YAML file -q, --quiet Skip template notes faas-cli up -f [YAML_FILE] [--skip-push] [--skip-deploy] [flags from build, push, deploy] Builds, pushes and deploys OpenFaaS function containers -f, --yaml string Path to YAML file describing function(s) --filter string Wildcard to match with function names in YAML file --publish Use faas-cli publish instead of faas-cli build followed by faas-cli push --platforms string Publish for these platforms, when used with --publish --skip-push Skip pushing function to remote registry --skip-deploy Skip function deployment --watch Watch for changes in files and re-deploy faas-cli deploy -g, --gateway string Gateway URL starting with http(s):// --image string Docker image name to build --name string Name of the deployed function -n, --namespace string Namespace of the function -e, --env stringArray Set one or more environment variables (ENVVAR=VALUE) -l, --label stringArray Set one or more label (LABEL=VALUE) --replace Remove and re-create existing function(s) --secret stringArray Give the function access to a secure secret --tls-no-verify Disable TLS validation faas-cli invoke FUNCTION_NAME [--gateway GATEWAY_URL] [--content-type CONTENT_TYPE] [--query KEY=VALUE] [--header "KEY: VALUE"] [--method HTTP_METHOD] Invoke an OpenFaaS function --content-type string The content-type HTTP header such as application/json -H, --header stringArray pass HTTP request header --query stringArray pass query-string options -a, --async Invoke the function asynchronously -m, --method string pass HTTP request method """ [[commands.subcommand]] path = ["new"] label = "Create a function" description = "Scaffold a new function from a template in the current folder." [[commands.subcommand.source]] id = "help" kind = "help" url = "https://github.com/openfaas/faas-cli" revision = "master 2026-10-27" evidence = """ (Rendered from the cobra flag definitions in commands/*.go of openfaas/faas-cli) faas-cli new FUNCTION_NAME --lang=FUNCTION_LANGUAGE [--gateway=http://host:port] | --list | --append=STACK_FILE) --lang string Language or template to use -g, --gateway string Gateway URL to store in YAML stack file -p, --prefix string Set prefix for the function image --list List available languages -a, --append string Append to existing YAML file -q, --quiet Skip template notes faas-cli up -f [YAML_FILE] [--skip-push] [--skip-deploy] [flags from build, push, deploy] Builds, pushes and deploys OpenFaaS function containers -f, --yaml string Path to YAML file describing function(s) --filter string Wildcard to match with function names in YAML file --publish Use faas-cli publish instead of faas-cli build followed by faas-cli push --platforms string Publish for these platforms, when used with --publish --skip-push Skip pushing function to remote registry --skip-deploy Skip function deployment --watch Watch for changes in files and re-deploy faas-cli deploy -g, --gateway string Gateway URL starting with http(s):// --image string Docker image name to build --name string Name of the deployed function -n, --namespace string Namespace of the function -e, --env stringArray Set one or more environment variables (ENVVAR=VALUE) -l, --label stringArray Set one or more label (LABEL=VALUE) --replace Remove and re-create existing function(s) --secret stringArray Give the function access to a secure secret --tls-no-verify Disable TLS validation faas-cli invoke FUNCTION_NAME [--gateway GATEWAY_URL] [--content-type CONTENT_TYPE] [--query KEY=VALUE] [--header "KEY: VALUE"] [--method HTTP_METHOD] Invoke an OpenFaaS function --content-type string The content-type HTTP header such as application/json -H, --header stringArray pass HTTP request header --query stringArray pass query-string options -a, --async Invoke the function asynchronously -m, --method string pass HTTP request method """ [[commands.subcommand.field]] id = "name" label = "Function name" type = "string" position = 0 min = 1 sources = ["help"] [[commands.subcommand.field]] id = "lang" label = "Language / template" type = "string" option = ["--lang"] suggestions = [{ value = "node20", label = "Node.js 20" }, { value = "python3-http", label = "Python 3 (HTTP)" }, { value = "golang-middleware", label = "Go (middleware)" }] sources = ["help"] [[commands.subcommand.field]] id = "prefix" label = "Image prefix" description = "Registry or user prefix for the function image, for example ghcr.io/user." type = "string" option = ["--prefix", "-p"] sources = ["help"] [[commands.subcommand.field]] id = "gateway" label = "Gateway URL" description = "Gateway URL starting with http(s)://. Defaults to the OPENFAAS_URL or http://127.0.0.1:8080." type = "url" option = ["--gateway", "-g"] sources = ["help"] [[commands.subcommand.field]] id = "list" label = "List available languages" type = "boolean" option = ["--list"] sources = ["help"] [[commands.subcommand.field]] id = "append" label = "Append to stack file" type = "path" option = ["--append", "-a"] path = { kind = "file", role = "input", must_exist = true } sources = ["help"] [[commands.subcommand.field]] id = "quiet" label = "Skip template notes" type = "boolean" option = ["--quiet", "-q"] sources = ["help"] [[commands.subcommand.task]] id = "new" label = "New function" fields = ["name", "lang", "prefix"] required = ["name", "lang"] [[commands.subcommand.task]] id = "list" label = "List languages" fields = ["list"] set = { list = [true] } lock = ["list"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["name", "lang", "prefix", "list"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["gateway", "append", "quiet"] [[commands.subcommand]] path = ["up"] label = "Build, push and deploy" description = "Run build, push and deploy for the functions in a stack file." [[commands.subcommand.source]] id = "help" kind = "help" url = "https://github.com/openfaas/faas-cli" revision = "master 2026-10-27" evidence = """ (Rendered from the cobra flag definitions in commands/*.go of openfaas/faas-cli) faas-cli new FUNCTION_NAME --lang=FUNCTION_LANGUAGE [--gateway=http://host:port] | --list | --append=STACK_FILE) --lang string Language or template to use -g, --gateway string Gateway URL to store in YAML stack file -p, --prefix string Set prefix for the function image --list List available languages -a, --append string Append to existing YAML file -q, --quiet Skip template notes faas-cli up -f [YAML_FILE] [--skip-push] [--skip-deploy] [flags from build, push, deploy] Builds, pushes and deploys OpenFaaS function containers -f, --yaml string Path to YAML file describing function(s) --filter string Wildcard to match with function names in YAML file --publish Use faas-cli publish instead of faas-cli build followed by faas-cli push --platforms string Publish for these platforms, when used with --publish --skip-push Skip pushing function to remote registry --skip-deploy Skip function deployment --watch Watch for changes in files and re-deploy faas-cli deploy -g, --gateway string Gateway URL starting with http(s):// --image string Docker image name to build --name string Name of the deployed function -n, --namespace string Namespace of the function -e, --env stringArray Set one or more environment variables (ENVVAR=VALUE) -l, --label stringArray Set one or more label (LABEL=VALUE) --replace Remove and re-create existing function(s) --secret stringArray Give the function access to a secure secret --tls-no-verify Disable TLS validation faas-cli invoke FUNCTION_NAME [--gateway GATEWAY_URL] [--content-type CONTENT_TYPE] [--query KEY=VALUE] [--header "KEY: VALUE"] [--method HTTP_METHOD] Invoke an OpenFaaS function --content-type string The content-type HTTP header such as application/json -H, --header stringArray pass HTTP request header --query stringArray pass query-string options -a, --async Invoke the function asynchronously -m, --method string pass HTTP request method """ [[commands.subcommand.field]] id = "yaml" label = "Stack file" type = "path" option = ["--yaml", "-f"] path = { kind = "file", role = "input", must_exist = true } sources = ["help"] [[commands.subcommand.field]] id = "filter" label = "Function name filter" description = "Wildcard to match function names in the stack file." type = "string" option = ["--filter"] sources = ["help"] [[commands.subcommand.field]] id = "publish" label = "Multi-arch publish" type = "boolean" option = ["--publish"] sources = ["help"] [[commands.subcommand.field]] id = "platforms" label = "Platforms" description = "Used with publish." type = "string" option = ["--platforms"] suggestions = [{ value = "linux/amd64", label = "linux/amd64" }, { value = "linux/arm64", label = "linux/arm64" }, { value = "linux/amd64,linux/arm64", label = "amd64 + arm64" }] sources = ["help"] [[commands.subcommand.field]] id = "skip_push" label = "Skip push" type = "boolean" option = ["--skip-push"] sources = ["help"] [[commands.subcommand.field]] id = "skip_deploy" label = "Skip deploy" type = "boolean" option = ["--skip-deploy"] sources = ["help"] [[commands.subcommand.field]] id = "watch" label = "Watch and redeploy" type = "boolean" option = ["--watch"] sources = ["help"] [[commands.subcommand.task]] id = "up" label = "Build, push, deploy" fields = ["yaml", "filter"] [[commands.subcommand.task]] id = "local" label = "Build and deploy locally" fields = ["yaml", "skip_push"] set = { skip_push = [true] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["yaml", "filter", "skip_push", "skip_deploy"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["publish", "platforms", "watch"] [[commands.subcommand]] path = ["deploy"] label = "Deploy functions" description = "Deploy functions from a stack file or an existing image." [[commands.subcommand.source]] id = "help" kind = "help" url = "https://github.com/openfaas/faas-cli" revision = "master 2026-10-27" evidence = """ (Rendered from the cobra flag definitions in commands/*.go of openfaas/faas-cli) faas-cli new FUNCTION_NAME --lang=FUNCTION_LANGUAGE [--gateway=http://host:port] | --list | --append=STACK_FILE) --lang string Language or template to use -g, --gateway string Gateway URL to store in YAML stack file -p, --prefix string Set prefix for the function image --list List available languages -a, --append string Append to existing YAML file -q, --quiet Skip template notes faas-cli up -f [YAML_FILE] [--skip-push] [--skip-deploy] [flags from build, push, deploy] Builds, pushes and deploys OpenFaaS function containers -f, --yaml string Path to YAML file describing function(s) --filter string Wildcard to match with function names in YAML file --publish Use faas-cli publish instead of faas-cli build followed by faas-cli push --platforms string Publish for these platforms, when used with --publish --skip-push Skip pushing function to remote registry --skip-deploy Skip function deployment --watch Watch for changes in files and re-deploy faas-cli deploy -g, --gateway string Gateway URL starting with http(s):// --image string Docker image name to build --name string Name of the deployed function -n, --namespace string Namespace of the function -e, --env stringArray Set one or more environment variables (ENVVAR=VALUE) -l, --label stringArray Set one or more label (LABEL=VALUE) --replace Remove and re-create existing function(s) --secret stringArray Give the function access to a secure secret --tls-no-verify Disable TLS validation faas-cli invoke FUNCTION_NAME [--gateway GATEWAY_URL] [--content-type CONTENT_TYPE] [--query KEY=VALUE] [--header "KEY: VALUE"] [--method HTTP_METHOD] Invoke an OpenFaaS function --content-type string The content-type HTTP header such as application/json -H, --header stringArray pass HTTP request header --query stringArray pass query-string options -a, --async Invoke the function asynchronously -m, --method string pass HTTP request method """ [[commands.subcommand.field]] id = "yaml" label = "Stack file" type = "path" option = ["--yaml", "-f"] path = { kind = "file", role = "input", must_exist = true } sources = ["help"] [[commands.subcommand.field]] id = "gateway" label = "Gateway URL" description = "Gateway URL starting with http(s)://. Defaults to the OPENFAAS_URL or http://127.0.0.1:8080." type = "url" option = ["--gateway", "-g"] sources = ["help"] [[commands.subcommand.field]] id = "namespace" label = "Namespace" type = "string" option = ["--namespace", "-n"] sources = ["help"] [[commands.subcommand.field]] id = "image" label = "Image" description = "Docker image to deploy (when not using a stack file)." type = "string" option = ["--image"] sources = ["help"] [[commands.subcommand.field]] id = "name" label = "Function name" type = "string" option = ["--name"] sources = ["help"] [[commands.subcommand.field]] id = "env" label = "Environment variables" description = "ENVVAR=VALUE, repeatable." type = "string" option = ["--env", "-e"] multiple = true sources = ["help"] [[commands.subcommand.field]] id = "label" label = "Labels" description = "LABEL=VALUE, repeatable." type = "string" option = ["--label", "-l"] multiple = true sources = ["help"] [[commands.subcommand.field]] id = "secret" label = "Secrets" type = "string" option = ["--secret"] multiple = true sources = ["help"] [[commands.subcommand.field]] id = "replace" label = "Replace existing function" type = "boolean" option = ["--replace"] effect = "overwrite" sources = ["help"] [[commands.subcommand.field]] id = "tls_no_verify" label = "Skip TLS verification" type = "boolean" option = ["--tls-no-verify"] sources = ["help"] [[commands.subcommand.task]] id = "stack" label = "Deploy from stack file" fields = ["yaml", "gateway", "namespace"] required = ["yaml"] [[commands.subcommand.task]] id = "image" label = "Deploy an image" fields = ["image", "name", "gateway", "env", "secret"] required = ["image", "name"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["yaml", "gateway", "namespace", "image", "name"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["env", "label", "secret", "replace", "tls_no_verify"] [[commands.subcommand]] path = ["invoke"] label = "Invoke a function" description = "Call a deployed function; the request body is read from standard input." [[commands.subcommand.source]] id = "help" kind = "help" url = "https://github.com/openfaas/faas-cli" revision = "master 2026-10-27" evidence = """ (Rendered from the cobra flag definitions in commands/*.go of openfaas/faas-cli) faas-cli new FUNCTION_NAME --lang=FUNCTION_LANGUAGE [--gateway=http://host:port] | --list | --append=STACK_FILE) --lang string Language or template to use -g, --gateway string Gateway URL to store in YAML stack file -p, --prefix string Set prefix for the function image --list List available languages -a, --append string Append to existing YAML file -q, --quiet Skip template notes faas-cli up -f [YAML_FILE] [--skip-push] [--skip-deploy] [flags from build, push, deploy] Builds, pushes and deploys OpenFaaS function containers -f, --yaml string Path to YAML file describing function(s) --filter string Wildcard to match with function names in YAML file --publish Use faas-cli publish instead of faas-cli build followed by faas-cli push --platforms string Publish for these platforms, when used with --publish --skip-push Skip pushing function to remote registry --skip-deploy Skip function deployment --watch Watch for changes in files and re-deploy faas-cli deploy -g, --gateway string Gateway URL starting with http(s):// --image string Docker image name to build --name string Name of the deployed function -n, --namespace string Namespace of the function -e, --env stringArray Set one or more environment variables (ENVVAR=VALUE) -l, --label stringArray Set one or more label (LABEL=VALUE) --replace Remove and re-create existing function(s) --secret stringArray Give the function access to a secure secret --tls-no-verify Disable TLS validation faas-cli invoke FUNCTION_NAME [--gateway GATEWAY_URL] [--content-type CONTENT_TYPE] [--query KEY=VALUE] [--header "KEY: VALUE"] [--method HTTP_METHOD] Invoke an OpenFaaS function --content-type string The content-type HTTP header such as application/json -H, --header stringArray pass HTTP request header --query stringArray pass query-string options -a, --async Invoke the function asynchronously -m, --method string pass HTTP request method """ [[commands.subcommand.field]] id = "function" label = "Function name" type = "string" position = 0 min = 1 sources = ["help"] [[commands.subcommand.field]] id = "gateway" label = "Gateway URL" description = "Gateway URL starting with http(s)://. Defaults to the OPENFAAS_URL or http://127.0.0.1:8080." type = "url" option = ["--gateway", "-g"] sources = ["help"] [[commands.subcommand.field]] id = "content_type" label = "Content type" type = "string" option = ["--content-type"] suggestions = [{ value = "application/json", label = "JSON" }, { value = "text/plain", label = "Plain text" }] sources = ["help"] [[commands.subcommand.field]] id = "header" label = "Headers" description = "\"KEY: VALUE\", repeatable." type = "string" option = ["--header", "-H"] multiple = true sources = ["help"] [[commands.subcommand.field]] id = "query" label = "Query parameters" description = "KEY=VALUE, repeatable." type = "string" option = ["--query"] multiple = true sources = ["help"] [[commands.subcommand.field]] id = "method" label = "HTTP method" type = "string" option = ["--method", "-m"] suggestions = [{ value = "POST", label = "POST" }, { value = "GET", label = "GET" }] sources = ["help"] [[commands.subcommand.field]] id = "async" label = "Asynchronous" type = "boolean" option = ["--async", "-a"] sources = ["help"] [[commands.subcommand.task]] id = "invoke" label = "Invoke" fields = ["function", "gateway", "content_type", "header"] required = ["function"] [[commands.subcommand.task]] id = "get" label = "GET with query" fields = ["function", "method", "query"] required = ["function"] set = { method = ["GET"] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["function", "gateway", "content_type", "method"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["header", "query", "async"]