Cloudflare Pages

Cloudflare Pages is supported for environment sync and logs/inspect flows. Deployment is not yet managed directly by the CLI.

No capability data.

Prerequisites

  • Cloudflare account and a target project
  • CLOUDFLARE_API_TOKEN set in your environment (CI recommended)

Quick start

bash
# Open latest deployment in Inspect (dashboard)
opd logs cloudflare --open

# Sync env from local file (preview/prod)
opd env sync cloudflare --file .env --env preview --yes

Notes

  • Use --env production for production VM/env selection in logs/env sync; otherwise previews.
  • For deployments, use Cloudflare’s native workflows (project settings/CI) until CLI deploy support lands.

Astro (static) note

  • Build locally with astro build → deploy via Cloudflare Pages project (Git/CI or wrangler/pages). Use opd env sync cloudflare to manage environment variables. If your site builds to a custom directory, configure it in your Cloudflare Pages project.

Troubleshooting

  • 404 on assets: confirm the publish directory in Cloudflare Pages matches the built output.
  • Inspect shows an older deploy: pass --env production to open the production inspect URL.