# Cloudflare VibeSDK

> Deploy your own text-to-app platform, agent and previews included, on Cloudflare

- Category: AI Coding / Autonomous Coding Agents
- Language: TypeScript
- Licence: MIT
- Repository: https://github.com/cloudflare/vibesdk
- Website: https://build.cloudflare.dev
- Canonical page: https://ai-tldr.dev/tools/vibesdk/

## In short

Cloudflare VibeSDK is Deploy your own text-to-app platform, agent and previews included, on Cloudflare. A user describes what they want, answers the agent's clarifying questions, and then watches it plan, edit files, deploy previews, inspect errors and iterate with them in the loop. It sits in the Autonomous Coding Agents category of the AI Coding tools and is open-source, written in TypeScript and licensed MIT.

## Overview

VibeSDK is Cloudflare's open-source agentic platform for building and deploying full-stack applications — and, as the project puts it, for building your own vibe-coding platform. A user describes what they want, answers the agent's clarifying questions, and then watches it plan, edit files, deploy previews, inspect errors and iterate with them in the loop.

The whole workflow runs on Cloudflare primitives rather than on a long-running dev server, which is what makes it self-hostable as a product rather than a demo. A `ThinkAgent` Durable Object runs the model-and-tool loop; a `SpaceDO` Durable Object gives each project an isolated workspace and file layer; Cloudflare Artifacts stores commits, branches, history and restore points; the Worker Loader binding loads bundled code as a Dynamic Worker preview; each generated app gets a Durable Object Facet with its own SQLite storage; and AI Gateway routes the configured model providers with centralised observability and caching.

The agent's loop is explicit: understand, build, save, deploy, verify, repair, stream. Its tools read and edit the workspace, create restore points, deploy previews, inspect browser console output and ask clarifying questions — and bash access is deliberately disabled. Rollback restores a chosen commit into the current branch as a new commit and redeploys, rather than rewriting history, and users can export a generated project to continue outside VibeSDK.

## What it does

- Agentic code generation through an iterative model-and-tool loop rather than a fixed sequence of generation phases
- Human-in-the-loop clarification — the agent asks structured questions when a request is underspecified
- Dynamic Worker previews: each committed deployment is bundled and loaded without a long-running dev server
- Browser verification built into the loop — inspect console output, repair runtime errors, redeploy
- Per-app isolated SQLite storage via a Durable Object Facet, with database inspection and reset controls
- Git-backed version history in Cloudflare Artifacts with restore points and non-destructive rollback
- Model flexibility through AI Gateway, plus project export to continue development elsewhere

## Getting started

The fastest route is the Deploy to Cloudflare flow from the repository. Running it locally needs Node 18+, Bun and a Cloudflare account with an API token.

1. Know what the deploy needs

   Before the Deploy to Cloudflare flow: a Cloudflare account with the required Workers features, a Workers Paid plan and Workers for Platforms access for production app previews, an API token covering the resources setup creates, credentials for at least one supported model provider (unless you use provider keys stored in AI Gateway), and a custom domain for production. The setup guide in docs/setup.md has the current permission, DNS and provider details.

2. Clone and install

```bash
git clone https://github.com/cloudflare/vibesdk.git
cd vibesdk
bun install
```

3. Run setup

   The setup script configures local and production environments, Cloudflare resources, AI Gateway and model providers, authentication, and database migrations.

```bash
bun run setup
```

4. Start the dev server

   Then open http://localhost:5173.

```bash
bun run dev
```

## When to use it

- Run your own branded text-to-app builder instead of reselling a hosted one, with the agent, previews and storage under your Cloudflare account
- Give non-developers a way to describe an internal tool and get a working, previewable app with its own database
- Study a production agentic coding loop end to end — tools, restore points, browser verification, repair — with the source in hand
- Prototype full-stack apps with disposable isolated previews per project, then export the ones worth keeping
