Install & initialize

Create a Molar account, install the CLI, and scaffold your first project with npx molar-agent init.

Install & initialize

This guide gets you from zero to a scaffolded Molar project connected to your workspace.

Prerequisites

  • Node.js 22+ (for npx) or the native molar binary from get.molar.it
  • A GitHub account (optional now; required for PR gating later)
  • Your app's URL for Cartographer crawl (optional at signup; add anytime)

Step 1 — Create an account

Human signup (default)

  1. Go to app.molar.it and sign up.
  2. Complete onboarding — create a project and optionally enter your app URL.
  3. Invite teammates from Settings → Members.

Agent self-serve (coding agents)

If an AI agent is setting up Molar without a pre-existing account, use Agent self-serve signup. The agent registers via API or molar agent signup, your team receives a 6-digit verification email, and full MCP scopes unlock after verify. If signup returns 503, use human signup + a dashboard PAT instead. Humans still own billing and org settings at app.molar.it.

Step 2 — Install the CLI

npx molar-agent init

molar-agent is a thin alias over @molar/cli — every subcommand matches molar <subcommand>.

MethodCommand
npxnpx molar-agent --help
npmnpm install -g @molar/cli
Homebrewbrew tap molar-it/tap && brew install molar
curlcurl -fsSL https://get.molar.it | sh

Verify: molar version and molar doctor.

Note:

molar doctor checks for the Guard runner (@molar/guard-runner / molar-guard binary). Local molar run needs it. Cloud runs from the dashboard do not require a local runner.

Step 3 — Initialize a project

npx molar-agent init
# or: molar init [path]

Creates:

.molar/
  scenarios/
  config.toml
  .gitignore

Also writes .cursorrules and AGENTS.md for AI-assisted authoring.

Step 4 — Connect to Molar Cloud

  1. Settings → API Tokens → create a PAT.
  2. Export locally:
export MOLAR_API_URL=https://api.molar.it
export MOLAR_TOKEN=molar_pat_xxxxxxxx

Or ~/.config/molar/config.toml:

api_url = "https://api.molar.it"
token = "molar_pat_xxxxxxxx"

Note:

molar login --token molar_pat_xxxx validates and saves credentials. There is no separate molar whoami command — use GET /api/v1/me with your token.

Step 5 — Connect your app

  1. Open app.molar.it.
  2. Ensure your Cartographer project has your app URL (set during onboarding or in the Cartographer dashboard).
  3. Use Scouts or MCP to discover flows, then approve them as scenarios under Scenarios.

What's next