CLI Reference
Complete guide to the FailZero CLI (fz).
Installation
Authentication
fz auth login
Authenticate with FailZero. Opens browser for OAuth login.fz auth logout
Remove stored credentials.fz auth status
Check current authentication status.DR Plan Management
fz init
Initialize a new DR plan configuration file.- Cloud provider selection (GCP, AWS)
- Project/account configuration
- Region selection
dr.yaml file in the current directory.
Options:
Example:
fz validate
Validate a DR plan configuration file.
Example:
- YAML syntax
- Required fields
- Provider configuration
- Monitor definitions
- Failover step references
fz deploy
Deploy a DR plan to FailZero.
Options:
Example:
Monitoring & Status
fz status
Check the status of a deployed DR plan.
Output includes:
- Plan status (active, paused, error)
- Monitor health
- Last check time
- Agent connection status
fz list
List all deployed DR plans.Failover Operations
fz failover
Trigger a failover for a DR plan.
Options:
Examples:
fz approve
Approve a pending failover (when confirmation is required).
Example:
fz cancel
Cancel a pending or in-progress failover.History
fz history
View failover history for a DR plan.
Options:
Example:
- Timestamp
- Trigger type (manual/automatic)
- Who triggered it
- Duration
- Success/failure status
Agent Management
fz agent deploy
Deploy a FailZero agent to your cloud provider. Interactive wizard guides you through the setup.
Examples:
- Creates an agent token via the FailZero API
- For GCP: Deploys to Cloud Run with proper environment variables
- For AWS: Creates ECS Fargate service with task definition
Requires
gcloud CLI (GCP) or aws CLI (AWS) to be installed and authenticated.fz agent list
List all agents and their connection status. Alias:fz agent status
- Agent name and ID
- Connection status (Connected/Inactive)
- Token prefix
- Last seen timestamp
fz agent revoke
Revoke an agent token.Configuration File
fz config
View or modify CLI configuration.Global Options
These options work with all commands:Exit Codes
Environment Variables
Examples
Complete Workflow
Next Steps
Example Plans
Real-world DR configurations
Quickstart
End-to-end setup guide

