CLI Reference
The lizard CLI is the primary interface to the platform. This page covers installation, global flags, exit codes, and runtime discovery. For every command’s flags, see the Command Reference.
Reference generated against CLI v0.3.62. Run
lizard <cmd> --help --jsonfor the exact, version-matched schema of any command.
Install & upgrade
npm install -g @lizard-build/cli
lizard --version
lizard upgrade # update to the latest version
lizard upgrade --check # check without installingAlways use the globally installed lizard binary — not npx. See Quickstart for permission-error fixes.
Authentication
lizard login # browser OAuth
lizard login --token lzd_xxx # token auth
lizard logout
lizard whoami # current user, workspace, linked projectIn CI, set LIZARD_TOKEN in the environment instead of running login.
Global flags
| Flag | Description |
|---|---|
-V, --version | Print the CLI version |
--json | Machine-readable output. Combine with --help to dump a command’s schema |
Most commands also accept -p, --project, -s, --service, and -w, --workspace to target a specific resource instead of the linked one.
Exit codes
| Code | Meaning | What to do |
|---|---|---|
0 | success | continue |
1 | generic error | read the message |
2 | auth (401/403) | run lizard login |
3 | not found (404) | check the name with lizard ps / lizard project list |
4 | timeout (408/504) | retry |
5 | cancelled by user | stop |
Runtime discovery
The CLI is self-documenting. To see the full command tree, global flags, and exit codes:
lizard --help --jsonFor any command or subcommand’s exact arguments and options:
lizard <cmd> --help --json
lizard <cmd> <sub> --help --json # e.g. lizard service set --help --jsonThis always reflects your installed version — prefer it over guessing flag shapes.
Configuration & state
- The CLI stores auth and the current directory’s project link in
~/.lizard/config.json. lizard statusshows the cwd’s workspace/project/service link (no auth required).lizard config applyapplies alizard-config.jsonfile to a project (use--dry-runto preview).