How to automate landbase-cli in scripts and CI
This guide shows you how to use landbase-cli in shell scripts and CI pipelines — handling exit codes, passing credentials without interaction, and building robust automations.Pass credentials without a browser
In scripts and CI, you cannot open a browser for OAuth. Use an API key instead:Handle exit codes
landbase-cli uses standard exit codes for machine-readable error handling:Capture errors from stderr
Errors are written to stderr as JSON. Capture them separately from stdout:Retry on transient errors
Network errors (exit code 4) are often transient. Add a retry loop:Disable the update check
In CI, suppress the daily version-available nag:--no-update-check to individual commands.
Disable telemetry
To opt out of anonymous usage telemetry:Full CI pipeline example
Related
- exit codes reference — full exit code definitions
- error codes reference — error code values for branching logic
- environment variables reference — all LANDBASE_* env vars

