Cloudflare The `hanzo cloudflare` commands.
Also for this capability: API · CLI · SDKs
Your Cloudflare account, managed from Hanzo: zones, Pages, Workers, Workers AI, R2, KV and D1.
API reference →
hanzo cloudflare zones list
Every command takes --json for the raw response and --help for its own flags. Sign in once with hanzo auth login; the commands below use that session, and the org they act in is the one it carries.
Command What it does hanzo cloudflare d1 databases createCreates a D1 database on the org's Cloudflare account. hanzo cloudflare d1 databases listLists the D1 databases on the org's Cloudflare account. hanzo cloudflare d1 databases query <database>Runs one SQL statement against a D1 database. hanzo cloudflare d1 databases rm <database>Deletes a D1 database and everything stored in it.
Command What it does hanzo cloudflare kv namespaces createKVNamespaceCreate creates a Workers KV namespace on the org's Cloudflare account. hanzo cloudflare kv namespaces listKVNamespaceList lists the Workers KV namespaces on the org's Cloudflare account. hanzo cloudflare kv namespaces rm <namespace>KVNamespaceDelete deletes a Workers KV namespace and every key in it. hanzo cloudflare kv namespaces values get <namespace> <key>Read a Workers KV value as its stored bytes hanzo cloudflare kv namespaces values rm <namespace> <key>KVValueDelete removes one key from a Workers KV namespace. hanzo cloudflare kv namespaces values set <namespace> <key>Write a Workers KV value from the request body
Command What it does hanzo cloudflare pages projects createCreates a Cloudflare Pages project on the org's account. hanzo cloudflare pages projects deployments <project>Trigger a new Pages deployment for a project hanzo cloudflare pages projects domains create <project>Attaches a custom domain to a Cloudflare Pages project. hanzo cloudflare pages projects domains rm <project> <domain>Detaches a custom domain from a Cloudflare Pages project. hanzo cloudflare pages projects get <project>Reads one Cloudflare Pages project — its build config, deployment configs and latest deployment. hanzo cloudflare pages projects listLists the org's Cloudflare Pages projects. hanzo cloudflare pages projects rm <project>Deletes a Cloudflare Pages project, and with it every deployment it has ever made.
Command What it does hanzo cloudflare r2 buckets createCreates an R2 bucket on the org's Cloudflare account. hanzo cloudflare r2 buckets listLists the R2 buckets on the org's Cloudflare account. hanzo cloudflare r2 buckets rm <bucket>Deletes an R2 bucket.
Command What it does hanzo cloudflare workers scripts listLists the Worker scripts on the org's Cloudflare account. hanzo cloudflare workers scripts rm <script>Removes a Worker script from the org's Cloudflare account. hanzo cloudflare workers scripts set <script>Uploads or replaces a module Worker script. hanzo cloudflare workers scripts subdomain <script>Publishes or withdraws one Worker script on the account's workers.dev subdomain. hanzo cloudflare workers subdomainReads the org account's workers.dev subdomain — the name under which every subdomain-enabled script is served. hanzo cloudflare workers zones routes create <zone>Binds a URL pattern in a zone to a Worker script. hanzo cloudflare workers zones routes list <zone>Lists the Worker routes bound within one zone — the URL patterns that dispatch to a script. hanzo cloudflare workers zones routes rm <zone> <route>Unbinds a Worker route, so its pattern stops dispatching to a script.
Command What it does hanzo cloudflare zones analytics <zone>Reads a zone's Cloudflare traffic dashboard — requests, bandwidth, threats and pageviews over the since/until window. hanzo cloudflare zones get <zone>Reads one Cloudflare zone the org's token can see. hanzo cloudflare zones listLists the Cloudflare zones the org's connected API token can see, paged and filtered by the query parameters Cloudflare… hanzo cloudflare zones purge <zone>Drops a zone's Cloudflare edge cache — either the whole zone (purge_everything) or exactly the listed file URLs.
How is this guide?
Good Bad