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
- 0
- Installs
- —
- Rating
- —
- Success rate
- 1
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 2b9c7b02f216214e… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
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
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.
Files
1- SKILL.md
0043a1ae536.5 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from cloudflare/skills8
Build, debug, or review Cloudflare Agents SDK applications using the agents package.
Build and troubleshoot Cloudflare Basin analytics workflows with Basin Pipelines, Basin Catalog, and Basin SQL. Use for streaming data into R2 Iceberg tables, managing catalogs, or querying those tables; also use for requests using the former Data Platform, Pipelines, R2 Data Catalog, or R2 SQL name
Discover and choose Cloudflare products for apps, APIs, AI agents, storage, networking, and security. Use for architecture and product selection, including when the user describes a need without naming a Cloudflare product; then find the relevant skill or documentation.
Implement or troubleshoot Cloudflare Email Sending and Email Routing integrations and their delivery configuration.
Design, configure, troubleshoot, or review Cloudflare One Zero Trust and SASE deployments. Use cloudflare-one-migrations for migration planning from other vendors.
Assess and plan migrations from existing VPN, SWG, or SASE platforms to Cloudflare One, including policy mapping, parity gaps, and rollout.
Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.
Build and troubleshoot Cloudflare K2 or K2 Streams durable logs. Use for stream setup, producing from Workers or HTTP, configuring retention and inputs, and consuming through subscriptions.
Related tooling skillsscan passed
Creates a new Angular app using the Angular CLI. This skill should be used whenever a user wants to create a new Angular application and contains important guidelines for how to effectively create a modern Angular application.
Onboarding entrypoint for agents-cli in Agent Platform. It should be used when the user wants to "create a new agent", "develop an agent", "build an agent using ADK", "run the agent locally", "debug agent code", "test an agent", "evaluate an agent", "deploy an agent", "publish an agent", "monitor an
Install or update the M365 Agents Toolkit (ATK) CLI and VS Code extension. Triggers: "install atk", "update atk", "install agents toolkit", "update agents toolkit", "install the toolkit", "setup atk", "get atk", "install atk cli", "install atk extension", "install atk vsix", "update the vs code exte
Generate Newman CLI run commands with the correct flags, options, and configurations. Use this skill whenever the user wants to run a Postman collection via Newman, needs help with Newman command syntax, wants to configure reporters (HTML, JUnit, CLI, JSON), set environments or globals, run specific
Diagnoses and fixes slow Qdrant indexing and data ingestion. Use when someone reports 'uploads are slow', 'indexing takes forever', 'optimizer is stuck', 'HNSW build time too long', or 'data uploaded but search is bad'. Also use when optimizer status shows errors, segments won't merge, or indexing t
Prepares journal manuscripts, conference papers, research posters, and grant documents using venue-specific formatting guidance and bundled LaTeX scaffolds. Supports selecting an official template, checking current page or anonymity rules, adapting academic writing to a venue, or inspecting a submis