cloudflare / vibesdk
- ะฒัะพัะฝะธะบ, 9 ะดะตะบะฐะฑัั 2025โฏะณ. ะฒ 00:00:02
An open-source vibe coding platform that helps you build your own vibe-coding platform, built entirely on Cloudflare stack
An open source full-stack AI webapp generator โ Deploy your own instance of Cloudflare VibeSDK, an AI vibe coding platform that you can run and customize yourself.
Explore VibeSDK Build before deploying your own stack.
๐ Click to deploy your own instance!
Follow the setup guide below to configure required services
Cloudflare VibeSDK is an open source AI vibe coding platform built on Cloudflare's developer platform. If you're building an AI-powered platform for building applications, this is a great example that you can deploy and customize to build the whole platform yourself. Once the platform is deployed, users can say what they want to build in natural language, and the AI agent will create and deploy the application.
๐ Experience it live at build.cloudflare.dev โ Try it out before deploying your own instance!
Run your own solution that allows users to build applications in natural language. Customize the AI behavior, control the generated code patterns, integrate your own component libraries, and keep all customer data within your infrastructure. Perfect for startups wanting to enter the AI development space or established companies adding AI capabilities to their existing developer tools.
Enable non-technical teams to create the tools they need without waiting for engineering resources. Marketing can build landing pages, sales can create custom dashboards, and operations can automate workflows, all by describing what they want.
Let your customers extend your product's functionality without learning your API or writing code. They can describe custom integrations, build specialized workflows, or create tailored interfaces specific to their business needs.
๐ค AI Code Generation โ Phase-wise development with intelligent error correction
โก Live Previews โ App previews running in sandboxed containers
๐ฌ Interactive Chat โ Guide development through natural conversation
๐ฑ Modern Stack โ Generates React + TypeScript + Tailwind apps
๐ One-Click Deploy โ Deploy generated apps to Workers for Platforms
๐ฆ GitHub Integration โ Export code directly to your repositories
Cloudflare VibeSDK Build utilizes the full Cloudflare developer ecosystem:
Before clicking "Deploy to Cloudflare", have these ready:
abc.xyz.com so Cloudflare can issue the required wildcard certificate for preview apps on *.abc.xyz.com)Once you click "Deploy to Cloudflare", you'll be taken to your Cloudflare dashboard where you can configure your VibeSDK deployment with these variables.
GOOGLE_AI_STUDIO_API_KEY - Your Google Gemini API key for Gemini modelsJWT_SECRET - Secure random string for session managementWEBHOOK_SECRET - Webhook authentication secretSECRETS_ENCRYPTION_KEY - Encryption key for secretsSANDBOX_INSTANCE_TYPE - Container performance tier (optional, see section below)ALLOWED_EMAIL - Email address of the user allowed to use the app. This is used to verify the user's identity and prevent unauthorized access.CUSTOM_DOMAIN - Custom domain for your app that you have configured in Cloudflare (Required). If you use a first-level subdomain such as abc.xyz.com, make sure the Advanced Certificate Manager add-on is active on that zone.To serve preview apps correctly, add the following DNS record in the zone that hosts CUSTOM_DOMAIN:
CNAME*.abcabc.xyz.com (replace with your base custom domain or another appropriate origin)Adjust the placeholder abc/xyz parts to match your domain. DNS propagation can take timeโexpect it to take up to an hour before previews resolve. This step may be automated in a future release, but it is required today.
VibeSDK uses Cloudflare Containers to run generated applications in isolated environments. You can configure the container performance tier based on your needs and Cloudflare plan.
๐ข Updated Oct 2025: Cloudflare now offers larger container instance types with more resources!
| Instance Type | Memory | CPU | Disk | Use Case | Availability |
|---|---|---|---|---|---|
lite (alias: dev) |
256 MiB | 1/16 vCPU | 2 GB | Development/testing | All plans |
standard-1 (alias: standard) |
4 GiB | 1/2 vCPU | 8 GB | Light production apps | All plans |
standard-2 |
8 GiB | 1 vCPU | 12 GB | Medium workloads | All plans |
standard-3 |
12 GiB | 2 vCPU | 16 GB | Production apps | All plans (Default) |
standard-4 |
12 GiB | 4 vCPU | 20 GB | High-performance apps | All plans |
Option A: Via Deploy Button (Recommended) During the "Deploy to Cloudflare" flow, you can set the instance type as a build variable:
SANDBOX_INSTANCE_TYPEstandard-3 (default, best balance)standard-4Option B: Via Environment Variable For local deployment or CI/CD, set the environment variable:
export SANDBOX_INSTANCE_TYPE=standard-3 # or standard-4, standard-2, standard-1, lite
bun run deployFor All Users:
standard-3 (Recommended) - Best balance for production apps with 2 vCPU and 12 GiB memorystandard-4 - Maximum performance with 4 vCPU for compute-intensive applicationsThe SANDBOX_INSTANCE_TYPE controls:
๐ก Pro Tip: Start with
standard-3(the new default) for the best balance of performance and resources. Upgrade tostandard-4if you need maximum CPU performance for compute-intensive applications.
OAuth configuration is not shown on the initial deploy page. If you want user login features, you'll need to set this up after deployment:
How to Add OAuth After Deployment:
bun install.dev.vars and .prod.vars files (see below for OAuth configuration)bun run deploy to update your deploymentGoogle OAuth Setup:
https://your-custom-domain.https://your-worker-name.workers.dev/api/auth/callback/google.dev.vars (for local development) and .prod.vars (for deployment):
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"GitHub OAuth Setup:
Cloudflare VibeSDKhttps://your-worker-name.workers.devhttps://your-worker-name.workers.dev/api/auth/callback/github.dev.vars (for local development) and .prod.vars (for deployment):
GITHUB_CLIENT_ID="your-github-client-id"
GITHUB_CLIENT_SECRET="your-github-client-secret"GitHub Export OAuth Setup:
VibeSDK Export)โdo not reuse the login app above.https://your-worker-name.workers.dev/api/github-exporter/callback (or your custom domain equivalent)..dev.vars and .prod.vars:
GITHUB_EXPORTER_CLIENT_ID="your-export-client-id"
GITHUB_EXPORTER_CLIENT_SECRET="your-export-client-secret"graph TD
A[User Describes App] --> B[AI Agent Analyzes Request]
B --> C[Generate Blueprint & Plan]
C --> D[Phase-wise Code Generation]
D --> E[Live Preview in Container]
E --> F[User Feedback & Iteration]
F --> D
D --> G[Deploy to Workers for Platforms]
Want to see these prompts in action? Visit the live demo at build.cloudflare.dev first, then try them on your own instance once deployed:
๐ฎ Fun Apps
"Create a todo list with drag and drop and dark mode"
"Build a simple drawing app with different brush sizes and colors"
"Make a memory card game with emojis"
๐ Productivity Apps
"Create an expense tracker with charts and categories"
"Build a pomodoro timer with task management"
"Make a habit tracker with streak counters"
๐จ Creative Tools
"Build a color palette generator from images"
"Create a markdown editor with live preview"
"Make a meme generator with text overlays"
๐ ๏ธ Utility Apps
"Create a QR code generator and scanner"
"Build a password generator with custom options"
"Make a URL shortener with click analytics"
class CodeGeneratorAgent extends DurableObject {
async generateCode(prompt: string) {
// Persistent state across WebSocket connections
// Phase-wise generation with error recovery
// Real-time progress streaming to frontend
}
}// Generated apps deployed to dispatch namespace
export default {
async fetch(request, env) {
const appId = extractAppId(request);
const userApp = env.DISPATCHER.get(appId);
return await userApp.fetch(request);
}
};Cloudflare VibeSDK generates apps in intelligent phases:
main branch trigger automatic deployments; CI/CD is already wired up for you..dev.vars.example to .prod.vars, fill in production-only secrets, and run bun run deploy. The deploy script reads from .prod.vars.DNS updates made during setup, including the wildcard CNAME record described above, can take a while to propagate. Wait until the record resolves before testing preview apps.
You can run VibeSDK locally by following these steps:
# Clone the repository
git clone https://github.com/cloudflare/vibesdk.git
cd vibesdk
# Install dependencies
npm install # or: bun install, yarn install, pnpm install
# Run automated setup
npm run setup # or: bun run setupThe setup script will guide you through:
๐ Complete Setup Guide - Detailed setup instructions and troubleshooting
After setup, start the development server:
If you're deploying manually using bun run deploy, you must set these environment variables:
Cloudflare API Token & Account ID:
Get your Account ID:
Create an API Token:
Set the environment variables:
export CLOUDFLARE_API_TOKEN="your-api-token-here"
export CLOUDFLARE_ACCOUNT_ID="your-account-id-here"Note: These credentials are automatically provided when using the "Deploy to Cloudflare" button, but are required for manual
bun run deploy.
For Local Development (.dev.vars):
bun run devVisit http://localhost:5173 to access VibSDK locally.
For Production Deployment (.prod.vars):
cp .dev.vars.example .prod.vars
# Edit .prod.vars with your production API keys and tokensDeploy to Cloudflare Workers:
bun run deploy # Builds and deploys automatically (includes remote DB migration)cp .dev.vars.example .dev.vars"default" if not neededwrangler secret put ANTHROPIC_API_KEY
wrangler secret put OPENAI_API_KEY
wrangler secret put GOOGLE_AI_STUDIO_API_KEY
# ... etcThe deployment system follows this priority order:
Example: If MAX_SANDBOX_INSTANCES is set both as an environment variable (export MAX_SANDBOX_INSTANCES=5) and in wrangler.jsonc ("MAX_SANDBOX_INSTANCES": "2"), the environment variable value (5) will be used.
Cloudflare VibeSDK implements enterprise-grade security:
๐ซ "Insufficient Permissions" Error
๐ค "AI Gateway Authentication Failed"
๐๏ธ "Database Migration Failed"
๐ "Missing Required Variables"
ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_AI_STUDIO_API_KEY, JWT_SECRETCLOUDFLARE_AI_GATEWAY_TOKEN should be set as BOTH build variable and worker secret๐ค "AI Gateway Not Found"
vibesdk-gateway (or your custom name)๐๏ธ "Container Instance Type Issues"
lite/standard-1 to standard-3 (default) or standard-4 instance typestandard-2 to standard-3 or standard-4) or check for memory leaks in generated appsstandard-3 or standard-4 for faster build times with more CPU coresdev and standard aliases still work but map to lite and standard-1 respectivelyWant to contribute to Cloudflare VibeSDK? Here's how:
bun run testMIT License - see LICENSE for details.