- Void Platform CLI is the core tool for connecting, deploying, and operating applications on Cloudflare
- Start order matters: authenticate first, connect a project, then deploy with
void deploy - Credential types differ: user sessions, project credentials, and platform tokens serve different roles
- Secrets stay out of repos: store sensitive values in CI encrypted secret stores or platform configuration
- Troubleshoot with
void logs: inspect deployment output and runtime behavior before retrying
What the Void Platform CLI Does
The Void Platform CLI is the command-line interface at the heart of the Void Platform workflow. It connects a local application project to a platform installation running in your Cloudflare account, handles authentication for users and automation, builds and deploys applications, and manages platform resources such as databases, secrets, and domains. Rather than toggling between a dashboard and scattered scripts, the CLI gives you one repeatable path from project directory to live application.
The CLI covers four major areas of responsibility:
Project Lifecycle
- Initialize projects with
void init - Connect local code to platform projects
- Deploy with
void deploy - Manage rollback and cancellation
Platform Operations
- Authenticate users and CI jobs
- Inspect logs with
void logs - Manage secrets with
void secrets - Coordinate databases with
void db
Use the CLI for repeatable, scriptable workflows such as CI pipelines, local development iterations, and automated deployments. Use the web dashboard when you need visual oversight of deployment status, team management, and platform-wide configuration. Most teams use both together.
Core Command Reference
The table below organizes the most commonly used Void Platform CLI commands by category. Commands follow a logical sequence: initialize and authenticate before connecting, and connect before deploying.
| Category | Command | Purpose | Typical Use Case |
|---|---|---|---|
| Project Initialization | void init | Initialize a Void project configuration in the current directory | Starting a new project or preparing an existing repo |
| Authentication | void auth login | Create an interactive CLI login session | Local development and admin workflows |
| Platform Connection | void platform connect | Connect the local project to a platform project or environment | Targeting an existing platform project after auth |
| Setup | void setup | Run the guided setup workflow connecting project and platform | First-time project connection |
| Deployment | void deploy | Build and deploy the current project | Manual releases or CI pipelines |
| Logs | void logs | Inspect application or deployment logs | Investigating failed deployments or runtime errors |
| Database | void db | Access database-related operations | Coordinating migrations with deployments |
| Secrets | void secrets | Manage sensitive configuration values | Keeping credentials out of source control |
| Platform Installation | void platform installation | Configure or inspect installation settings and domains | Custom domains, DNS, HTTPS setup |
A second table clarifies how the deployment workflow stages map to status checkpoints:
| Deployment Stage | Command Involved | Result to Verify |
|---|---|---|
| Project association | void setup | Project connection confirmed |
| Platform selection | void deploy | Correct platform chosen |
| Project name | void deploy | Intended project selected |
| Build and deploy | void deploy | Deployment completes without errors |
| Recovery | deployment controls | Rollback or cancellation succeeds |
Always confirm the active account, platform, and project context before running void deploy. Deploying to the wrong project or environment is one of the most common CLI mistakes, and recovery requires rollback controls rather than a simple undo.
First Deployment: Step-by-Step
Your first deployment follows a fixed order. Complete each step before moving to the next, and keep the terminal session open while a deployment is running.
Create or Prepare a Project
Start with the application you want to deploy. Use a dedicated project directory and make sure the application configuration is ready before connecting to the platform. Run void setup from the project directory to begin.
Connect to Void Platform
Complete the authentication steps requested by the CLI, then select the intended platform account and project when prompted. This establishes the project context all later commands rely on.
Review Deployment Settings
Before deploying, verify the selected application, deployment platform, project name, and related resources. Confirm the target project matches your intent for this deployment.
Run the Deployment
Execute void deploy and monitor the CLI output and status until the process finishes. Use deployment status and logs to review the result and confirm the application is live.
Handle Interruptions If Needed
If a deployment fails or must be stopped, use the platform deployment controls to cancel the active workflow and roll back to a previous stable state before retrying.
The same void deploy command works in CI environments. Configure non-interactive credentials, project context, and platform connection in the pipeline first, then invoke the deployment command from the CI job.
Authentication and Credential Types
Void Platform authentication has several distinct layers, and mixing them up causes most access problems. The table below separates them clearly:
| Credential Type | Who or What It Identifies | Best For | Storage Guidance |
|---|---|---|---|
| User login session | An individual person | Local development, manual deployments | CLI interactive login, never shared |
| Platform connection | A project linked to a platform | Repository targeting an environment | Project configuration |
| Project credentials | A specific project workflow | App integrations, environment automation | Scoped secrets, rotate on ownership change |
| Administrator tokens | Platform-level operations | Installation and access management | Restricted storage, separate from app credentials |
| CI credentials | Non-interactive automation | Pipelines and scheduled deployments | CI encrypted secret store only |
External identity providers add flexibility without replacing these credential types:
GitHub and Google
- Familiar sign-in for team members
- Enabled by the platform administrator
- Determines user identity only
OIDC
- Organization-managed identity provider
- Centralizes identity and access
- Does not replace project credentials
Cloudflare Access
- Identity-aware access layer
- Protects admin surfaces and apps
- Separate from CLI login sessions
Do not share personal login credentials between team members or store them in a repository. Use project credentials or CI secrets scoped to the environment that needs them, with the narrowest permissions required.
Secrets and CI Security
Automated deployments require a clear separation between source code, environment variables, and credentials. Every value should be classified before storage—a variable is not safe merely because it is named an environment variable.
| Secret Category | Examples | Storage Location | Key Security Rule |
|---|---|---|---|
| Cloudflare configuration | Account IDs, API credentials | CI encrypted secrets or protected platform config | Dedicated credential with narrowest permissions |
| Database configuration | URL, host, username, password | Environment-specific CI secrets | Never print connection strings in build logs |
| JWT configuration | Signing secret, issuer, audience | Protected environment variables | Rotate through a planned process |
| R2 configuration | Bucket name, access keys, endpoint | Encrypted CI secrets | Never embed in client-side code |
| Project encryption key | Key material for protected values | Restricted platform or CI storage | Never commit or expose in logs |
| Environment variables | Service URLs, feature flags | Repo for public values, protected storage for sensitive | Classify every variable before storage |
Keep staging and production values separate, expose secrets only to the deployment job that needs them, and prefer project-scoped credentials over broad platform tokens for ordinary deployments.
Before Your Next Automated Deployment:
- Confirm CI credentials use non-interactive authentication
- Verify no secrets are committed to the repository
- Check staging and production values are separated
- Confirm project credentials are scoped to one environment
- Review build logs for exposed connection strings
FAQ
Q: What is the Void Platform CLI used for?
The Void Platform CLI connects local projects to a Cloudflare-based platform installation, handles authentication, builds and deploys applications with `void deploy`, inspects logs, and manages databases, secrets, and domain configuration.
Q: Which command should I run first?
Run `void init` or `void setup` in your project directory to initialize configuration, then authenticate with `void auth login` before connecting the project to a platform with `void platform connect`.
Q: Can I use the CLI in a CI pipeline?
Yes. Configure non-interactive credentials in your CI provider's encrypted secret store, establish the project and platform context, and invoke `void deploy` from the deployment job without requiring a browser session.
Q: How do I troubleshoot a failed deployment?
Use `void logs` to inspect deployment and runtime output, verify the correct platform and project context were selected, and use rollback controls to return to a previous stable state before retrying the deployment.
For authoritative details, consult the official CLI platform reference, the first deployment guide, and the CLI installation reference.