CLI
laser - command-line and TUI for LaserData Cloud
laser is a single static binary that drives the LaserData Cloud control plane from your terminal. Two execution modes share one binary, one config, and one set of credentials:
- Headless - one-shot verbs (
laser tenant get,laser deployment list). The default. Suitable for pipes, scripts, cron, and CI. Exit code0on success, non-zero on failure. - TUI - full-screen Ratatui dashboard with mouse and keyboard support, a command palette, and persistent history. Launched via
laser tui, or by passing--interactiveto any verb.
The CLI is tenant-scoped: it authenticates with an API key (not your user account) and operates on a tenant's hierarchy - divisions, environments, and deployments. Provision credentials with the appropriate roles and permissions before signing in.
Supported platforms: macOS (arm64) and Linux (x86_64, arm64).
Install
curl -fsSL https://cli.laserdata.cloud/install.sh | shThe installer detects OS + arch, downloads the matching tarball from the public release repo, verifies the SHA-256 checksum, and drops laser into $HOME/.local/bin (or $LD_PREFIX if set). Re-run any time to upgrade.
Pin a Version
curl -fsSL https://cli.laserdata.cloud/install.sh | sh -s -- --version v0.0.1In-Place Upgrade
laser updatePulls the latest release and replaces the running binary atomically.
Verify
laser versionSign In
laser auth loginPrompts for the API key (masked input) and stores the secret in the OS keyring (Keychain on macOS, Secret Service on Linux). Only the account name lands on disk; the secret itself stays in the keyring. The login flow validates the key against the platform and binds the active context to a tenant when the key is scoped to a single one.
For agents, CI, and scripts, set the key in the environment instead:
export LD_API_KEY=ld_pat_...LD_API_KEY always takes precedence over the keyring, so no separate login step is needed in CI.
Local State
All state lives under XDG paths (or the platform equivalent on macOS):
| Path | Purpose |
|---|---|
$XDG_CONFIG_HOME/laser/config.toml | Named contexts (mode 0600, atomic writes). Stores account names only; secrets stay in the OS keyring. |
$XDG_STATE_HOME/laser/active | Pointer to the currently active context. |
$XDG_DATA_HOME/laser/history | TUI command history. Capped at 1000 entries with atomic writes. |
$XDG_DATA_HOME/laser/logs/laser-YYYY-MM-DD.log | Rolling daily debug log. Written for every invocation, including --silent and --quiet runs. |
Override the log verbosity with LD_LOG_FILE (file output) or LD_LOG (stderr). Both accept standard tracing directives, for example LD_LOG_FILE=trace.
Contexts
A context bundles an optional tenant_id together with a keyring binding for an API key. Multiple contexts let you switch between tenants without re-entering credentials:
laser context create prod
laser context list
laser context switch prod # alias: laser ctx use prod
laser context current
laser context show prod
laser context set tenant_id 615380456123456789
laser context rename prod prod-eu
laser context delete prod-euOverride the active context for a single invocation with --context NAME or LD_CONTEXT=NAME.
Output Formats
Pick with -o / --output:
| Format | Default for | Notes |
|---|---|---|
table | TTY | Aligned ASCII table. Colored unless NO_COLOR is set or --no-color is passed. |
json | Pipe / non-TTY | Machine-readable. Stable schema. |
yaml | - | YAML 1.2. |
name | - | IDs and names only. Useful in xargs pipelines. |
Auto-detection: table on a TTY, json when piped. Override per call with -o.
Global Flags
| Flag | Env | Purpose |
|---|---|---|
--context NAME | LD_CONTEXT | Use a specific named context for this invocation. |
--api-key KEY | LD_API_KEY | Override the context API key. |
-o, --output FORMAT | - | table, json, yaml, or name. |
--no-color | NO_COLOR | Disable colored output. |
-q, --quiet | - | Suppress non-essential output. |
--debug | - | Enable debug logging to stderr. |
--silent | - | Suppress success output entirely. Errors still go to stderr; exit code preserved. |
--interactive | - | Run the verb inside the TUI dashboard with rendered output. |
--config PATH | - | Use an alternate config file. |
--yes | - | Skip confirmation prompts for destructive operations. |
--generate SHELL | - | Print shell completion script (bash, zsh, fish, powershell, elvish) and exit. |
Quick Start
# install + login
curl -fsSL https://cli.laserdata.cloud/install.sh | sh
laser auth login
# explore your tenant
laser tenant get
laser tenant structure -o json
# launch the dashboard
laser tui
# spin up a starter deployment (AWS or GCP)
laser deployment create-starter --cloud aws --region us-east-1
laser deployment create-starter --cloud gcp --region us-central1
# follow it to ready
laser deployment watch --deployment-id <id>