{
  "id": "curl",
  "name": "curl",
  "homepage": "https://curl.se",
  "description": "A command line tool and library for transferring data with URL syntax.",
  "icon": "SimpleIcons:curl",
  "executables": [
    "curl"
  ],
  "dotfiles": {
    "paths": [
      "~/.curlrc",
      "~/_curlrc",
      "~/.config/curlrc",
      "%APPDATA%/.curlrc",
      "%APPDATA%/_curlrc"
    ],
    "exclude": [],
    "secret": [
      "~/.netrc"
    ],
    "side_effect": false,
    "machine_lines": [
      {
        "file": [
          "~/.curlrc",
          "~/_curlrc",
          "~/.config/curlrc",
          "%APPDATA%/.curlrc",
          "%APPDATA%/_curlrc"
        ],
        "match": {
          "prefix": [
            "cacert",
            "capath"
          ]
        },
        "scope": "platform"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Transfer a URL",
    "description": "Make an HTTP request or download a URL. Other protocols, TLS tuning, proxies and multi-URL sessions are left out.",
    "quality": "ai-draft",
    "base": "fig:curl",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/curl.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "url",
        "label": "URL",
        "type": "url",
        "position": 0,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "method",
        "label": "Method",
        "type": "string",
        "option": [
          "--request",
          "-X"
        ],
        "suggestions": [
          {
            "value": "GET",
            "label": "GET"
          },
          {
            "value": "POST",
            "label": "POST"
          },
          {
            "value": "PUT",
            "label": "PUT"
          },
          {
            "value": "PATCH",
            "label": "PATCH"
          },
          {
            "value": "DELETE",
            "label": "DELETE"
          },
          {
            "value": "HEAD",
            "label": "HEAD"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "header",
        "label": "Headers",
        "description": "One header per entry, for example Content-Type: application/json.",
        "type": "string",
        "option": [
          "--header",
          "-H"
        ],
        "multiple": true,
        "suggestions": [
          {
            "value": "Content-Type: application/json",
            "label": "JSON body"
          },
          {
            "value": "Accept: application/json",
            "label": "Accept JSON"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "data",
        "label": "Request body",
        "description": "Send as POST data. Prefix with @ to read from a file.",
        "type": "string",
        "option": [
          "--data",
          "-d"
        ],
        "multiple": true,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "user",
        "label": "User",
        "description": "user:password for server authentication.",
        "type": "string",
        "option": [
          "--user",
          "-u"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "output",
        "label": "Output file",
        "type": "path",
        "option": [
          "--output",
          "-o"
        ],
        "path": {
          "kind": "file",
          "role": "output",
          "must_exist": false
        },
        "effect": "overwrite",
        "sources": [
          "fig"
        ]
      },
      {
        "id": "remote_name",
        "label": "Save with remote name",
        "type": "boolean",
        "option": [
          "--remote-name",
          "-O"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "location",
        "label": "Follow redirects",
        "type": "boolean",
        "option": [
          "--location",
          "-L"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "silent",
        "label": "Silent",
        "type": "boolean",
        "option": [
          "--silent",
          "-s"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "show_error",
        "label": "Show errors when silent",
        "type": "boolean",
        "option": [
          "--show-error",
          "-S"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "fail",
        "label": "Fail on HTTP errors",
        "type": "boolean",
        "option": [
          "--fail",
          "-f"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "include",
        "label": "Include response headers",
        "type": "boolean",
        "option": [
          "--include",
          "-i"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "head",
        "label": "Headers only",
        "type": "boolean",
        "option": [
          "--head",
          "-I"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose",
        "type": "boolean",
        "option": [
          "--verbose",
          "-v"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "insecure",
        "label": "Skip TLS verification",
        "type": "boolean",
        "option": [
          "--insecure",
          "-k"
        ],
        "effect": "exec",
        "sources": [
          "fig"
        ]
      },
      {
        "id": "max_time",
        "label": "Max time (seconds)",
        "type": "integer",
        "option": [
          "--max-time",
          "-m"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "download",
        "label": "Download a file",
        "set": {
          "location": [
            true
          ],
          "remote_name": [
            true
          ]
        },
        "fields": [
          "url",
          "location",
          "remote_name",
          "output",
          "fail"
        ],
        "required": [
          "url"
        ]
      },
      {
        "id": "post-json",
        "label": "POST JSON",
        "set": {
          "method": [
            "POST"
          ],
          "header": [
            "Content-Type: application/json"
          ]
        },
        "fields": [
          "url",
          "method",
          "header",
          "data",
          "silent",
          "show_error"
        ],
        "required": [
          "url",
          "data"
        ]
      },
      {
        "id": "inspect-headers",
        "label": "Inspect response headers",
        "set": {
          "head": [
            true
          ],
          "location": [
            true
          ]
        },
        "fields": [
          "url",
          "head",
          "location"
        ],
        "required": [
          "url"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "url",
          "method",
          "header",
          "data",
          "output",
          "remote_name",
          "location"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "user",
          "silent",
          "show_error",
          "fail",
          "include",
          "head",
          "verbose",
          "insecure",
          "max_time"
        ]
      }
    ]
  }
}
