Skip to main content
The cf command provides a comprehensive toolkit for deploying, managing, and querying your Cloudflare infrastructure using natural language and direct commands.

Overview

Clanker’s Cloudflare integration allows you to:
  • Deploy Workers, Pages, and other Cloudflare resources
  • Create and manage KV namespaces, D1 databases, and R2 buckets
  • Configure DNS records and Cloudflare Tunnels
  • Ask natural language questions about your Cloudflare account
  • List and delete existing resources

Available commands

cf ask

Ask natural language questions about your Cloudflare account

cf deploy

Deploy Workers, Pages, and other resources to Cloudflare

cf create

Create new Cloudflare resources like KV, D1, R2, and DNS records

cf delete

Delete Cloudflare resources

cf list

List zones, workers, and other Cloudflare resources

Authentication

All Cloudflare commands require authentication. You can provide credentials in three ways:
Pass credentials directly to each command:
clanker cf ask "list my zones" --account-id your-account-id --api-token your-api-token
Set environment variables for automatic authentication:
export CLOUDFLARE_ACCOUNT_ID=your-account-id
export CLOUDFLARE_API_TOKEN=your-api-token
Add credentials to your ~/.clanker.yaml config file:
cloudflare:
  account_id: your-account-id
  api_token: your-api-token

Common flags

These flags are available across all Cloudflare commands:
--account-id
string
Your Cloudflare account ID. Can also be set via CLOUDFLARE_ACCOUNT_ID environment variable or in config file.
--api-token
string
required
Your Cloudflare API token. Can also be set via CLOUDFLARE_API_TOKEN environment variable or in config file.
--debug
boolean
default:"false"
Enable debug output to see detailed API interactions and troubleshooting information.

Getting started

1

Create a Cloudflare API token

Generate an API token from your Cloudflare dashboard with the necessary permissions for your use case.
2

Configure authentication

Set your credentials using one of the authentication methods above.
3

Try a simple query

Test your setup with a natural language question:
clanker cf ask "list all my zones"
4

Deploy your first resource

Create a simple Worker or DNS record:
clanker cf create dns --zone example.com --type A --name www --content 1.2.3.4

Example workflows

# Deploy a Worker with KV and R2 bindings
clanker cf deploy worker \
  --name my-api \
  --script ./api.js \
  --route "api.example.com/*" \
  --kv CACHE=namespace-id \
  --r2 ASSETS=bucket-name

Next steps

Natural language queries

Learn how to query your Cloudflare account using natural language

Deploy resources

Explore all deployment options for Workers, Pages, and more

Cloudflare provider guide

Deep dive into Cloudflare integration concepts

Configuration

Configure Clanker for optimal Cloudflare workflows

Build docs developers (and LLMs) love