Search docs

Search the Beamd documentation

CLI reference

Every beamd command, grouped by role, with the global flags and JSON output that drive scripts and agents.

beamd is one binary with two roles' worth of commands — the client commands you run on your laptop, and the edge commands an operator runs on the server. Run beamd help for the built-in summary, or beamd <command> --help for a command's flags.

Client commands

What developers run day to day.

CommandWhat it does
beamd open <port>Expose a local port as a public URL. Foreground by default; -d detaches.
beamd close <name>Remove a detached tunnel. Idempotent.
beamd run [name] -- <cmd>Run a dev server and expose it in one step. See Wrap a dev server.
beamd listList detached tunnels.
beamd statusShow account + scope + agent + connection status.
beamd loginAuthenticate against an edge.
beamd logoutRemove an account.
beamd accountsList the edges you're logged into (* marks current).
beamd orgs (alias scopes)List the orgs the current account can act in.
beamd default [scope]Show or set your default scope.
beamd whoamiShow the resolved account + scope.
beamd checkVerify credentials against the edge — no tunnel, no agent.
beamd reloadRestart the background agent with fresh credentials.
beamd mcpRun the MCP stdio server. See MCP server.
beamd versionPrint the version.

Login, accounts, and scopes are explained in Accounts & scopes.

Edge commands

What an operator runs on the server — see Self-hosting.

CommandWhat it does
beamd serveRun the edge server (reads /etc/beamd/beamd.yaml by default).
beamd initInteractively write a beamd.yaml + an empty tokens.json.
beamd add-developerIssue a token for a slug, provision DNS + cert, and print the token.
beamd provision-devWrite DNS + pre-warm a cert for a slug (low-level; add-developer wraps it).

Common flags

Most client commands accept these:

FlagApplies toEffect
--as <name>open, runLiteral subdomain label.
--from <source>open, runDerive the label (port·dir·repo·branch·worktree). See Naming.
-d, --detachopenHand the tunnel to the background agent and return immediately.
--server <edge>most client commandsOne-off edge override (or set BEAMD_SERVER).
--scope <org>open, run, …One-off scope override (hosted).
--config <path>client + serveUse a dedicated config file. For client automation it holds {server, token}; for the edge it's the server config path. See Embed in your app.
--jsonopen, list, close, statusMachine-readable output (see below).

Bare-port shorthand

beamd <port> is shorthand for beamd open <port>:

beamd 3000          # same as: beamd open 3000

JSON output

Add --json to open / list / close / status to get exactly one JSON object or array and nothing else — the path scripts and agents should use:

beamd open 3000 --as api -d --json
# {"url":"https://api.beam.example.com","name":"api","port":3000,"slug":"","baseDomain":"beam.example.com"}

Always read the url field rather than assembling the host yourself — it's correct whether the edge is flat or namespaced. More patterns in Examples & recipes and the Agent local API.