Plane docs
SDK and CLI

The plane CLI

Three commands — dev, keys, promote.

npx plane dev
npx plane keys create --name ci --scopes read,control
npx plane promote support-bot --to prod

All three need a key. --api-key or $PLANE_API_KEY, and the CLI refuses to start without one, naming where a key comes from. The key is the environment your laptop's agent and connection are written into, which is why a personal environment is the intended target and why there is no --environment flag anywhere.

plane dev

Serves your app to a hosted Plane over an outbound socket. Full walkthrough: local development.

FlagDefault
-c, --config <path>plane.config.ts, then plane/agent.tsthe module exporting your definePlane result
-n, --name <name>your git user namenamespace: suffixes the agent slug and the connection
--plane-url <url>$PLANE_URLthe hosted Plane
--api-key <key>$PLANE_API_KEYrequired
--openprint the control-plane URL for your agent
--no-watchdo not re-sync when the definition changes
-q, --quietdo not stream session events

$PLANE_CONSOLE_URL overrides where the printed console link points; it defaults to --plane-url.

plane keys create

npx plane keys create --name ci --scopes read,control

Mints a key in the environment the calling key is in, at the scopes you name (read,data by default — a runtime key, since a key that can rewrite an agent definition should be asked for). The plaintext is printed once, alone on its line so it can be piped, and never again.

On a fresh server the first key is printed to the log at boot. After that this command and the control plane's API keys page are the two ways to get one.

plane promote

PLANE_API_KEY=$PLANE_ORG_KEY npx plane promote support-bot --to prod
npx plane promote support-bot --to prod --map connection:orders=orders-prod --dry-run

Always runs a dry run first — the same server code path, writing nothing — and prints the resolution, so a failure is legible in CI output. Nothing is written unless every connection, provider and secret the definition names resolves in the target. --map kind:from=to is repeatable; kind is connection, provider or secret.

An environment key cannot promote: a key is an environment and this crosses two. See promotion.

On this page