This lets you publish pages from Claude Code. About 5 minutes, once per computer.
| Field | What to enter |
|---|---|
| Token name | pages-deploy-yourname · use your actual first name |
| Permissions | Set the three dropdowns to Account · Cloudflare Pages · Edit |
| Account Resources | Include · Team@eastondigital.com's AccountDo not pick "All accounts". |
| Client IP Filtering | Leave blank |
| TTL | Leave the default, or set an end date a year out |
PASTE_YOUR_TOKEN_HERE with the token you just copied.
mkdir -p ~/Projects cat > ~/Projects/.cloudflare.env <<'EOF' export CLOUDFLARE_API_TOKEN=PASTE_YOUR_TOKEN_HERE export CLOUDFLARE_ACCOUNT_ID=f142b36f86d73d9aad394422087e8511 EOF chmod 600 ~/Projects/.cloudflare.env
source ~/Projects/.cloudflare.env curl -s -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ "https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/pages/projects?per_page=5" \ | grep -o '"success":[a-z]*'
"success":true. If you see false or nothing at all, the token was pasted wrong. Redo Step 2.
npm install -g wrangler wrangler --version
wrangler login will override it and break the setup.
You can now publish pages. In Claude Code, just ask it to deploy and it will pick up your token automatically. To do it manually:
source ~/Projects/.cloudflare.env wrangler pages deploy <folder> --project-name <name>