Dyad
Build AI-powered apps locally with your own keys, your own models, and zero cloud lock-in.
Dyad is a local, open-source AI app builder that runs entirely on your machine — a privacy-first alternative to Lovable, v0, Replit, and Bolt. Instead of routing your code and data through someone else’s cloud, Dyad keeps everything local: you bring your own API keys for any LLM provider (OpenAI, Anthropic, Google Gemini, Azure, Amazon Bedrock, xAI, DeepSeek, Qwen, or local models via Ollama), and your apps never leave your control.
Dyad generates full-stack React and Next.js applications through a chat interface backed by a custom XML-like tool protocol. When you prompt the AI, it responds with structured <dyad-write>, <dyad-search-replace>, and <dyad-execute-sql> tags that the app parses and applies atomically — writing files, installing dependencies, running SQL migrations, and committing to Git, all in one coordinated step. A live preview panel updates instantly as changes are applied.
Beyond basic code generation, Dyad integrates with Supabase and Neon for full-stack database and auth backends, offers built-in security scanning of generated code, and deploys directly to GitHub or Vercel with one click. A Model Context Protocol (MCP) plugin system lets you extend the AI with custom tools. The optional Dyad Pro tier adds a local agent mode that runs agentic workflows on your machine with shell-level tool access and permission hooks.
Dyad is cross-platform (macOS and Windows), requires no sign-up, and is fully open-source under Apache 2.0 for all code outside src/pro. The pro subsystem is gated under the Functional Source License, which converts to Apache 2.0 two years after each release.
What You Get
- Bring-Your-Own-Keys model access - Connect your own API keys for OpenAI, Anthropic, Google Gemini, Azure, Amazon Bedrock, xAI, DeepSeek, Qwen, or any OpenAI-compatible endpoint — plus local inference via Ollama — with no subscription or vendor lock-in.
- Git-aware AI code application - Every AI response is applied as a set of structured file writes, renames, deletes, and dependency installs, then auto-committed to a local Git repo so you have a full history of AI-generated changes.
- Live preview panel - Watch your app update in real time in an embedded browser panel as the AI edits your code, with instant refresh on every file write.
- Supabase and Neon full-stack integration - Connect to a Supabase or Neon project for database tables, authentication, and server functions; Dyad generates and runs SQL migrations automatically during chat sessions.
- Built-in security scanning - A dedicated security review mode sends your codebase to the AI with a specialized prompt to detect critical vulnerabilities and surfaces actionable fixes before you deploy.
- One-click publishing - Push your app to a GitHub repo or deploy to Vercel directly from the Dyad UI with no CLI or config files needed.
- MCP server extensibility - Add any Model Context Protocol server to give the AI access to custom tools, APIs, or data sources during code generation sessions.
- Smart Context filtering - An optional pre-pass using smaller, cheaper models filters the most relevant files from large codebases before they are sent to the main LLM, reducing cost without sacrificing quality.
Common Use Cases
- Building privacy-sensitive internal tools - A legal team builds a contract summarizer using a locally running Ollama model so client documents never leave their network.
- Prototyping full-stack SaaS apps without recurring fees - A solo founder generates a Next.js app with Supabase auth and a PostgreSQL backend, deploys to Vercel, and pays only for the LLM tokens they actually use.
- Experimenting with multiple AI models on the same project - A developer switches between Claude, GPT-4o, and Gemini mid-project to compare code quality and cost without changing any configuration.
- Creating AI-powered tools for non-technical teammates - A data analyst builds a custom CSV processing dashboard with a chat UI and hands it to their team as a self-contained Vercel deployment.
- Iterating on existing React codebases - An engineer imports an existing Next.js project into Dyad and uses chat to add features, refactor components, or debug TypeScript errors with AI assistance.
- Building demos with Supabase backends - A product designer uses Dyad to spin up a working demo app with real authentication and a live database in under an hour without writing backend code.
Under The Hood
Architecture
Dyad follows a disciplined Electron main/renderer process split where typed IPC contracts serve as the sole communication channel between the sandboxed UI and the privileged system layer. Business logic lives exclusively in the main process, organized into narrow domain handler modules covering chat, apps, Git, Supabase, Neon, MCP, and deployment — each independently testable and encapsulated. The renderer process stays purely declarative, consuming state through Jotai atoms with granular subscriptions that avoid cascade re-renders. The most architecturally interesting choice is the custom XML-like tool protocol: LLM responses carry <dyad-write>, <dyad-search-replace>, <dyad-execute-sql>, and related tags that the streaming parser and response processor handle independently, enabling the UI to visualize AI tool use in real time while the main process applies changes atomically after user approval.
Tech Stack Dyad is a TypeScript-first Electron application with six separate Vite configurations for the main process, renderer, preload script, sandbox worker, code explorer worker, and general worker targets. The renderer uses React 18 with Jotai for atomic state management and TanStack Query for async operations, while the Monaco Editor provides in-app code editing. AI provider integration is handled through the Vercel AI SDK with first-party adapters for Anthropic, OpenAI, Google, Azure, Amazon Bedrock, xAI, and generic OpenAI-compatible endpoints; local inference goes through Ollama. Data persistence uses SQLite via Drizzle ORM with typed schemas and migration files committed to the repo. Playwright drives cross-platform E2E tests while Vitest covers unit and integration tests; Biome and Oxlint enforce consistent style throughout.
Code Quality
The codebase demonstrates comprehensive testing discipline with extensive Playwright E2E specs covering real user flows — app creation, GitHub import, Supabase setup, MCP consent, backup restore, and dozens more — alongside Vitest unit tests for core logic modules. Type safety is enforced end-to-end through strict TypeScript with Zod schemas for runtime validation of all settings and IPC message shapes. Error handling uses a custom DyadError class with a typed DyadErrorKind discriminated union, making failure modes explicit rather than relying on string matching. The architecture itself improves testability: narrow IPC handler modules are easy to mock at boundaries, and the Jotai atom model keeps UI state deterministic. Documentation coverage is solid with a dedicated docs/ directory that includes architecture guides, an agent architecture walkthrough, security notes, and i18n guidance.
What Makes It Unique
Dyad’s most deliberate technical differentiation is its custom XML-like tool tag protocol embedded in streamed LLM text, chosen over standard function-calling because it allows multiple tool invocations to stream in parallel and avoids the code quality penalties of forcing LLMs to emit code inside JSON strings. This same streaming protocol powers the live preview: the custom Markdown parser recognizes <dyad-write> tags mid-stream and updates the file tree visualization before the response is complete. The dual-licensing split — Apache 2.0 for core, FSL-1.1 for src/pro converting to Apache 2.0 after two years — is unusual in the AI tools space and signals a long-term commitment to open-source while funding development through a Pro tier. The local agent mode runs a sandboxed subprocess with a shell-level permission hook architecture that brings agentic workflows entirely on-device, avoiding the per-request cloud costs that make hosted agentic systems expensive.
Self-Hosting
Dyad uses a dual-license model. All code outside src/pro is released under Apache 2.0, which permits commercial use, modification, distribution, and private use with no restrictions beyond attribution. The src/pro directory is licensed under the Functional Source License 1.1 (FSL-1.1-ALv2), a fair-source license that prohibits building a competing commercial product or service using the pro code. Critically, every FSL-licensed release converts automatically to Apache 2.0 two years after its publication date — meaning the pro code will eventually be fully open-source. For self-hosters who only need the core app builder features, the Apache 2.0 portion covers the complete AI chat, file editing, Git integration, Supabase/Neon connectors, MCP support, and Vercel deployment workflows.
Running Dyad yourself is intentionally lightweight. It is a standard Electron desktop application: download the binary for macOS or Windows, create a local userData directory for the SQLite database, and start it. There is no server to operate, no container to manage, and no infrastructure to provision — your machine is the entire stack. Dyad stores all app files, chat history, and settings locally. You are responsible for keeping the application updated (auto-update is built in via update-electron-app), backing up your userData directory, and managing your own API key rotation. The backup manager built into Dyad handles versioned snapshots of your app state, but filesystem-level backups of userData are your responsibility.
The trade-off versus a managed hosted builder like Lovable or v0 is real-time collaborative editing, built-in usage billing dashboards, and first-party support SLAs. Dyad Pro adds Claude Code-style local agent mode, smart context filtering, and access to Dyad-managed compute credits if you prefer not to supply your own API keys — but these remain on your machine rather than routing through a shared cloud environment. Community support is available through the r/dyadbuilders subreddit and GitHub issues; there is no enterprise support contract or SLA offered at this time.
Related Apps
n8n
Automation · No Code Platforms
Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.
n8n
Otherclaw-code
AI Agents · AI Code Assistants
A Rust-built CLI agent harness for Claude AI with persistent sessions, MCP tool integration, plugin hooks, and multi-provider support — designed to run autonomous coding workflows without human babysitting.
claw-code
MITAutoGPT
Automation · Productivity · AI Assistants
Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.