Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Cloudflare CLI (cf)

$ cf Official High Risk
Cloudflare · Cloud & Infra · Apache-2.0 · macos / linux / windows

Cloudflare's cf CLI complements Wrangler by targeting the broader Cloudflare public API—DNS records, zones, Zero Trust, R2, D1, and KV—with built-in command discovery (cf cli search), schema inspection (cf schema), and multi-profile auth.

FCRS-1.0 Score
84 /100
Good
Medium Confidence
Zero-Friction Install
npm install -g @cloudflare/cli
CLI vs MCP Decision Hybrid (CLI + MCP)

cf offers dynamic cf cli search and cf schema discovery so agents only inspect needed endpoints instead of loading hundreds of Cloudflare MCP schemas at once.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
✓ Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

Built with agent discovery in mind: cf cli search, cf schema, JSON output support, and companion Cloudflare cf-cli skill guidance reduce flag hallucination.

  • Runtime command discovery (cf cli search) and schema introspection (cf schema)
  • Paired with official Cloudflare cf-cli agent skill
Trust & Safety 19 / 25

Supports named profiles and scoped API tokens, though live DNS/zone/security mutations have immediate production blast radius.

  • Named profile isolation and scoped CLOUDFLARE_API_TOKEN
  • Direct control-plane mutations require user confirmation
Setup & Portability 13 / 15

Cross-platform distribution via npm/npx and standard Cloudflare auth flow.

  • Installable via @cloudflare/cli
Utility & Efficiency 13 / 15

Covers broad Cloudflare control-plane APIs cleanly while keeping context footprint tiny compared to full OpenAPI/MCP specs.

  • On-demand schema lookup avoids context bloat
Maintenance & Lineage 9 / 10

Official Cloudflare CLI currently in active beta evolution.

  • Official Cloudflare tool; marked beta with rapid iteration
Docs & Verifiability 8 / 10

Self-documenting CLI commands plus official Cloudflare skill documentation.

  • Built-in cf cli search and cf schema help output

Security, Auth & Guardrails

Auth Modes
OAuth Browser Env API Key Config File
Credential Storage

Named profiles stored in local CLI config or CLOUDFLARE_API_TOKEN environment variable.

Side Effects
Read-Only Remote Write Destructive Billing Impact
Cost & Quotas

CLI is free; API calls operate on your Cloudflare account resources and plan limits.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Cloudflare cf CLI Agent Rules
- Run `cf cli search` and `cf schema` before constructing unfamiliar API calls.
- Always pin `--profile` or verify `CLOUDFLARE_ACCOUNT_ID` before write calls.
- Require human confirmation for DNS deletions, firewall rule drops, or billing changes.

Agent-Ready Command Recipes

Safe Read-Only Queries

Discover commands without hallucinating flags
cf cli search "dns"

Lets the agent look up exact subcommands at runtime instead of guessing.

Inspect endpoint parameter schema
cf schema zones

Prints structured parameter and payload schemas before making API calls.

Controlled Writes & Previews

List zones under an explicit profile
cf zones list --profile staging

Pins operations to a non-production account profile.

Strengths for Agents

  • + cf cli search and cf schema directly solve agent flag hallucination.
  • + Cleaner separation of control-plane APIs from Wrangler's Workers build/dev loop.
  • + Supports multi-profile auth switching.

Caveats & Pitfalls

  • ! Still in beta; command surfaces may evolve between minor versions.
  • ! Global DNS/zone operations carry high blast radius if given broad API tokens.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI