
Coursebuilder Cli Operator
- 1 installs
- 32 repo stars
- Updated August 1, 2026
- codetv-dev/codetv.dev
Integrate and smoke-test CourseBuilder CLI and operator API surfaces (resources, workshops, products, device auth, Stripe) in apps like CodeTV.
About
Integrates, debugs, and smoke-tests CourseBuilder CLI and operator API surfaces in apps like CodeTV and AI Hero. A developer uses it to match app routes to the CourseBuilder CLI contract and verify commerce, auth, and resource endpoints.
- Uses the CourseBuilder CLI as the contract for app API behavior
- Covers device auth, resource/workshop/product routes, and Stripe checkout/webhooks
Coursebuilder Cli Operator by the numbers
- 1 all-time installs (skills.sh)
- Ranked #3,830 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 1, 2026 (Skillselion catalog sync)
npx skills add https://github.com/codetv-dev/codetv.dev --skill coursebuilder-cli-operatorAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 32 |
| Last updated | August 1, 2026 |
| Repository | codetv-dev/codetv.dev ↗ |
What it does
Integrate and smoke-test CourseBuilder CLI and operator API surfaces (resources, workshops, products, device auth, Stripe) in apps like CodeTV.
Files
CourseBuilder CLI/operator integration
Use the CourseBuilder CLI as the contract. Do not invent app API behavior when the CLI or AIH/CWA already defines it.
Source order
1. @coursebuilder/core for /api/coursebuilder/* commerce behavior. 2. `packages/aihero-cli/src/cli.ts` in the CourseBuilder repo for CLI route/shape contract. 3. AI Hero and Code with Antonio route implementations for proven app patterns:
- `apps/ai-hero/src/app/api`
- `apps/code-with-antonio/src/app/api`
apps/*/src/app/oauthin the CourseBuilder repo
If sources conflict, support what the CLI calls and prefer the working app implementation unless core has a newer verified-compatible behavior.
Common CLI smoke commands
Run from a local checkout of github.com/badass-courses/course-builder:
npx pnpm@10.26.1 --filter @coursebuilder/cli dev -- auth whoami --app codetv
npx pnpm@10.26.1 --filter @coursebuilder/cli dev -- resource get <slug-or-id> --app codetv
npx pnpm@10.26.1 --filter @coursebuilder/cli dev -- crud lesson list --app codetv --slug-or-id <id>
npx pnpm@10.26.1 --filter @coursebuilder/cli dev -- crud workshop create --app codetv --title 'Smoke' --structure '[{"type":"lesson","title":"Intro"}]'
npx pnpm@10.26.1 --filter @coursebuilder/cli dev -- crud product list --app codetv --slug-or-id <id>CLI top-level CRUD commands are usually under crud, not direct aliases:
cb crud lesson ...cb crud workshop ...cb crud product ...
Generic resources are top-level:
cb resource create|get|update ...
CodeTV integration notes
- CodeTV keeps Clerk for viewer auth.
- CourseBuilder DB tables use
ctv_prefix. ctv_User.fields.externalIdstores the Clerk user ID; generatedctv_User.externalIdindexes it.- Operator API bearer tokens live in
ctv_DeviceAccessToken. - CourseBuilder Stripe can use app-specific env vars:
COURSEBUILDER_STRIPE_SECRET_TOKENCOURSEBUILDER_STRIPE_WEBHOOK_SECRETCOURSEBUILDER_STRIPE_ACCOUNT_ID- CourseBuilder Stripe webhook URL shape:
/api/coursebuilder/webhook/stripe
Route parity checklist
For each route:
1. Check packages/aihero-cli/src/cli.ts for exact path, method, query params, and body shape. 2. Check AIH/CWA route implementation. 3. Port/adapt to the target app runtime. 4. Use bearer-token getUserAbilityForRequest for operator routes. 5. Return JSON errors with useful status codes. 6. Smoke test through cb if the CLI exposes it; otherwise use curl. 7. Clean smoke DB rows. 8. Update local context/plans and discovery documents if the route is public.
Stripe webhook events currently handled by core
Endpoint: /api/coursebuilder/webhook/stripe
Workflow/status-changing events:
checkout.session.completedcustomer.subscription.updatedinvoice.payment_succeededcharge.refundedcharge.dispute.created
Logged/accepted events:
charge.dispute.funds_withdrawncharge.succeededcustomer.updatedcustomer.subscription.createdcustomer.subscription.deletedcheckout.session.async_payment_failedcheckout.session.async_payment_succeeded