LaserData Cloud
CLI

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 code 0 on 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 --interactive to 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 | sh

The 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.1

In-Place Upgrade

laser update

Pulls the latest release and replaces the running binary atomically.

Verify

laser version

Sign In

laser auth login

Prompts 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):

PathPurpose
$XDG_CONFIG_HOME/laser/config.tomlNamed contexts (mode 0600, atomic writes). Stores account names only; secrets stay in the OS keyring.
$XDG_STATE_HOME/laser/activePointer to the currently active context.
$XDG_DATA_HOME/laser/historyTUI command history. Capped at 1000 entries with atomic writes.
$XDG_DATA_HOME/laser/logs/laser-YYYY-MM-DD.logRolling 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-eu

Override the active context for a single invocation with --context NAME or LD_CONTEXT=NAME.

Output Formats

Pick with -o / --output:

FormatDefault forNotes
tableTTYAligned ASCII table. Colored unless NO_COLOR is set or --no-color is passed.
jsonPipe / non-TTYMachine-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

FlagEnvPurpose
--context NAMELD_CONTEXTUse a specific named context for this invocation.
--api-key KEYLD_API_KEYOverride the context API key.
-o, --output FORMAT-table, json, yaml, or name.
--no-colorNO_COLORDisable 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>

What's Next

On this page