@curless/cli
v0.1.3
Published
Integrate Curless agent payments into an existing project: `npx @curless/cli init`. Detects your framework (MCP / Next.js / Express / Python), pulls the matching integration recipe from the Curless API, writes it in, and sets up .env.local.
Readme
@curless/cli
Integrate Curless agent payments into an existing project in one command.
npx @curless/cli init --product prd_2UU8ZRCR --merchant curless_mch_… --amount 4900 --currency USDinit detects your framework (MCP server / Next.js / Express / Python), pulls
the matching integration recipe from the Curless API
(GET /v1/integrations/recipes/:type), writes the scaffold into your repo, and
sets up .env.local (and .gitignore-guards it). The recipe uses the
production SDKs — @curless/agentbank-mcp-pay's withPaywall for MCP servers,
the /mpp/:merchant/verify handshake for HTTP frameworks.
Flags
| Flag | Meaning |
|---|---|
| --product, -p | Curless product ref (prd_…) |
| --merchant, -m | your merchant id (curless_mch_…) |
| --amount | price in minor units (e.g. 4900) |
| --currency | ISO currency (default USD) |
| --api | agentbank API base — required (or set $CURLESS_BASE_URL); local dev: http://localhost:3000 |
| --target, -t | force the recipe type (mcp-server | mcp-server-python | nextjs | express) |
| --force | overwrite an existing scaffold file |
What it writes
- A scaffold file (e.g.
src/curless-paywall.ts,app/api/unlock/route.ts). .env.localwithCURLESS_SECRET_KEY=(blank — you fill it),CURLESS_BASE_URL, andCURLESS_PRODUCT_REF. The secret is never written for you.- A
.env.localentry in.gitignore.
It never overwrites a scaffold file (without --force) and never clobbers an
env value you've already set. The same flow is also available as the
curless-payments skill (for AI assistants) and the public recipe endpoints.
