Easton Digital · Setup

Set up Cloudflare
on your computer

This lets you publish pages from Claude Code. About 5 minutes, once per computer.

Step 1 · Sign in

Go to dash.cloudflare.com and sign in with the shared login. You should land on Team@eastondigital.com's Account.

Step 2 · Create your own token

Everyone gets their own token, so create one for yourself even though the login is shared.
  1. In the left sidebar, click Manage Account, then API Tokens.
  2. Click Create Token.
  3. Scroll to the bottom and choose Create Custom Token, then Get started.
  4. Fill it in exactly as shown below.
  5. Click Continue to summary, then Create Token.
FieldWhat to enter
Token namepages-deploy-yourname · use your actual first name
PermissionsSet the three dropdowns to Account · Cloudflare Pages · Edit
Account ResourcesInclude · Team@eastondigital.com's Account
Do not pick "All accounts".
Client IP FilteringLeave blank
TTLLeave the default, or set an end date a year out
Copy it now Cloudflare shows the token once. Copy it before you leave the page. If you lose it, delete that token and make a new one. Never paste it into Slack, email, or a doc.

Step 3 · Save it on your computer

Open Terminal. Paste the block below, but replace 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
Leave the account ID exactly as it is. That part is not secret and is the same for everyone.

Step 4 · Check that it works

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]*'
You should see "success":true. If you see false or nothing at all, the token was pasted wrong. Redo Step 2.

Step 5 · Install wrangler

npm install -g wrangler
wrangler --version
Do not run wrangler login Your token is already the login. Running wrangler login will override it and break the setup.

That's it

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>