Skip to content

The lbr command-line tool

Drive the Longbridge Platform from your terminal — sign in, create and inspect clusters, pull a kubeconfig, and mint automation credentials — over the same public API the provider and SDK use.

lbr is the Longbridge command-line tool. It drives the Console’s public API — the same contract the Terraform provider and the Go SDK use — so anything you can declare as code, you can also do interactively from a terminal. One CLI spans the whole platform; commands are product-namespaced (lbr control-plane …, with a cp alias).

Early access. lbr is v0.x and rolling out to early-access users. Commands may change before 1.0.

Install

go install github.com/longbridgehq/lbr@latest

A Homebrew tap and prebuilt release binaries are on the way.

Sign in

For interactive use, lbr login opens your browser; you approve the CLI, and a personal Console API key is stored in your profile:

lbr login
lbr whoami

For CI and automation, set a machine-user key in the environment instead — the same variable the Terraform provider reads:

export LONGBRIDGE_API_TOKEN="lngbr_…"

You can mint machine-user keys from the terminal too:

lbr machine-user create ci
lbr machine-user token create <machine-user-id> --name ci-2026

Control Plane

lbr clusters                              # list your clusters
lbr cp cluster create home --tier small   # create one, and wait for it to be ready
lbr kubeconfig home                        # merge admin access into ~/.kube/config
lbr cp node attach home                    # mint a join token + print the command to attach a node
lbr cp node list home                      # see attached worker nodes
lbr cp registration-token create home --name workers --cloud-config   # reusable token + fleet cloud-init
lbr cp tiers                               # available tiers (also: versions, db-sizes)

lbr kubeconfig merges a context into your kubeconfig and switches to it, so kubectl is ready immediately — like gcloud … get-credentials.

Output and profiles

Every read command speaks -o table (the default), json, yaml, or name, so lbr composes with scripts and jq. Configuration lives in ~/.config/lbr/config.yaml as named profiles; --profile, --endpoint, and --token override per invocation. Values resolve flag → environment → profile.

Next