From 4023997eb3ff86b90fc18e0bc42abb8aa98cbcbe Mon Sep 17 00:00:00 2001 From: "kenny.rogers" Date: Thu, 7 May 2026 00:23:55 +0000 Subject: [PATCH] Add Stripe Projects CLI provisioning to scaffolding and SDK skills - create-agent-tui: Add Stripe Projects as alternative in Prerequisites, add workflow step to offer auto-provisioning when Stripe CLI is available - create-headless-agent: Same changes as create-agent-tui - openrouter-typescript-sdk: Add Option B (Stripe Projects CLI) to Obtaining an API Key section, mention in Setup section Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- skills/create-agent-tui/SKILL.md | 6 +++++- skills/create-headless-agent/SKILL.md | 6 +++++- skills/openrouter-typescript-sdk/SKILL.md | 12 +++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/skills/create-agent-tui/SKILL.md b/skills/create-agent-tui/SKILL.md index bbec2f0..16976a0 100644 --- a/skills/create-agent-tui/SKILL.md +++ b/skills/create-agent-tui/SKILL.md @@ -15,7 +15,10 @@ Architecture draws from three production agent systems: ## Prerequisites - Node.js 18+ -- `OPENROUTER_API_KEY` from [openrouter.ai/settings/keys](https://openrouter.ai/settings/keys) +- `OPENROUTER_API_KEY` — get one from the [dashboard](https://openrouter.ai/settings/keys), or provision via [Stripe Projects](https://openrouter.ai/announcements/openrouter-on-stripe-projects) CLI: + ```bash + stripe projects add openrouter/api # creates account + key, writes to .env + ``` - For full SDK reference, see the `openrouter-typescript-sdk` skill --- @@ -144,6 +147,7 @@ After getting checklist selections, follow this workflow: - [ ] If ASCII Logo Banner is ON: generate src/banner.ts (see ASCII Logo Banner section below) - [ ] Generate src/cli.ts entry point (or src/server.ts — see references/server-entry-points.md) - [ ] Generate .env.example with OPENROUTER_API_KEY= +- [ ] If Stripe CLI is available (`command -v stripe`): offer to run `stripe projects add openrouter/api` to auto-provision the key into .env - [ ] Verify: run npx tsc --noEmit to check types ``` diff --git a/skills/create-headless-agent/SKILL.md b/skills/create-headless-agent/SKILL.md index cae0caf..94ef5b1 100644 --- a/skills/create-headless-agent/SKILL.md +++ b/skills/create-headless-agent/SKILL.md @@ -10,7 +10,10 @@ Scaffolds a headless agent in TypeScript targeting OpenRouter. The generated pro ## Prerequisites - Bun 1.1+ -- `OPENROUTER_API_KEY` from [openrouter.ai/settings/keys](https://openrouter.ai/settings/keys) +- `OPENROUTER_API_KEY` — get one from the [dashboard](https://openrouter.ai/settings/keys), or provision via [Stripe Projects](https://openrouter.ai/announcements/openrouter-on-stripe-projects) CLI: + ```bash + stripe projects add openrouter/api # creates account + key, writes to .env + ``` - For full SDK reference, see the `openrouter-typescript-sdk` skill --- @@ -114,6 +117,7 @@ After getting the name and checklist selections, follow this workflow: - [ ] If HTTP server selected: generate src/server.ts (spec in references/entry-points.md) - [ ] If MCP server selected: generate src/mcp-server.ts (spec in references/entry-points.md) - [ ] Generate .env.example +- [ ] If Stripe CLI is available (`command -v stripe`): offer to run `stripe projects add openrouter/api` to auto-provision the key into .env - [ ] Generate test/agent.test.ts - [ ] Run `bun install` to fetch dependencies - [ ] Verify: run `bunx tsc --noEmit` diff --git a/skills/openrouter-typescript-sdk/SKILL.md b/skills/openrouter-typescript-sdk/SKILL.md index 7fc11cb..23b9bea 100644 --- a/skills/openrouter-typescript-sdk/SKILL.md +++ b/skills/openrouter-typescript-sdk/SKILL.md @@ -26,7 +26,7 @@ npm install @openrouter/sdk ## Setup -Get your API key from [openrouter.ai/settings/keys](https://openrouter.ai/settings/keys), then initialize: +Get your API key from the [dashboard](https://openrouter.ai/settings/keys), or provision one with the [Stripe Projects](https://openrouter.ai/announcements/openrouter-on-stripe-projects) CLI (`stripe projects add openrouter/api`). Then initialize: ```typescript import { OpenRouter } from '@openrouter/agent'; @@ -48,10 +48,20 @@ The primary authentication method uses API keys from your OpenRouter account. #### Obtaining an API Key +**Option A — Dashboard:** + 1. Visit [openrouter.ai/settings/keys](https://openrouter.ai/settings/keys) 2. Create a new API key 3. Store securely in an environment variable +**Option B — Stripe Projects CLI** (creates account + key + billing in one command): + +```bash +stripe projects add openrouter/api +``` + +This provisions an OpenRouter account linked to your Stripe identity, generates an API key, and writes it to your project's `.env` as `OPENROUTER_API_KEY`. See the [announcement](https://openrouter.ai/announcements/openrouter-on-stripe-projects) for details. Requires the [Stripe CLI](https://docs.stripe.com/stripe-cli) with the Projects plugin (`stripe plugin install projects`). + #### Environment Setup ```bash