{
  "id": "cloudflared",
  "name": "cloudflared",
  "homepage": "https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/",
  "description": "Cloudflare Tunnel client: connects a service to Cloudflare's network without opening an inbound port.",
  "icon": "theSVG:cloudflare",
  "executables": [
    "cloudflared"
  ],
  "dotfiles": {
    "paths": [
      "~/.cloudflared/config.yml"
    ],
    "exclude": [],
    "secret": [
      "~/.cloudflared/cert.pem",
      "~/.cloudflared/*.json"
    ],
    "machine_lines": [
      {
        "file": "~/.cloudflared/config.yml",
        "match": {
          "key_path": [
            "credentials-file"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "cloudflared",
    "description": "Run, create and list Cloudflare Tunnels.",
    "quality": "ai-draft",
    "base": "fig:cloudflared",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/cloudflared.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "tunnel"
        ],
        "label": "Quick tunnel",
        "description": "Expose a local URL through a Cloudflare Tunnel, or run a named tunnel. Ingress rules and proxy tuning are left out.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/cloudflared.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "url",
            "label": "Local URL",
            "type": "url",
            "option": [
              "--url"
            ],
            "suggestions": [
              {
                "value": "http://localhost:8080",
                "label": "http://localhost:8080"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "hello_world",
            "label": "Hello World server",
            "type": "boolean",
            "option": [
              "--hello-world"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "name",
            "label": "Tunnel name",
            "description": "Creates, routes and runs a tunnel with this stable name.",
            "type": "string",
            "option": [
              "--name",
              "-n"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "hostname",
            "label": "Hostname",
            "type": "string",
            "option": [
              "--hostname"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "config",
            "label": "Config file",
            "type": "path",
            "option": [
              "--config"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "loglevel",
            "label": "Log level",
            "type": "enum",
            "option": [
              "--loglevel"
            ],
            "choices": [
              {
                "value": "debug",
                "label": "debug"
              },
              {
                "value": "info",
                "label": "info"
              },
              {
                "value": "warn",
                "label": "warn"
              },
              {
                "value": "error",
                "label": "error"
              },
              {
                "value": "fatal",
                "label": "fatal"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_tls_verify",
            "label": "Skip origin TLS verification",
            "type": "boolean",
            "option": [
              "--no-tls-verify"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "quick",
            "label": "Expose a local URL",
            "fields": [
              "url",
              "loglevel",
              "no_tls_verify"
            ],
            "required": [
              "url"
            ]
          },
          {
            "id": "hello",
            "label": "Try Hello World",
            "set": {
              "hello_world": [
                true
              ]
            },
            "fields": [
              "hello_world"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "url",
              "hello_world",
              "name",
              "hostname"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "config",
              "loglevel",
              "no_tls_verify"
            ]
          }
        ]
      },
      {
        "path": [
          "tunnel",
          "run"
        ],
        "label": "Run a tunnel",
        "description": "Run an existing tunnel by name or UUID.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/cloudflared.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "tunnel",
            "label": "Tunnel name or UUID",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "url",
            "label": "Local URL",
            "type": "url",
            "option": [
              "--url"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "config",
            "label": "Config file",
            "type": "path",
            "option": [
              "--config"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "credentials_file",
            "label": "Credentials file",
            "type": "path",
            "option": [
              "--credentials-file",
              "--cred-file"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "loglevel",
            "label": "Log level",
            "type": "enum",
            "option": [
              "--loglevel"
            ],
            "choices": [
              {
                "value": "debug",
                "label": "debug"
              },
              {
                "value": "info",
                "label": "info"
              },
              {
                "value": "warn",
                "label": "warn"
              },
              {
                "value": "error",
                "label": "error"
              },
              {
                "value": "fatal",
                "label": "fatal"
              }
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "run",
            "label": "Run a tunnel",
            "fields": [
              "tunnel",
              "url",
              "config",
              "loglevel"
            ],
            "required": [
              "tunnel"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "tunnel",
              "url",
              "config"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "credentials_file",
              "loglevel"
            ]
          }
        ]
      },
      {
        "path": [
          "tunnel",
          "create"
        ],
        "label": "Create a tunnel",
        "description": "Create a tunnel and its credentials file.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/cloudflared.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "name",
            "label": "Tunnel name",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "credentials_file",
            "label": "Credentials file",
            "type": "path",
            "option": [
              "--credentials-file",
              "--cred-file"
            ],
            "path": {
              "kind": "file",
              "role": "output",
              "must_exist": false
            },
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "output",
            "label": "Output format",
            "type": "enum",
            "option": [
              "--output",
              "-o"
            ],
            "choices": [
              {
                "value": "json",
                "label": "JSON"
              },
              {
                "value": "yaml",
                "label": "YAML"
              }
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "create",
            "label": "Create a tunnel",
            "fields": [
              "name",
              "credentials_file",
              "output"
            ],
            "required": [
              "name"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "name",
              "credentials_file",
              "output"
            ]
          }
        ]
      }
    ]
  }
}
