curl brainstormrouter.com now answers the agent — and br go onboards in one shot

2026-08-27

edge-workerclitenant-onboarding

LOCKSTEP TRACEABILITY MATRIX --- api_endpoints: ["none (edge + CLI only)"] sdk_methods_updated: ["none"] mcp_tools_updated: ["none"] ---

What We Built

The founding sentence — _tell any model to connect to brainstormrouter.com and it can immediately get to work and register an account in a terminal_ — is now literally true. The Cloudflare worker content-negotiates the apex root: agent and CLI user agents (curl, wget, httpie, python-requests/httpx/urllib, Go-http-client, node, undici, deno — or an empty UA, or Accept: text/plain) receive site/public/hello.txt, a 4-step terminal onboarding (register → BYOK → graduate → work) with copy-paste curls and deep links. Browsers get the marketing site, untouched.

Alongside it, the forgotten br CLI (@brainstormrouter/cli, dormant at 0.1.0 since March) came back to life as 0.2.0:

  • br go — the one-shot: registers (if no key saved), **auto-detects provider

keys already in the environment (ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, GROQ_API_KEY, …), live-validates and stores them, graduates, then fires a model:"auto" test completion and prints the routing decision (routed model, selection method, actual cost, explain URL). Non-interactive by default**: when stdin is not a TTY, --yes is implied and no prompt ever blocks — the founding customer can't press Y. Idempotent re-runs.

  • br register — no longer demands --code/--name/--email; the default is the

zero-friction sandbox path, machine upgrade paths printed first, claim URL last.

  • br graduate / br graduation — the BYOK graduation flow from the terminal.
  • New cli-v* tag job in publish-sdk.yml publishes the package.

Verified live

  • curl https://brainstormrouter.com/ → the agent hello (text/plain). Same for

wget and python-httpx UAs; a Mozilla UA still gets — checked all three after the wrangler deploy.

  • npx -y @brainstormrouter/cli@0.2.0 go (stdin piped, not a TTY) with

ANTHROPIC_API_KEY set → key reused, provider validated + stored, completion routed (capability-matched → claude-haiku; a repeat run returned cache-hit at $0.000000). Fresh-register path exercised locally pre-publish; the live npx run hit the 3-registrations/day IP cap — which surfaced the typed 429 cleanly through the CLI, an unplanned error-path verification.

Why It Matters

Onboarding friction is now: one sentence to any model. The model curls the domain, reads its own instructions, and self-serves to governed, graduated, BYOK-billed inference. No competitor's cold-start is shorter than "connect to our domain."