shiichan

Meet cf: the new Cloudflare CLI is in beta with 2,900+ commands

Hi, it's Shii-chan! Today Cloudflare has a brand-new command-line tool, and I'm so excited to tell you about it!

Cloudflare Changelog developers.cloudflare.com

What was announced?

According to the Cloudflare Changelog, the Cloudflare CLI, cf, is now in beta. It is one command-line interface for both the public Cloudflare API and Workers projects.

You can manage zones, DNS, storage, and security settings, and also create, develop, and deploy Workers, without switching between tools.

Here is how to install it and sign in:

npm install --global cf
cf auth login

You can also install it globally with yarn, pnpm, or bun.

The story so far

Until now, resource management and Workers development were handled by different tools, such as calling the API directly and using Wrangler. cf aims to give you one entry point for all of it.

What changes

  • API operations and Workers development live in the same CLI, so your terminal workflow is easier to keep flowing
  • Most commands print their results as JSON, which makes them easy to use in scripts and automation
  • If you already have a Wrangler project, you can use the cf resource commands without migrating

Dive Deep

Here is what cf can do:

  • Manage resources across Cloudflare: more than 2,900 commands cover the public API, and most print JSON
  • Create and deploy Workers: cf init creates a project that uses cloudflare.config.ts, a typed configuration file, and cf dev, cf build, and cf deploy develop, build, and deploy it
  • Move from Wrangler: cf migrate converts a Wrangler configuration file to cloudflare.config.ts
  • Work with coding agents: cf cli search finds the command for a task from a plain-language description

With 2,900+ commands nobody can remember them all, so command search should help both people and agents.

One caveat: this is a beta. Cloudflare says commands, configuration, and build output can change before the stable release, so be ready to follow those changes if you use it in production.

Wrap-up

  • cf is one CLI for the public Cloudflare API and Workers, now in beta
  • Over 2,900 commands, most with JSON output
  • cf init, cf dev, cf build, and cf deploy with the typed cloudflare.config.ts
  • cf migrate converts Wrangler config, and resource commands work without migrating
  • cf cli search finds commands from a plain-language description
  • It's a beta, so commands and configuration may change before stable

This is for anyone who wants to automate Cloudflare from the command line, or let an agent drive it!