← Docs

Quickstart

Say launch this in the repo you just built.

For the normal path, do not wire keys or runtime config by hand. The agent runs launch-here itself in the same chat turn: detect runtime, mint workspace, write MCP config, plant the repo, fire the launch over HTTPS. The launch room lands inline — no restart required for first value. The pendingIntent persists in chieflab.json for the rare case the session does restart.

Install

The normal flow is: tell your agent launch this. If ChiefLab is missing, the agent runs the front-door command itself, mints the workspace, fires the launch call over HTTPS, and renders the launch room in the same chat turn. No website visit, no setup cognition.

The literal command (in case you want to run it yourself):

npx -y @chieflab/cli launch-here --intent "launch this"

Windows PowerShell note: if npx fails with "running scripts is disabled", use the Windows command shim: npx.cmd -y @chieflab/cli launch-here --intent "launch this".

launch-here is the canonical product verb. ONE command: detects repo + runtime, attaches ChiefLab if missing (mint workspace + write MCP config + plant repo), gathers repo context, fires chieflab_get_users_after_build over HTTPS with the workspace key. The launch pack lands in the same turn. Already-attached repos skip install and go straight to launch.

Manual setup if auto-attach is unavailable

Hosted MCP

curl -X POST https://api.chieflab.io/api/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Cursor

Open this cursor:// link. Paste your key when prompted. Restart Cursor. The chieflab_* tools appear in your tool picker.

Claude Desktop / Claude Code / any remote-MCP host

Use the hosted MCP URL directly where your host supports remote MCP:

{
  "mcpServers": {
    "chieflab": {
      "url": "https://api.chieflab.io/api/mcp",
      "headers": { "Authorization": "Bearer clp_dev_<paste-your-key>" }
    }
  }
}

If your host only supports stdio MCP, install the bridge:

npm install -g @chieflab/mcp-server

Direct HTTPS (no install)

curl https://api.chieflab.io/api/mcp \
  -H "Authorization: Bearer clp_dev_..." \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"chieflab_launch_product","arguments":{"productUrl":"yoursite.com","goal":"Get our first 100 users"}}}'

Fallback host: if api.chieflab.io ever returns a network error, you can swap to the brand domain https://chieflab.io/api/mcp — same backend, routed through Cloudflare. Both surfaces are smoke-checked on every deploy (scripts/customer-smoke.mjs).

TypeScript SDK / CLI

# Canonical product front door (install-if-needed + launch in one command):
npx -y @chieflab/cli launch-here --intent "launch this"

# Lower-level: install only, no launch call. For "set up ChiefLab" intents.
npx -y @chieflab/cli attach --runtime auto --project .

# Windows PowerShell if npx is blocked by execution policy:
npx.cmd -y @chieflab/cli launch-here --intent "launch this"
npx.cmd -y @chieflab/cli attach --runtime auto --project .

# Plant repo instructions only (no key mint, no launch):
npx @chieflab/cli init
npx.cmd @chieflab/cli init

# SDK for app/runtime integrations:
npm install @chieflab/sdk

launch-here is the canonical product verb. It detects the repo + runtime, attaches ChiefLab if missing (mint workspace + write MCP config + plant repo), gathers repo context, fires chieflab_get_users_after_build over HTTPS, and returns the launch pack inline. Use this when the user said "launch this" / "get users" / "market this" / similar. attach is the lower-level installer for explicit setup-only intents ("install ChiefLab", "set up ChiefLab"). init is the repo-plant subset. The SDK wraps the hosted MCP for app/runtime integrations.

After install — fire the first launch

From HTTPS

curl -X POST https://api.chieflab.io/api/mcp \
  -H "Authorization: Bearer $CHIEFLAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0", "id": 1, "method": "tools/call",
    "params": {
      "name": "chieflab_launch_product",
      "arguments": {
        "productUrl": "https://yoursite.com",
        "goal": "Get our first 100 users",
        "channels": ["linkedin", "x", "email"]
      }
    }
  }'

From inside Cursor / Claude Desktop / Codex

> I just shipped my product at https://yoursite.com. Launch it.

The agent picks chieflab_launch_product automatically (BM25 match on "launch" + the server-level instructions field).

What you get back

{
  "launchId":      "...",
  "launchPack": {
    "positioning": { ... },           // source-of-truth paragraph
    "channels": {
      "linkedin":  { body, ... },     // per-channel briefs
      "x":         { body, ... },
      "email":     { body, ... }
    }
  },
  "publishActions": [                  // approval-gated, persisted
    { id, channel, connector, executorTool: "chieflab_publish_approved_post",
      status: "awaiting_approval", preflight: { ... } }
  ],
  "reviewUrl":     "https://chieflab.io/runs/<id>?token=..."  // HMAC, 7-day TTL
}

Step 4 — Approve in chat → ship

Read the drafts inline in the IDE, then reply with approve all, approve <channel>, or a revision command. The signed reviewUrl is the away-from-IDE fallback for phone approval, teammate review, or image-heavy inspection. After approval, your agent fires:

# Call each approved action's executorTool via tools/call.
# Example executor names:
#   chieflab_publish_approved_post
#   chieflab_send_approved_email

Each fires through the connected provider rail (social publishing or email sending). Returns the live platform URL / messageId. Read the full closed-loop guide → · Current provider adapters →

Step 5 — 24h later (automatic)

You don't call anything here. Every approved publish enqueues a 24h follow-up row; the cron at /api/cron/tick auto-fires chieflab_post_launch_review against each row, pulls engagement + web analytics + search query data from the configured measurement connectors, writes channel performance into per-tenant memory, and surfaces a loop_closed_with_lesson card on the next chieflab_boot(). The next launch grounds against it without anyone asking. Current provider adapters listed in /docs/mcp-reference.

For replay or debugging only:

# Force-run the readback (replay / debug — NOT the normal path):
# chieflab_post_launch_review({ "runId": "..." })

What's next