{
  "id": "cloudflare-cli4",
  "name": "Cloudflare CLI4",
  "homepage": "https://github.com/cloudflare/python-cloudflare-cli4",
  "description": "CLI for Cloudflare API v4.",
  "executables": [
    "cli4"
  ],
  "dotfiles": {
    "paths": [],
    "secret": [
      "~/.cloudflare/cloudflare.cfg"
    ]
  },
  "commands": {
    "format": 1,
    "label": "Call the Cloudflare API",
    "description": "Send a request to the Cloudflare API v4 with cli4. Defaults to GET; pick one method flag for anything else. Binary, dump, openapi and image modes are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "manual",
        "url": "https://github.com/cloudflare/python-cloudflare-cli4#readme",
        "revision": "2026-10-27",
        "evidence": "usage: cli4 [-V|--version] [-h|--help] [-v|--verbose] [-e|--examples] [-q|--quiet] [-j|--json] [-y|--yaml] [-n|--ndjson] [-i|--image] [-r|--raw] [-d|--dump] [-A|--openapi url] [-b|--binary] [-p|--profile profile-name] [-h|--header additional-header] [--get|--patch|--post|--put|--delete] [item=value|item=@filename|@filename ...] /command ...\n$ cli4 --profile Work /zones | jq '.[]|.name' | wc -l\n$ cli4 -v --header 'X-something:' --header 'X-whatever:whatever' /zones > /tmp/results.json\n$ cli4 --post name='foo' type=A content=\"NOT-A-VALID-IP-ADDRESS\" /zones/:example.com/dns_records\nThis is controled by the --yaml or --json flags (JSON is the default). There is also a --ndjson flag for use with line based JSON data.\n"
      }
    ],
    "field": [
      {
        "id": "endpoint",
        "label": "API endpoint",
        "description": "For example /zones or /zones/:example.com/dns_records.",
        "type": "string",
        "position": 0,
        "min": 1,
        "sources": [
          "help"
        ]
      },
      {
        "id": "items",
        "label": "Items (name=value)",
        "description": "Request fields as item=value, item=@filename or @filename.",
        "type": "string",
        "position": 1,
        "multiple": true,
        "sources": [
          "help"
        ]
      },
      {
        "id": "get",
        "label": "GET request",
        "type": "boolean",
        "option": [
          "--get"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "patch",
        "label": "PATCH request",
        "type": "boolean",
        "option": [
          "--patch"
        ],
        "effect": "overwrite",
        "sources": [
          "help"
        ]
      },
      {
        "id": "post",
        "label": "POST request",
        "type": "boolean",
        "option": [
          "--post"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "put",
        "label": "PUT request",
        "type": "boolean",
        "option": [
          "--put"
        ],
        "effect": "overwrite",
        "sources": [
          "help"
        ]
      },
      {
        "id": "delete",
        "label": "DELETE request",
        "type": "boolean",
        "option": [
          "--delete"
        ],
        "effect": "delete",
        "sources": [
          "help"
        ]
      },
      {
        "id": "profile",
        "label": "Profile",
        "type": "string",
        "option": [
          "--profile",
          "-p"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "yaml",
        "label": "YAML output",
        "type": "boolean",
        "option": [
          "--yaml",
          "-y"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "ndjson",
        "label": "NDJSON output",
        "type": "boolean",
        "option": [
          "--ndjson",
          "-n"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "raw",
        "label": "Raw output",
        "type": "boolean",
        "option": [
          "--raw",
          "-r"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "header",
        "label": "Extra header",
        "description": "Additional header, e.g. X-whatever:whatever.",
        "type": "string",
        "option": [
          "--header"
        ],
        "multiple": true,
        "sources": [
          "help"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose",
        "type": "boolean",
        "option": [
          "--verbose",
          "-v"
        ],
        "sources": [
          "help"
        ]
      }
    ],
    "constraint": [
      {
        "kind": "at_most_one",
        "fields": [
          "get",
          "patch",
          "post",
          "put",
          "delete"
        ],
        "message": "Choose a single HTTP method."
      }
    ],
    "task": [
      {
        "id": "get",
        "label": "GET a resource",
        "fields": [
          "endpoint",
          "profile",
          "yaml"
        ],
        "required": [
          "endpoint"
        ]
      },
      {
        "id": "post",
        "label": "POST (create)",
        "set": {
          "post": [
            true
          ]
        },
        "lock": [
          "post"
        ],
        "fields": [
          "endpoint",
          "items",
          "post",
          "profile"
        ],
        "required": [
          "endpoint"
        ]
      },
      {
        "id": "delete",
        "label": "DELETE a resource",
        "set": {
          "delete": [
            true
          ]
        },
        "lock": [
          "delete"
        ],
        "fields": [
          "endpoint",
          "delete",
          "profile"
        ],
        "required": [
          "endpoint"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "endpoint",
          "items",
          "get",
          "patch",
          "post",
          "put",
          "delete",
          "profile"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "yaml",
          "ndjson",
          "raw",
          "header",
          "verbose"
        ]
      }
    ]
  }
}
