Command reference
Every layerbeat command, grouped by what it does.
Run layerbeat COMMAND --help for every option of a command. lb works in place of layerbeat everywhere.
Options for every command
| Option | Meaning |
|---|---|
--json | Print JSON (the API's own response shapes). The default when stdout is not a terminal |
--no-input | Never prompt; fail instead |
--yes, -y | Answer yes to purchase confirmations (scripts and agents). Without it, buying or renewing asks in a terminal and is refused elsewhere |
--workspace ORG_ID | Act on this workspace (signed-in sessions only) |
--api-url URL | Use another Layerbeat API instead of https://layerbeat.com (also LAYERBEAT_API_URL). Must be https://; http:// only for localhost, 127.0.0.1 or [::1] |
-h, --help / -V, --version | Help and version |
Account and sign-in
| Command | What it does |
|---|---|
login | Sign in through your browser (--no-browser over SSH); or save an API key piped on stdin |
logout | Sign out and forget the saved token |
whoami | You, your workspace, permissions and credit |
doctor | Check configuration, connection and sign-in |
status | Check that the Layerbeat API is up |
sessions ls / rm | Your signed-in browsers and CLIs |
keys ls / create / rm | API keys for scripts and agents (signed-in sessions only) |
account … | Setup, currency, email, password and connected Google or GitHub sign-ins |
notifications show / set / history | Which emails you receive |
org show / members / add-member / set-role / remove-member / audit | Your workspace, its members and audit log |
signup | Create an account (not on layerbeat.com, which needs the browser check) |
Catalog
| Command | What it does |
|---|---|
regions | Locations |
plans [--region R] [--family general|fast] [--os linux|windows] | Configurations, with their system, prices and stock for a region |
images [--region R] [--all] | Operating systems and applications |
quote --region R --plan P --image I [--term N] | The exact total for a server |
Servers
| Command | What it does |
|---|---|
new [NAME] | Buy a server: asks in a terminal (OS or app, then the plans that fit it, term, login, then a yes), or takes flags (--os, --max-price, --idempotency-key, --yes, --wait…) |
ls / get SERVER | List servers / show one |
start / stop / reboot SERVER | Power (--wait to wait) |
rm SERVER --confirm NAME | Delete permanently |
renew SERVER --max-price AMOUNT | Extend the prepaid term |
renewal show / set SERVER | Renewal prices and automatic renewal |
metrics SERVER / traffic SERVER | Usage in the last 24 hours / this month's transfer |
metrics-access show / set SERVER | Who may see a server's metrics |
password reveal / forget SERVER | The first-login password |
console SERVER | Open the browser console |
operation OP / wait OP | Show or wait for an operation |
Access
| Command | What it does |
|---|---|
ssh SERVER [-- COMMAND] | SSH in, or run one command |
exec SERVER -- COMMAND | Run a command without prompts; its exit status becomes the CLI's |
cp FROM TO | Copy files; server:path on either side, -r for folders |
ssh-key ls / add NAME / rm | Your SSH public keys |
Disks and firewall
| Command | What it does |
|---|---|
volume prices / options | Public disk prices / sizes, terms and zones |
volume new NAME --size GB [--server S] | Buy a disk, attached and mounted, or unattached in a zone |
volume ls / get / system-disks | Your disks / one disk / servers' own disks |
volume attach VOL SERVER / detach VOL | Move a disk between servers in a zone |
volume rename / renew / rm --confirm | Rename, extend or delete a disk |
fw ls / add / rm SERVER | A server's firewall rules |
Templates
| Command | What it does |
|---|---|
template ls / show T | The catalog / one template |
template deploy T --server S | Install it (--input, --ports or --accept-ports, --wait) |
template deployments / status D | What is deployed where / one deployment |
template check / update / rm D | Health check, update or retry, remove (--delete-data) |
template script T|D | The exact script that runs on the server |
Credit
| Command | What it does |
|---|---|
credit | Your USD and IDR balances |
transactions | Credit history |
payment-methods | What you can pay with |
topup AMOUNT [--method M] | Add credit; prints payment instructions |
topup AMOUNT --pay x402|mpp [--payer PATH] | An agent pays now from its own wallet (how) |
payments / payment ID [--refresh] | Your top-ups |
affiliate … | Referral and partner program |
Agents and tools
| Command | What it does |
|---|---|
mcp serve [--allow-spend] [--allow-delete] | Layerbeat as MCP tools for coding agents |
api METHOD PATH [-d JSON] [-H HEADER] | Call any API endpoint |
completion SHELL | Shell completions for bash, zsh, fish, elvish or PowerShell |
Environment
| Variable | Meaning |
|---|---|
LAYERBEAT_API_KEY | Use this API key (wins over a saved sign-in) |
LAYERBEAT_API_URL | Use another Layerbeat API (same rules as --api-url) |
XDG_CONFIG_HOME | Where the layerbeat settings folder lives (default ~/.config) |