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 ChangelogWhat 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
cfresource 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 initcreates a project that usescloudflare.config.ts, a typed configuration file, andcf dev,cf build, andcf deploydevelop, build, and deploy it - Move from Wrangler:
cf migrateconverts a Wrangler configuration file tocloudflare.config.ts - Work with coding agents:
cf cli searchfinds 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
cfis 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, andcf deploywith the typedcloudflare.config.tscf migrateconverts Wrangler config, and resource commands work without migratingcf cli searchfinds 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!