NewCompare CPU & GPU pricing across AWS, Azure & GCP

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 devzero

Update 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 doctor

Checks 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 login

Opens 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-approve

Other Auth Commands

# Check who you're logged in as
dz auth status

# Remove saved credentials
dz auth logout

Token Precedence

  1. --token flag (highest priority)
  2. DEVZERO_TOKEN environment variable
  3. ~/.devzero/credentials file

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 list

Global Flags

Available on every command:

FlagShortDefaultDescription
--verbose-vfalseEnable debug output
--no-colorfalseDisable color output
--output-oprettyOutput format: pretty, plain, or json
--tokenDevZero 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
FlagDefaultDescription
--scopeuserClaude Code config scope: local, user, or project

On this page