You don't add auth to your app. Your agent does.
โก Get Started in 10 Seconds
Copy this into your AI coding agent (Claude Code, Cursor, Codex, OpenClaw, Windsurf โ anything):
Read: https://llama-farm.github.io/corral/llms.txt
Add auth and Stripe billing to my app. Free tier + Pro
at $29/mo with 14-day trial. Wire up everything: login,
signup, profile page, admin dashboard, upgrade banners,
and feature gating.
That's it. Your agent reads the spec, runs the CLI, wires the UI. You ship.
๐ค What Just Happened?
Your agent ran npx create-corral init, which:
- Detected your framework โ Express, Next.js, Hono, Fastify, Koa, Vite+React, FastAPI, and 13+ more
- Embedded auth into your existing server โ no new services, no Docker, same database
- Generated everything:
| What | File |
|---|---|
| Auth setup (Better Auth + your DB) | src/lib/corral.ts |
| Login, signup, sessions, OAuth | /api/auth/* routes |
| Profile page (edit name, password, delete account) | src/components/ProfilePage.tsx |
| Admin dashboard (users, roles, plan overrides) | src/components/AdminPanel.tsx |
| Account menu (dropdown for navbar) | src/components/AccountMenu.tsx |
Plan gating (<PlanGate>, <FeatureGate>, blur/block) |
src/gates.tsx |
| Auth hook + provider | src/auth-context.tsx |
| Stripe checkout, billing portal, webhooks | /api/corral/* routes |
| Agent integration guide | CORRAL.md |
| Config (plans, features, meters, auth) | corral.yaml |
- Showed your agent the full feature list โ so it proactively wires up profile pages, upgrade banners, and admin dashboards without you asking
๐ Everything You Get
Ready to use (works immediately)
- โ Email/password sign-up & sign-in
- โ Social login (Google, GitHub, Apple, Discord + 6 more)
- โ Magic link & email OTP (passwordless)
- โ Session management, password reset, email verification
Generated components (your agent wires them up)
- ๐ Account Menu โ navbar dropdown: profile, settings, upgrade, admin, sign out
- ๐ Profile Page โ edit name, change password, manage email, delete account
- ๐ Admin Dashboard โ user list, role management, plan overrides, usage stats
- ๐ Sign-in / Sign-up Pages โ social buttons, magic link, OTP tabs
- ๐ Upgrade Banner โ shows free users what they're missing
Billing & monetization (Stripe-powered)
- ๐ Pricing Table โ auto-generated from
corral.yaml, monthly/annual toggle - ๐ One-click upgrade โ Stripe Checkout โ back to your app
- ๐ Billing Portal โ manage subscription, invoices, payment method
- ๐ Plan Gating โ
<PlanGate plan="pro">with blur/skeleton/block modes - ๐ Usage Metering โ track API calls, storage, etc. with per-plan limits
- ๐ Free Trials โ configurable per plan (default 14 days)
Developer & admin tools
- ๐ Feature Flags โ
<FeatureGate feature="ai-chat">per-plan toggling - ๐ CLI Auth โ device authorization flow (like
gh auth login) - ๐ API Keys โ programmatic access for integrations
- ๐ Deploy โ
corral deploy docker|fly|railway|render
๐ง The 9-Command Workflow
Your agent runs these. You don't have to.
corral analyze --json # 1. understand the project corral init --yes --json # 2. scaffold everything corral add provider google # 3. add OAuth corral add plan pro --price 29 # 4. add paid plan corral add feature ai --plans pro --gate blur # 5. gate a feature corral add meter api_calls --limit 10000 # 6. add usage meter corral stripe sync --json # 7. sync to Stripe corral validate --json # 8. verify everything corral seed --env test --json # 9. seed test users
Every command supports --json. Errors include a "fix" field. Exit 0 = deploy-ready.
๐ More Prompts to Try
Just auth, no billing:
Read: https://llama-farm.github.io/corral/llms.txt
Add authentication to my app with email + Google login.
Add to existing project:
Read: https://llama-farm.github.io/corral/llms.txt
Add Corral auth + billing to this project. Detect my
framework and embed into my existing server.
Deploy:
Read: https://llama-farm.github.io/corral/llms.txt
Generate Docker + Railway deployment configs for this app.
๐๏ธ How It Works
Corral is not a hosted service. It's a CLI that generates code into your project.
- One YAML config (
corral.yaml) โ plans, features, meters, auth providers - Embedded, not hosted โ mounts as route handlers in your app, same DB, same process
- Built on Better Auth + Stripe
- Agent-native โ
llms.txtspec,CORRAL.mdguide,--jsoneverywhere,.corral/agent-checklist.json
Supported frameworks
Express ยท Hono ยท Fastify ยท Koa ยท Hapi ยท NestJS ยท Polka ยท Restify ยท AdonisJS ยท Elysia ยท H3/Nitro ยท Next.js ยท Vite+React ยท CRA ยท FastAPI ยท Django ยท Flask
Supported databases
SQLite (default) ยท PostgreSQL ยท MySQL ยท Turso/libSQL ยท Cloudflare D1
๐ Docs
- Quickstart
- Agent Guide
- CLI Reference
- Frameworks
- Billing
- Gating
- Deploy
- llms.txt โ agent-readable spec
License
Built for agents, works for humans too ๐ฆ