Overview
Install, authenticate, and get started with the DevZero CLI (dz) — a terminal interface for managing operators, clusters, and workloads.
DevZero CLI
The DevZero CLI (dz) is a terminal interface for installing and managing DevZero operators on Kubernetes clusters. It covers the full lifecycle — connecting clusters, inspecting workloads, applying recommendations, and diagnosing operator issues.
Installation
Run any command without installing:
npx devzero <command>npx downloads the latest version on first use and caches it. You always get the latest version with no maintenance.
Install globally to use the dz shorthand:
npm install -g devzeroUpdate with npm update -g devzero.
Prerequisites
- Node.js 18+ and npm/npx
- kubectl configured with access to your target cluster
- Helm 3 (required for operator installations)
Environment Preflight
dz doctorChecks kubeconfig, cluster reachability, RBAC permissions, Helm, and DevZero API connectivity. Does not require authentication.
Authentication
Most commands require a DevZero account. The CLI supports browser-based OAuth and Personal Access Tokens (PATs).
dz auth loginOpens your browser for the DevZero OAuth flow. Credentials are saved to ~/.devzero/credentials.
dz auth login --token dzo_abc123...Generate tokens in the DevZero Dashboard under Settings > API Tokens. For CI/CD, set the DEVZERO_TOKEN environment variable instead:
export DEVZERO_TOKEN=dzo_abc123...
dz install read --auto-approveOther Auth Commands
# Check who you're logged in as
dz auth status
# Remove saved credentials
dz auth logoutToken Precedence
--tokenflag (highest priority)DEVZERO_TOKENenvironment variable~/.devzero/credentialsfile
Commands that don't call the DevZero API (doctor, version, analyze-cluster) work without authentication.
Quick Start
# 1. Authenticate
dz auth login
# 2. Install the read operator on your current kube context
dz install read
# 3. Check operator health
dz status
# 4. View workload recommendations
dz recs listGlobal Flags
Available on every command:
| Flag | Short | Default | Description |
|---|---|---|---|
--verbose | -v | false | Enable debug output |
--no-color | false | Disable color output | |
--output | -o | pretty | Output format: pretty, plain, or json |
--token | DevZero PAT token (overrides saved credentials) |
MCP Integration for AI IDEs
Register a Model Context Protocol server so AI assistants (Claude Code, Cursor, VS Code Copilot) can access your cluster data:
# Auto-detect IDE and register
dz mcp setup
# Check MCP server health
dz mcp status| Flag | Default | Description |
|---|---|---|
--scope | user | Claude Code config scope: local, user, or project |