Open app
Moonborn — Developers

CLI

The Moonborn command-line interface — `moonborn` binary for auth, personas, chat, webhooks, MCP stdio bridge. Install globally; ships with every release.

@moonborn/cli is the canonical command-line interface — install globally, log in once, then drive your workspace from the terminal. Ships with every API release, version-aligned to the SDK.

Install

npm i -g @moonborn/cli
# verify
moonborn --version

(The package name is @moonborn/cli; the binary it installs is moonborn.)

Authenticate

moonborn login

Opens your browser, hands off via OAuth, drops a workspace-scoped API key into ~/.config/moonborn/credentials. To use an existing API key directly:

export MOONBORN_API_KEY=sk_live_...

The CLI checks env first, falls back to the credentials file.

Commands

# Personas
moonborn personas list
moonborn personas create --intent "..." --workspace ws_...
moonborn personas get persona_01H...
moonborn personas refine persona_01H... --axis warmer --amount 0.4
 
# Chat
moonborn chat start --persona persona_01H...
moonborn chat send <session-id> "What drives you?"
 
# Webhooks
moonborn webhooks list
moonborn webhooks ping <webhook-id>
 
# Config
moonborn config get engine.pipeline.drift_detection.threshold
moonborn config set engine.pipeline.drift_detection.threshold 0.20 --scope workspace
 
# MCP stdio bridge (for IDEs that prefer stdio over HTTPS)
moonborn mcp --stdio

Run moonborn <command> --help for the full option set on any command.

Scripting

Every command supports --json for machine-readable output:

PERSONA_ID=$(moonborn personas create --intent "..." --json | jq -r .id)
moonborn chat start --persona "$PERSONA_ID" --json

Exit codes follow Unix conventions: 0 on success, >0 on failure.

Workspace switching

moonborn workspace list
moonborn workspace use ws_abc...

The active workspace persists across CLI invocations.

Tier

Every tier — same auth surface as the API, same per-tier gates enforced server-side.

Next