Cloudflare login
Use layer login to save Cloudflare credentials for local direct deploys.
Automatic mode uses a Cloudflare boot token to create a managed deploy token.
The boot token and managed deploy token names share the same suffix in
Cloudflare.
Manual mode saves the token that you provide. The token needs every permission
listed in the Cloudflare template URL. Storage R2 signed URL credential
maintenance also needs an R2 token-management token passed with --r2-token or
CLOUDFLARE_R2_API_TOKEN.
Login Command
Section titled “Login Command”layer login [status] [options]Login Options
Section titled “Login Options”| Option | Value | Notes |
|---|---|---|
--account-id | <id> | Cloudflare account id. |
--token | <token> | Cloudflare account API token. |
--mode | <mode> | automatic or manual. |
--boot-token | <token> | One-time Cloudflare token with Account API Tokens Read/Edit. |
-h, --help | Show help. |
Automatic Token Management
Section titled “Automatic Token Management”Automatic mode prompts for a Cloudflare boot token with Account API Tokens Read/Edit. Layeron creates a managed deploy token with direct deploy permissions. Both token names include the same generated suffix so you can match them in Cloudflare.
Manual Token Management
Section titled “Manual Token Management”Manual mode uses the direct deploy template URL. The manual deploy token does
not include Account API Tokens permissions. Pass --r2-token or set
CLOUDFLARE_R2_API_TOKEN when Storage needs to create, rotate, read, or retire
Layeron-managed R2 tokens for signed URLs.
Status
Section titled “Status”Logout Command
Section titled “Logout Command”layer logout [options]Logout Options
Section titled “Logout Options”| Option | Value | Notes |
|---|---|---|
--oauth | Use the Cloudflare OAuth logout flow. | |
-h, --help | Show help. |