Skip to content

Latest commit

History

2,276 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

bolt

AI-powered vibe coding platform — describe what you want, watch it build.

NodeTypeScriptLicense: AGPL v3

Features · Quick Start · Environment Variables · Docker · Tech Stack · Contributing

Bolt Screenshot


What is Bolt?

Bolt is a local AI-powered vibe coding platform forked from bolt.diy. Describe what you want to build in natural language, and an AI agent generates full-stack applications in a browser-based IDE with an integrated editor, terminal, and live preview.

This is a local development tool, not a hosted web service. You run it on your own machine, bring your own API keys, and keep full control of your code.


Features

  • Real-time code generation — AI streaming produces code as you watch, with live diffs applied to the editor.
  • In-browser code execution — run and preview generated applications directly in the browser via WebContainer.
  • 22+ LLM providers — OpenAI, Anthropic, Google, xAI, Groq, Mistral, DeepSeek, OpenRouter, Ollama, LM Studio, and more. Swap models mid-conversation.
  • Agent mode — handles complex multi-step tasks with autonomous planning and execution.
  • Template system — start from React, Astro, Vite + Shadcn, and other popular boilerplates, then customise with AI.
  • Git integration — built-in version control with commit, branch, and push support.
  • Smart terminal — integrated terminal with error detection and intelligent alerts that help the agent auto-fix failures.
  • Speech-to-text — dictate prompts instead of typing.
  • File upload — attach files and images to prompts for additional context.
  • Dark / light themes — system-aware theme switching.
  • Framer Motion animations — smooth chat animations and transitions.
  • Error classification — errors are categorised and routed to toast notifications or dialog windows based on severity.
  • Deploy from the UI — push to GitHub, GitLab, Netlify, or Vercel directly.

Quick Start

Prerequisites

RequirementVersion
Node.js≥ 18.18.0
pnpm9.x (see below)

Enable pnpm via Corepack:

corepack enable
corepack prepare pnpm@9.14.4 --activate

Setup

git clone https://github.com/bolt-builder/builder.git
cd Bolt
cp .env.example .env.local # add at least one API key
pnpm install
pnpm run dev

Open http://localhost:5173.

The first load can take up to two minutes while dependencies compile.


Environment Variables

Copy the example file and fill in your API keys:

cp .env.example .env.local

Or run the interactive setup wizard:

pnpm run setup

At minimum, add one AI provider key:

OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_GENERATIVE_AI_API_KEY=AI...

You can also configure providers at runtime via Settings → Providers in the UI.

See .env.example for the full list of supported variables including deployment tokens, local provider URLs, and encryption settings.

Supported LLM Providers

ProviderEnv VariableNotes
OpenAIOPENAI_API_KEYGPT-4o, o1 series
AnthropicANTHROPIC_API_KEYClaude 3.5 / 4
Google GeminiGOOGLE_GENERATIVE_AI_API_KEYGemini models
xAIXAI_API_KEYGrok models
GroqGROQ_API_KEYFast inference
MistralMISTRAL_API_KEYMistral Large / Small
DeepSeekDEEPSEEK_API_KEYDeepSeek Chat, Coder
CohereCOHERE_API_KEYCommand R+
PerplexityPERPLEXITY_API_KEYSearch-augmented
TogetherTOGETHER_API_KEYOpen-source models
FireworksFIREWORKS_API_KEYFast inference
CerebrasCEREBRAS_API_KEYFast inference
HuggingFaceHuggingFace_API_KEYInference API
OpenRouterOPEN_ROUTER_API_KEYMulti-provider routing
GitHub ModelsGITHUB_API_KEYGitHub-hosted models
MoonshotMOONSHOT_API_KEYKimi models
HyperbolicHYPERBOLIC_API_KEYHyperbolic inference
Z.aiZAI_API_KEYGLM coding models
Amazon BedrockAWS_BEDROCK_CONFIGAWS-hosted models (JSON)
OllamaOLLAMA_API_BASE_URLLocal models, no key needed
LM StudioLMSTUDIO_API_BASE_URLLocal models, no key needed
OpenAI-LikeOPENAI_LIKE_API_BASE_URLAny compatible API

See docs/LLM-PROVIDERS.md for details on configuring each provider.

Encryption

Set BOLT_ENCRYPTION_KEY to persist encrypted API-key cookies across server restarts. Generate a key with:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

If omitted, a random key is generated on each startup and cookies will not survive restarts.


Docker

No local Node.js required — just Docker.

git clone https://github.com/bolt-builder/builder.git
cd Bolt
cp .env.example .env.local # add at least one API key
docker compose up -d

Open http://localhost:5173.

Docker Commands

pnpm docker:build # Build image locally
pnpm docker:run # Run standalone container
pnpm docker:up # Start via Docker Compose
pnpm docker:down # Stop services
pnpm docker:dev # Dev mode with hot reload
pnpm docker:update # Pull latest image + restart

Compose Profiles

ProfileCommandDescription
(default)docker compose up -dProduction — pulls from GHCR
devdocker compose --profile dev upDevelopment — bind-mount with hot reload
auto-updatedocker compose --profile auto-update up -dAdds Watchtower for automatic image updates

Set BOLT_ENCRYPTION_KEY in your environment or .env.local to persist encrypted cookies across container restarts.


Tech Stack

LayerTechnology
FrameworkReact Router v7 (Remix)
UIReact 19
BuildVite 5
LanguageTypeScript 5 (strict)
StylingUnoCSS + SCSS + Radix UI
DatabaseDrizzle ORM
StateNanostores
AIVercel AI SDK (22 providers)
RuntimeWebContainer API
EditorCodeMirror 6
Terminalxterm.js
TestingVitest + Testing Library + Playwright
Package Managerpnpm 9.14.4

Development

Scripts

pnpm run dev # Start dev server (http://localhost:5173)
pnpm run build # Production build
pnpm run start # Run production build
pnpm run preview # Build + preview locally
pnpm test# Run test suite
pnpm test:watch # Tests in watch mode
pnpm run typecheck # TypeScript type check
pnpm run lint # ESLint check
pnpm run lint:fix # Auto-fix lint issues
pnpm run clean # Clean build artifacts
pnpm run update # Pull latest + install + rebuild

Updating

# From source
pnpm run update # pull, install, rebuild
pnpm run update -- --skip-build # pull + install only# Docker
pnpm docker:update # pull latest image, restart

Project Structure

Expand file tree
bolt/
├── app/
│ ├── components/ # React components
│ │ ├── @settings/ # Settings panel
│ │ ├── chat/ # Chat interface
│ │ ├── deploy/ # Deployment integrations
│ │ ├── editor/ # Code editor (CodeMirror)
│ │ ├── git/ # Git integration
│ │ ├── header/ # App header
│ │ ├── sidebar/ # Sidebar navigation
│ │ ├── templates/ # Template gallery
│ │ ├── ui/ # Shared UI components
│ │ └── workbench/ # Development workbench
│ ├── lib/
│ │ ├── .server/ # Server-only code (LLM streaming)
│ │ ├── agent/ # Agent prompts + orchestration
│ │ ├── common/ # Prompt library + shared prompts
│ │ ├── hooks/ # Custom React hooks
│ │ ├── modules/ # Feature modules (22 LLM providers)
│ │ ├── persistence/ # IndexedDB, localStorage, autoBackup
│ │ ├── runtime/ # Action runner, message parser
│ │ ├── services/ # API services
│ │ ├── stores/ # Nanostores
│ │ └── utils/ # Utilities
│ ├── routes/ # Routes (pages + API endpoints)
│ ├── styles/ # Global styles (SCSS + CSS)
│ └── types/ # TypeScript type definitions
├── docs/ # Extended documentation
├── drizzle/ # Database migrations
└── scripts/ # Build & update scripts

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Run checks: pnpm lint:fix && pnpm test
  4. Commit with a conventional message: git commit -m 'feat: add my feature'
  5. Push and open a Pull Request

See docs/CONTRIBUTING.md for detailed guidelines including code style, testing patterns, and API route conventions.


Acknowledgements

Bolt is forked from bolt.diy (originally StackBlitz bolt.new). Built with the Vercel AI SDK.


License

AGPL-3.0


Build anything with AI. Just describe what you want.

GitHub · Issues · Documentation

About

Full-stack vibe coding platform with model freedom. Any LLM, local or cloud, zero lock-in.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages