Omarchy Apps Sponsor

Cloudflare CLI guide

Cloudflare CLI on Omarchy

Cloudflare's official command line for the whole Cloudflare API and for Workers projects — manage DNS, zones, and security, and deploy Workers from one command.

Reviewed 2026-11-25 · independent editorial guide

Short answer

Install Cloudflare CLI with omarchy pkg add cloudflare-cli, sign in with cf auth login, and prove it works with cf zones list. It is a release candidate (1.0.0rc.5), and it keeps its own login — it does not reuse a Wrangler login.

Cloudflare CLI on Omarchy

Cloudflare CLI (cf) on Omarchy is Cloudflare’s official command line for the whole Cloudflare API and for Workers projects: manage DNS, zones, and security settings and deploy Workers from one command, with JSON output built for scripts and coding agents.

TL;DR

omarchy pkg add cloudflare-cli

That installs Cloudflare CLI v1.0.0rc.5-1 (64.4 MB download, 224.8 MB installed, depends on nodejs, glibc, and gcc-libs; MIT OR Apache-2.0). Sign in once in your browser with cf auth login, then list your zones with cf zones list to prove the login works.

Getting started (5 minutes)

1. Install and check the version.

Run omarchy pkg add cloudflare-cli, then cf --version. If another tool on your PATH already answers to cf (the Cloud Foundry CLI does), call it as cloudflare instead, which runs the same CLI.

2. Sign in.

Run cf auth login. It prints a link and a one-time code, opens the link in your browser, and you approve access to your Cloudflare account. Confirm with cf auth whoami. Do not skip this step if you already use Wrangler: cf keeps its own credentials and does not reuse a Wrangler login, so you sign in once even if Wrangler is already signed in. Over SSH or in a container, add --no-browser and open the link on another device. To sign in again, add --force.

3. Run one read-only command.

List the zones you can access:

cf zones list

Pipe it to a file or jq to inspect the shape: cf zones list | jq .. If that works, the install, the login, and the account selection are all fine. Start with read-only commands before you let any script change something.

4. Three things worth doing in the first session:

  • Find commands by describing the task — with almost 3,000 commands, --help is a bad way to find things. Run cf cli search "create a DNS record" and it returns ranked matches. The search runs on your machine and needs no login.
  • Use profiles for more than one account — run cf auth create work to create a named profile and sign in to it, then cf auth activate work to link it to the current folder and every folder below it. For scripts and CI, set CLOUDFLARE_API_TOKEN instead, which takes priority over any stored login. You can also set CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_ZONE_ID to pin the account and zone.
  • Deploy Workers from the same tool — cf init my-worker creates a project with a typed cloudflare.config.ts, cf dev runs it locally, cf build builds it, and cf deploy ships it. If the project already has a wrangler.toml or wrangler.json, run cf migrate --dry-run first, then cf migrate.

Common issues & fixes

cf auth login fails with an unknown OAuth scope error, naming email_routing:read or email_sending:read

This was a real bug, not an outage. On September 7, 2026 Cloudflare patched @cloudflare/workers-auth (0.6.9) because cf asked for read scopes the OAuth server never registered for those products; only the write scopes exist.

Fix: Update cf to a build with the fix and log in again. Do not paste your API token into a chat or switch providers to work around it. (zemna.net)

You are signed into Wrangler, but cf says you are not logged in

Nothing is broken: cf keeps its own credentials and never reads Wrangler’s login.

Fix: Run cf auth login once, even on a machine where Wrangler works fine. (Cloudflare get-started docs)

You type cf and get a different tool, or a “command not found” for the Cloudflare one

The name cf is shared with the Cloud Foundry CLI.

Fix: The Cloudflare package installs the same CLI under two names, cf and cloudflare. Use cloudflare if something else already owns cf on your PATH. (Cloudflare get-started docs)

In CI, a command fails with “More than one account available but unable to select one in non-interactive mode”

In a non-interactive run cf cannot prompt you to pick an account, so it fails instead.

Fix: Set CLOUDFLARE_ACCOUNT_ID as a repository secret, or add accountId to the default export in cloudflare.config.ts. (Cloudflare CI docs)

A tutorial’s command does not exist, or output looks different from the docs

cf is still a release candidate (1.0.0rc.5). Cloudflare warns that commands, configuration, and build output can change before the stable release, so treat any guide older than a few weeks with care.

Fix: Check cf <command> --help on your installed version. Also note that cf sends anonymous usage telemetry by default; turn it off with cf cli telemetry disable or by setting DO_NOT_TRACK. (Cloudflare changelog, Flavio Copes guide)

Pairs well with / If you hate this, try

Pairs well with

  • Wrangler (still the safe choice for existing Workers projects until you migrate), git (commit cloudflare.config.ts, never commit tokens), jq (every command prints JSON by default), and a coding agent (the cf cli search command exists so an agent can find commands without prior knowledge).

If you hate this, try

  • Wrangler stays focused on Workers with hand-written commands, plain curl with an API token covers one-off calls, and the Terraform Cloudflare provider fits infrastructure-as-code setups.

Comparison: Cloudflare CLI vs Wrangler vs curl vs Terraform

Cloudflare CLIWranglercurl + API tokenTerraform Cloudflare provider
PriceFree CLI; Cloudflare usage billed per plan, free tier availableFree CLI; same Cloudflare billingFree; same Cloudflare billingFree provider; same Cloudflare billing
Best forManaging all of Cloudflare plus Workers from one command, with agent-friendly JSONWorkers-only work with a mature, hand-built command setOne-off API calls and tiny scriptsDeclaring DNS, zones, and Workers as code with state
Omarchy installomarchy pkg add cloudflare-clinpm install -g wranglerAlready installedterraform init in a project

Verdict: Pick cf if you want one tool for everything Cloudflare exposes, especially if you drive it from scripts or an agent. Pick Wrangler if your work is Workers only and you want the tool with the longest track record.

How to switch from Wrangler (~15 minutes per project)

  1. Export from Wrangler: your project already has its config in wrangler.toml or wrangler.json (or wrangler.jsonc). Nothing to export by hand; cf migrate reads it.
  2. Import into cf: in the project folder run cf migrate --dry-run to preview the change, then cf migrate. It creates the typed cloudflare.config.ts. Open that file and check the worker name, compatibility date, entrypoint, and bindings.
  3. What doesn’t transfer: your Wrangler login does not carry over, so run cf auth login separately. Build output paths and some Wrangler-specific config keys may differ, so run cf build and read the output before deploying.
  4. Time estimate: about 15 minutes per project, plus a test deploy.

Open the Cloudflare CLI package

See the live version, upstream screenshot, requirements, source and exact Omarchy install command.

View Cloudflare CLI →

Frequently asked questions

Is cf replacing Wrangler?

Cloudflare calls cf its new CLI and says it will replace Wrangler, but Wrangler still works today. cf migrate exists to move projects across, and the release candidate is the version Cloudflare now asks you to try on your own projects.

Do I need Node.js?

The Omarchy package depends on nodejs, so it comes along automatically. The npm install path needs Node.js 22 or newer.

Does cf reuse my Wrangler login?

No. cf keeps its own credentials. Sign in once with cf auth login even if Wrangler is already signed in.

Is it stable yet?

No. Version 1.0.0rc.5 is a release candidate, and Cloudflare warns commands, configuration, and build output can still change before the stable release.

Does it work offline?

No, except for cf cli search, which runs locally. Every other command talks to the Cloudflare API, so it needs network access and a login or API token.

Where does my project config live?

Projects created with cf init use cloudflare.config.ts in the project root, a typed TypeScript config. API commands also read CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID, and CLOUDFLARE_ZONE_ID from the environment or a local .env file.

Official sources

Commands and fixes verified against official sources November 2026; on-machine verification pending.