cf-cli
Cloudflare's official cf CLI (beta) for the public Cloudflare API and Workers projects. Use for finding and running Cloudflare commands from the terminal — sign-in and profiles, cf cli search, cf schema, cf deploy/dev/build, resource commands for DNS, zones, D1, KV, and R2 — and for choosing between…
Install / Use
npx skills add cloudflare/skills --skill cf-cliInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OperationsSupported Platforms
Our assessment of cf-cli
cf-cli scores 91/100 on our quality scale, 281st of 759 Operations skills we index (top 38%).
Its SKILL.md is 6.5 KB long, well organised into 8 sections with 3 code examples: a thorough specification that gives an agent plenty to work with.
With 2,898 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 31 days ago, so cf-cli is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
cf-cli compared with similar skills
All 4 of these similar skills score higher than cf-cli; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| cf-cli (this skill)by cloudflare | 91 | 2.9k | 31d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 101.2k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 77.6k | 1d ago | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 89.3k | 1d ago | MCP Server |
| crawl4aiby unclecode | 100 | 86.1k | 1d ago | MCP Server |
Frequently asked questions
- How do I install cf-cli?
- Run
npx skills add cloudflare/skills --skill cf-cli. The install tabs above show the steps for each supported agent. - Which AI agents does cf-cli work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is cf-cli safe to use?
- It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is cf-cli still maintained?
- The repository was last updated 31 days ago, so cf-cli is actively maintained.
Skill content
View source on GitHubname: cf-cli description: Cloudflare's official cf CLI (beta) for the public Cloudflare API and Workers projects. Use for finding and running Cloudflare commands from the terminal — sign-in and profiles, cf cli search, cf schema, cf deploy/dev/build, resource commands for DNS, zones, D1, KV, and R2 — and for choosing between cf and Wrangler in a project.
Cloudflare CLI (cf)
cf is Cloudflare's command-line interface for the public Cloudflare API (2,900+ commands, most generated from API schemas) and for Workers projects. It is in beta: commands, configuration, and Build Output can change before the stable release.
Prefer retrieval over pre-trained knowledge. Describe the task to cf cli search, inspect the match with cf schema or --help, and preview with --dry-run before running a command you have not verified.
Docs index: https://developers.cloudflare.com/cf/llms.txt
Documentation
| Topic | Page |
|-------|------|
| Install, sign in, credential and account selection | https://developers.cloudflare.com/cf/get-started/index.md |
| First Worker with cf init, cf dev, cf deploy | https://developers.cloudflare.com/cf/get-started/first-worker/index.md |
| Find, create, and delete resources from the terminal | https://developers.cloudflare.com/cf/get-started/resources/index.md |
| cf for Wrangler users | https://developers.cloudflare.com/cf/wrangler/index.md |
| Migrate a Wrangler project with cf migrate | https://developers.cloudflare.com/cf/wrangler/migrate/index.md |
| Wrangler-to-cf command and config reference | https://developers.cloudflare.com/cf/wrangler/reference/index.md |
| Develop, build, and deploy; modes and previews | https://developers.cloudflare.com/cf/projects/index.md |
| Typed cloudflare.config.ts | https://developers.cloudflare.com/cf/projects/cloudflare-config/index.md |
| Using cf with coding agents (safety rules) | https://developers.cloudflare.com/cf/agents/index.md |
| CI, API tokens, unattended authentication | https://developers.cloudflare.com/cf/ci/index.md |
| Environment variables | https://developers.cloudflare.com/cf/environment-variables/index.md |
FIRST: check installation and sign in
npm install --global cf # installs two equivalent commands: `cf` and `cloudflare`
cf --version
cf auth whoami
- Requires Node.js 22.18 or later. Bun is not supported.
- If another tool named
cfis on yourPATH, usecloudflareinstead — the package installs both commands. cf auth loginprints a link and a one-time code, then opens the browser. On a remote machine, over SSH, or in a container, add--no-browsersocfonly prints the link; approve it from another device. Add--forceto sign in again.cfkeeps its own credentials and does not reuse a Wrangler login.- Unattended agents and CI cannot complete
cf auth login— setCLOUDFLARE_API_TOKENinstead (see https://developers.cloudflare.com/cf/ci/index.md).
To make agents prefer cf, add this to the user-level AGENTS.md, CLAUDE.md, or equivalent:
When interacting with Cloudflare, use the `cf` CLI unless the project has a
Wrangler configuration file.
Find commands
cf cli search "create a DNS record" # local, no credentials; quote the whole task; up to 5 JSON matches
cf schema d1 create # API request shape: method, path, params, body fields
cf <command> --help # arguments and options (e.g. cf deploy --help)
cf cli search takes the task as one argument — unquoted words after the first are parsed as unknown commands. cf schema covers generated API commands; for command arguments and options use --help.
Read output
- Results are JSON on standard output; status messages and errors go to standard error, so piping to
jqor redirecting needs no extra flags. - Lists print one JSON array page; paging options differ per command — check
--help. - A failed command exits non-zero and prints the error to standard error.
Run commands safely
- Preview first.
--dry-runprints the request as JSON without sending it, and needs no credentials. - Aborted deletes still exit 0. In a non-interactive session, a destructive command without
--forceprintsAborted.to standard error and exits0— a zero exit does not mean the resource was deleted. - Review
--forcebefore allowing it. On some commands--forceis also an API parameter (for example,cf workers delete --forcealso deletes a Worker that other Workers reference). --localis limited. It works for KV keys, D1 databases (cf d1 raw,cf d1 migrations list|apply), and R2 objects; other commands (includingcf d1 query) return an error instead of calling the API.
Choose the CLI for this project
cloudflare.config.tsexists: usecf.wrangler.jsonc,wrangler.json, orwrangler.tomlexists, and nocloudflare.config.ts: keep Wrangler fordev,build, anddeploy. Do not runcf dev,cf build, orcf deploythere — they can generate a new configuration that ignores the Wrangler file, or fail.cfresource commands (DNS, zones, storage) are fine alongside it. Runcf migrateonly when the user asks, and follow Migrate a Wrangler project: preview withcf migrate --dry-run, runcf migrate, then resolve theTODO(@cloudflare)comments in the generatedcloudflare.config.ts.- Neither exists: use
cf, as Use cf with coding agents recommends. Do not install Wrangler or create a Wrangler configuration file.
For Wrangler equivalents, use the Wrangler to cf reference or cf cli search. Do not translate Wrangler commands from memory. For the full comparison, refer to cf for Wrangler users.
Commands cf does not support yet
cf does not support every Wrangler command yet. Run these with npx wrangler instead of adding Wrangler to the project. Wrangler does not read cloudflare.config.ts, so pass the Worker name:
- Live logs:
npx wrangler tail <WORKER_NAME>. - A single secret:
npx wrangler secret put <SECRET_NAME> --name <WORKER_NAME>. Or upload secrets with a new Worker version by passing--secrets-file <PATH>tocf deployorcf workers versions create.
For the current list, refer to "Commands not yet supported" in the Wrangler to cf reference.
Related Skills
Agent-Reach
101.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
77.6kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Scrapling
89.3k🕷️ A Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
crawl4ai
86.1kOpen-source web crawler and scraper for LLMs and AI agents: any website into clean, LLM-ready Markdown. Run it yourself, or use Crawl4AI Cloud with one key. Join our Discord https://discord.gg/VuxzM8mtf
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
