Unified CLI

Shipped molar commands — init, login, scenarios, run, clones, trace, agent signup, and local MCP.

Unified CLI

The Molar CLI (@molar/cli) is the operator interface for local development and CI. npx molar-agent is an alias — same binary, same commands.

Note:

This page lists shipped commands only. Cartographer URL generation and several scenario helpers are available via MCP (molar_generate_scenarios_from_url, etc.), not the CLI today.

Shipped commands

Onboarding & auth

CommandDescription
molar init [--path]Scaffold .molar/, config, agent hints (default path: current directory)
molar login [--api-url] [--token]Validate a PAT and save to ~/.config/molar/config.toml
molar agent signup --human-email --nameAgent self-serve registration (see agent signup)
molar agent signup verify --codeSubmit human verification code
molar agent signup status [--json]Claim status, scopes, and product entitlements

Flags for agent signup: --api-url, --human-email, --name, --harness (cursor | claude-code | codex), --note-to-human, --json.

Create PATs at app.molar.it → Settings → Tokens, or use agent signup for coding agents.

Scenarios

CommandDescription
molar scenarios validate [glob] [--json]Lint frontmatter + step grammar (default glob: .molar/scenarios/*.molar.md)
molar scenarios compile [glob] [--out-dir] [--force] [--json]Compile .molar.md → Playwright .spec.ts (default out-dir: .molar/.compiled)
molar scenarios validate && molar scenarios compile && molar run

Running tests

CommandDescription
molar run [pattern] [--watch] [--ci] [--against] [--json]Run compiled scenarios via the Guard runner

Pass Playwright flags after --: molar run checkout -- --reporter=html

--against accepts local, preview, or staging.

Clones (local)

CommandDescription
molar clone <kind> --start [--seed]Start stripe, twilio, email, auth, or s3 clone
molar clone <kind> --stopStop the clone

Requires @molar/clones installed. Cloud clone lifecycle uses MCP (molar_clone_spawn, molar_clone_world, etc.) or the dashboard.

Traces

CommandDescription
molar trace open <target> [--local]Open a hosted trace ID or local trace.zip

Hosted traces require MOLAR_API_URL. Local files open via npx playwright show-trace.

MCP & utilities

CommandDescription
molar mcp serve [--cloud-access] [--surfaces] [--transport] [--port]Local MCP server (default surfaces: cartographer, clones, guards, trace)
molar doctor [--json]Dependency health check
molar upgrade [--check] [--force]Self-update from GitHub releases

mcp serve transport defaults to stdio when piped and http on port 4200 in a TTY. Set MOLAR_MCP_TRANSPORT or pass --transport stdio|http.

Not in CLI yet (use MCP or dashboard)

CapabilityUse instead
Generate scenarios from URLMCP molar_generate_scenarios_from_url
List/add/migrate scenariosDashboard or MCP molar_list_scenarios
Clone snapshot/restore (cloud)MCP molar_clone_world or Clones dashboard
Guard PR gate setupapp.molar.it → GitHub App

Configuration

FilePurpose
~/.config/molar/config.tomlUser API URL, token
.molar/config.tomlProject overrides
.molar/scenarios/*.molar.mdScenario source

Distribution

npm i -g @molar/cli · brew install molar · curl -fsSL https://get.molar.it | sh

Telemetry is off by default (MOLAR_TELEMETRY=1 to enable).

See also