A unified command-line interface for Cloudflare.
This is a technical preview. To learn more, see the announcement blogpost.
npm install -g cfRequires Node.js 22 or newer.
cf auth login # Authenticate with Cloudflare
cf --help # Browse all commands
cf <command> --help # Per-command help
cf complete bash >> ~/.bashrc # Install shell completionscf resolves credentials in this order:
-
CLOUDFLARE_API_TOKENenvironment variable - cf OAuth token (via
cf auth login; refreshed automatically)
All output is JSON, written to stdout. Status messages (spinners, success
markers) go to stderr. Pipe through jq for newline-delimited or
filtered output.
MIT