### Bolt.diy LLM Model Selection Guide Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md A guide to selecting the appropriate LLM for your needs in bolt.diy, categorizing models by performance for production, speed, advanced reasoning, and self-hosting capabilities. ```bash Use Claude/GPT-4o for complex applications Use Gemini for fast prototyping Use local models for privacy/offline development Always test with your specific use case ``` -------------------------------- ### Bolt.diy Project Scaffolding with Templates Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Learn how to start a new project in bolt.diy using pre-configured templates for various frameworks and technologies. The AI scaffolds your project with best practices, including tooling, linting, and build processes. ```bash Start a new project in bolt.diy Browse available templates in the starter selection Choose your preferred technology stack The AI will scaffold your project with best practices ``` -------------------------------- ### Troubleshoot Deployment Failures Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Guides users through resolving deployment errors by checking build logs, verifying environment variables, testing locally, confirming platform-specific requirements, and reviewing deployment configurations. -------------------------------- ### Accessing Bolt.diy Help and Documentation Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Bolt.diy offers multiple avenues for users to access help and documentation. This includes a prominent help icon in the sidebar for direct access to guides, troubleshooting, and FAQs, as well as dedicated online resources like the main documentation, FAQ section, and troubleshooting guides. Community support is also available through GitHub Issues and a community forum. -------------------------------- ### Start Bolt.DIY Development Server Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Starts the development server for the Bolt.DIY application using pnpm. ```bash pnpm run dev ``` -------------------------------- ### Bolt.diy: Setup Using Git Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Detailed steps for developers to set up the bolt.diy project using Git, which includes cloning the repository and installing necessary dependencies for development. ```Shell git clone https://github.com/stackblitz-labs/bolt.diy.git cd bolt.diy npm install # Further development commands... ``` -------------------------------- ### Run Development Server Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Starts the development server for the bolt.diy project. ```bash pnpm run dev ``` -------------------------------- ### Run with Docker Compose (Development) Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Starts the application and its services using Docker Compose in a development profile. This orchestrates multiple containers for a development setup. ```bash docker compose --profile development up ``` -------------------------------- ### Build and Start for Production Testing Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Builds the project for production and then starts it locally. This allows for testing the production environment before actual deployment. ```bash pnpm run preview ``` -------------------------------- ### Run Development Server Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/CONTRIBUTING.md Starts the development server for the bolt.diy project. ```bash pnpm run dev ``` -------------------------------- ### Start Development Server Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Starts the development server with hot reloading for the Remix Vite project. Requires Google Chrome Canary for local execution. ```bash pnpm run dev ``` -------------------------------- ### Optimizing Bolt.diy Results with Best Practices Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md To achieve optimal results with bolt.diy, users should follow specific strategies for project setup and development. This involves being detailed in prompts, utilizing project templates, configuring LLM providers correctly, using the enhance prompt feature, scaffolding basics first, and batching simple instructions. Advanced users can leverage MCP tools, connect databases like Supabase, use Git integration, and deploy easily via Vercel, Netlify, or GitHub Pages. -------------------------------- ### Start Docker Container with Bindings Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Starts the Docker container with proper bindings. This ensures correct network and volume configurations for the running container. ```bash pnpm run dockerstart ``` -------------------------------- ### Coolify Deployment Start Command Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Specifies the start command for deploying the application using Coolify with Docker Compose in production mode. ```bash docker compose --profile production up ``` -------------------------------- ### Install Dependencies with pnpm Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Installs all project dependencies using the pnpm package manager. ```bash pnpm install ``` -------------------------------- ### Troubleshoot Miniflare or Wrangler Errors on Windows Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Provides solutions for Miniflare or Wrangler errors on Windows development environments. It recommends installing a specific version of Visual Studio C++ and links to relevant GitHub issues for more details. -------------------------------- ### Run Docker Compose for Development Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/CONTRIBUTING.md Starts the development environment using Docker Compose with the 'development' profile. ```bash docker compose --profile development up ``` -------------------------------- ### Run Docker Compose for Production Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/CONTRIBUTING.md Starts the production environment using Docker Compose with the 'production' profile. ```bash docker compose --profile production up ``` -------------------------------- ### Start Bolt.diy Development Server Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Starts the Remix Vite development server for the Bolt.diy application. This command is used for local development and allows for hot reloading. ```bash pnpm run dev ``` -------------------------------- ### Install Dependencies with pnpm Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/CONTRIBUTING.md Installs all project dependencies using the pnpm package manager. ```bash pnpm install ``` -------------------------------- ### Clean Installation Troubleshooting Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md A troubleshooting step for Git setup issues that involves removing node_modules and lock files, pruning the pnpm cache, and reinstalling dependencies. ```bash # Remove node modules and lock files rm -rf node_modules pnpm-lock.yaml # Clear pnpm cache pnpm store prune # Reinstall dependencies pnpm install ``` -------------------------------- ### Project Templates - React + Vite Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Bootstrap projects quickly with pre-configured templates. This example uses React with Vite for a modern setup, including TypeScript support. ```Shell npm create vite@latest my-react-app --template react-ts ``` -------------------------------- ### Deploying Projects with Bolt.diy Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Bolt.diy facilitates one-click deployment to multiple platforms including Vercel, Netlify, and GitHub Pages. Users can connect their accounts in Settings → Connections and deploy instantly. The platform offers features like automatic build configuration, environment variable management, custom domain support, and preview deployments. -------------------------------- ### Set Up Environment Variables Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Configures local environment variables by renaming an example file and adding necessary API keys and settings. ```bash GROQ_API_KEY=XXX HuggingFace_API_KEY=XXX OPENAI_API_KEY=XXX ... VITE_LOG_LEVEL=debug DEFAULT_NUM_CTX=32768 ``` -------------------------------- ### Setup Husky for Git Hooks Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Sets up Husky for managing Git hooks. This script ensures that Git hooks are properly installed and configured for the project. ```bash pnpm run prepare ``` -------------------------------- ### Bolt.diy: Quick Installation Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md A streamlined process for quickly installing and setting up bolt.diy, likely involving a single command or a minimal set of steps. ```Shell # Quick installation commands would be provided here, possibly a one-liner or a simple script execution. ``` -------------------------------- ### Coolify Docker Compose Start Command Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/CONTRIBUTING.md Specifies the command to start the application when using Coolify with Docker Compose for production deployment. ```bash docker compose --profile production up ``` -------------------------------- ### Setup Environment Variables Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/CONTRIBUTING.md Configures local environment variables by renaming .env.example to .env.local and adding necessary API keys. Also shows how to copy to .env for Docker. ```bash GROQ_API_KEY=XXX HuggingFace_API_KEY=XXX OPENAI_API_KEY=XXX ... ``` ```bash # Option 1: Use the setup script ./scripts/setup-env.sh # Option 2: Manual copy cp .env.local .env ``` -------------------------------- ### Bolt.diy: Manual Installation Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Provides instructions for manually installing bolt.diy, which may involve downloading specific files or executing commands to set up the project environment. ```Shell # Manual installation steps would be detailed here, potentially involving specific file downloads or configurations. ``` -------------------------------- ### Bolt.diy Supabase Database Integration Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Discover how to integrate Supabase for backend database functionality in bolt.diy. This includes setting up a Supabase project, configuring connections, and utilizing features like real-time subscriptions and authentication. ```bash Create a Supabase project at supabase.com Get your project URL and API keys Configure the connection in your bolt.diy project Use Supabase tools to interact with your database ``` -------------------------------- ### Run Development Docker Container (Compose) Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Starts the development Docker container using Docker Compose with the development profile. ```bash docker compose --profile development up ``` -------------------------------- ### Run Production Docker Container (Compose) Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Starts the production Docker container using Docker Compose with the production profile. ```bash docker compose --profile production up ``` -------------------------------- ### Setup Husky for Git Hooks Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Initializes and sets up Husky, a tool for managing Git hooks. This ensures that pre-commit checks and other hooks are functional. ```bash pnpm run prepare ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Installs all necessary project dependencies using pnpm, which is required before running the development server or building the project. ```bash pnpm install ``` -------------------------------- ### Troubleshoot WebContainer Preview Loading Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Helps resolve issues where the live preview within WebContainer is not loading. Steps include checking WebContainer status, verifying Node.js compatibility, restarting the environment, clearing browser cache, and checking for port conflicts. -------------------------------- ### Start Development Server Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Starts the development server for the project. This script is typically used during the development phase to enable live reloading and other development-specific features. ```bash pnpm run dev ``` -------------------------------- ### Integrating Git and GitHub with Bolt.diy Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Bolt.diy provides comprehensive Git and GitHub integration for version control. Users can import repositories, create new ones on GitHub, and benefit from automatic commits and seamless push/pull operations. Connecting a GitHub account in Settings → Connections enables importing from repositories, diff visualization, and collaborative development support. -------------------------------- ### Install Project Dependencies with pnpm Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Installs all the necessary dependencies for the project using the pnpm package manager. ```bash pnpm install ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Installs all necessary project dependencies using the pnpm package manager. This command should be run after cloning the repository or updating dependencies. ```bash pnpm install ``` -------------------------------- ### Configure API Keys via Environment Variables Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md This snippet shows how to set up API keys for various AI providers using environment variables in a .env.local file. This is the recommended method for production environments to securely manage credentials. ```bash ANTHROPIC_API_KEY=your_anthropic_key_here OPENAI_API_KEY=your_openai_key_here GOOGLE_GENERATIVE_AI_API_KEY=your_google_key_here MOONSHOT_API_KEY=your_moonshot_key_here XAI_API_KEY=your_xai_key_here ``` -------------------------------- ### Start Development Server Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Starts the development server for Bolt.DIY, typically used for local development and testing. The WebUI is usually accessible at http://localhost:5173. ```bash pnpm run dev ``` -------------------------------- ### Troubleshoot Custom LLM Provider Not Showing Up Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Guides users on how to fix issues where a custom LLM provider is not appearing in the application. Solutions include restarting the development server, checking the provider registry, verifying class extensions, and looking for console errors. ```TypeScript app/lib/modules/llm/registry.ts ``` -------------------------------- ### Bolt.diy WebContainer Development Environment Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Understand how WebContainer provides a secure, isolated development environment within bolt.diy. It supports full Node.js, live file system manipulation, and terminal integration for various technologies and build tools. ```bash Isolated Environment: Secure sandbox for running code Full Node.js Support: Run npm, build tools, and dev servers Live File System: Direct manipulation of project files Terminal Integration: Execute commands with real-time output ``` -------------------------------- ### Troubleshoot Git Integration Issues Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Offers solutions for common Git integration problems such as GitHub connection failures, repository not found errors, push/pull failures, merge conflicts, and large file rejections. It emphasizes checking token permissions, repository URLs, and access rights. -------------------------------- ### Troubleshoot Missing x-api-key Header Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Resolves authentication errors caused by a missing 'x-api-key' header. Solutions include restarting containers, switching run methods between Docker and pnpm, verifying API key configuration, and clearing browser cache. ```Shell docker compose restart ``` -------------------------------- ### Install pnpm Package Manager Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Installs the pnpm package manager globally using npm. pnpm is a performant package manager for Node.js. ```bash npm install -g pnpm ``` -------------------------------- ### Build Electron App for Windows Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Builds the Electron application for the Windows platform. This generates an executable installer or package for Windows. ```bash pnpm electron:build:win ``` -------------------------------- ### Add New LLM Provider in Bolt.DIY Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md This outlines the steps to integrate a new Large Language Model (LLM) provider into the Bolt.DIY framework. It involves creating a provider class, implementing the BaseProvider interface, and registering it in the LLM registry. ```typescript 1. Create a Provider Class in `app/lib/modules/llm/providers/your-provider.ts` 2. Implement the BaseProvider interface with your provider's specific logic 3. Register the provider in `app/lib/modules/llm/registry.ts` 4. The system automatically detects and registers your new provider ``` -------------------------------- ### Run Bolt.diy Locally Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Instructions for setting up and running the bolt.diy project locally. This typically involves cloning the repository, installing dependencies, and running development scripts. ```Shell git clone https://github.com/stackblitz-labs/bolt.diy.git cd bolt.diy npm install npm run dev ``` -------------------------------- ### Improve AI Response Quality Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Suggests methods to enhance the quality of AI-generated results. This includes switching to more capable models, providing more specific prompts, using prompt enhancement features, breaking down complex tasks, and offering project context. -------------------------------- ### Bolt.diy: Available Scripts Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Lists the available npm scripts for managing the bolt.diy project, such as starting the development server, building the project, and running tests. ```Shell npm run dev npm run build npm test npm run lint ``` -------------------------------- ### Run Bolt.DIY Container with Docker Compose Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Starts the Bolt.DIY application in a Docker container using Docker Compose with the 'development' profile. ```bash docker compose --profile development up ``` -------------------------------- ### Troubleshoot Blank Preview in Bolt.DIY Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Addresses issues where the preview pane appears blank, often due to code generation problems. Recommendations include checking the developer console for JavaScript errors, ensuring the WebContainer is running, refreshing the preview, and checking for hallucinated code. -------------------------------- ### Install pnpm Dependency Manager Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Installs the pnpm package manager globally using npm. pnpm is a fast, disk-space-efficient package manager that enforces a flattened node_modules structure. ```bash sudo npm install -g pnpm ``` -------------------------------- ### Troubleshoot MCP Server Connection Failures Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Provides steps to resolve 'MCP server connection failed' errors. This involves verifying server configuration, checking endpoints and credentials, testing connectivity externally, reviewing server logs, and ensuring protocol version compatibility. -------------------------------- ### Run Bolt.diy with Docker Compose Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Starts the Bolt.diy application using Docker Compose with the development profile. This enables hot reloading for code changes within the container. ```bash docker compose --profile development up ``` -------------------------------- ### Using Model Context Protocol (MCP) Tools in Bolt.diy Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Model Context Protocol (MCP) extends bolt.diy's AI capabilities by enabling interaction with external tools and services. Users can set up MCP by configuring server endpoints and authentication in the Settings → MCP tab. Available MCP capabilities include database connections, file system operations, API integrations, and custom business logic tools, allowing the AI to access external data and services. -------------------------------- ### Run Docker Container Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Starts and runs a Docker container. This command is used to execute the application within a Docker environment. ```bash pnpm run dockerrun ``` -------------------------------- ### Bolt.diy: Configuring API Keys Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Guides users on how to configure API keys for various AI providers supported by bolt.diy, enabling the use of different LLMs for prompts. ```Shell # Configuration of API keys typically involves setting environment variables or editing a configuration file. # Example: export OPENAI_API_KEY='your-openai-api-key' ``` -------------------------------- ### Run Docker Container Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Runs the Docker container. This command starts the application within a Docker environment. ```bash pnpm run dockerrun ``` -------------------------------- ### Rebuild and Run Bolt.diy with Docker Compose Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Rebuilds the Docker image and starts the Bolt.diy application using Docker Compose with the development profile. The --build flag ensures that any changes are reflected in the new image. ```bash docker compose --profile development up --build ``` -------------------------------- ### Project Templates - Qwik Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Starter template for Qwik projects, a resumable framework designed for instant loading performance. ```Shell npm create qwik@latest my-qwik-app -- --style=css --library=qwik ``` -------------------------------- ### Resolve Windows Access Violation Error Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/FAQ.md Addresses the Windows-specific error 'Received structured exception #0xc0000005: access violation'. The solution involves updating the Visual C++ Redistributable. -------------------------------- ### Project Templates - SolidJS Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Starter template for SolidJS projects, a reactive framework with fine-grained updates. ```Shell npm create vite@latest my-solid-app --template solid-ts ``` -------------------------------- ### Netlify Deployment Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Deploy projects to Netlify with one click. Supports automatic build configuration and optimization, with preview deployments for every change. ```Shell netlify deploy --prod ``` -------------------------------- ### Project Templates - Remix Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Starter template for Remix projects, a full-stack React framework. ```Shell npx create-remix@latest my-remix-app ``` -------------------------------- ### Run Test Suite Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/CONTRIBUTING.md Executes the project's test suite. ```bash pnpm test ``` -------------------------------- ### Project Templates - Astro Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Starter template for Astro projects, a static site generator focused on content-rich websites. ```Shell npm create astro@latest my-astro-site ``` -------------------------------- ### Deploy to Cloudflare Pages Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Deploys the bolt.diy project to Cloudflare Pages using a pnpm script. Requires Wrangler configuration and appropriate permissions. ```bash pnpm run deploy ``` -------------------------------- ### Deploy to Cloudflare Pages Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/CONTRIBUTING.md Deploys the project to Cloudflare Pages using the pnpm deploy command. Requires Wrangler configuration and appropriate permissions. ```bash pnpm run deploy ``` -------------------------------- ### Project Templates - Svelte Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Starter template for Svelte projects, a compiler-based framework for fast applications. ```Shell npm create svelte@latest my-svelte-app ``` -------------------------------- ### Clone Bolt.DIY Repository Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Clones the stable branch of the Bolt.DIY project from GitHub. This is the initial step for developers to get the project code. ```bash git clone -b stable https://github.com/stackblitz-labs/bolt.diy.git ``` -------------------------------- ### Deploy to Cloudflare Pages Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Builds the project and deploys it to Cloudflare Pages. This command handles the entire deployment process. ```bash pnpm run deploy ``` -------------------------------- ### Project Templates - Next.js with shadcn/ui Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Starter template for Next.js with shadcn/ui, a React framework featuring reusable UI components. ```Shell npx create-next-app@latest --typescript --eslint --tailwind --src-dir --app --import-alias "@/*" cd my-next-app npx shadcn-ui@latest init ``` -------------------------------- ### Build Electron Desktop App for All Platforms Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Electron desktop application for Bolt.DIY for all supported platforms. ```bash pnpm electron:build:dist ``` -------------------------------- ### Project Templates - Angular Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Starter template for Angular projects, an enterprise-ready framework. ```Shell ng new my-angular-app ``` -------------------------------- ### Build Production Docker Image (Helper Script) Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Builds the Docker image for the production environment using a helper script. ```bash # Production build npm run dockerbuild:prod ``` -------------------------------- ### Run Test Suite Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Executes the project's test suite to ensure code quality and functionality. ```bash pnpm test ``` -------------------------------- ### Build Development Docker Image (Helper Script) Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Builds the Docker image for the development environment using a helper script. ```bash # Development build npm run dockerbuild ``` -------------------------------- ### Clone bolt.diy Repository Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Clones the bolt.diy project repository from GitHub to your local machine. ```bash git clone https://github.com/stackblitz-labs/bolt.diy.git ``` -------------------------------- ### Vercel Deployment Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Connect your Vercel account and deploy projects with a single click. bolt.diy handles automatic builds and deployments, providing a live URL via Vercel's CDN. ```Shell vercel deploy --prod ``` -------------------------------- ### Run Test Suite Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Executes the project's test suite using Vitest. This command verifies the functionality of the application. ```bash pnpm test ``` -------------------------------- ### Project Templates - Nuxt Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Starter template for Nuxt projects, a meta-framework for Vue.js applications. ```Shell npx nuxi init my-nuxt-app ``` -------------------------------- ### Deploy Project Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Deploys the project to Cloudflare Pages. This is the command used to push the application to a live environment. ```bash pnpm run deploy ``` -------------------------------- ### Build Project for Production Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Builds the project for production deployment. This command compiles and optimizes the application assets. ```bash pnpm run build ``` -------------------------------- ### Clone bolt.diy Repository Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/CONTRIBUTING.md Clones the bolt.diy project repository from GitHub to your local machine. ```bash git clone https://github.com/stackblitz-labs/bolt.diy.git ``` -------------------------------- ### Build Electron Desktop App for Linux Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Electron desktop application for Bolt.DIY specifically for Linux. ```bash pnpm electron:build:linux ``` -------------------------------- ### Build Project Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the project for production. This command compiles and optimizes the project's assets, preparing it for deployment. ```bash pnpm run build ``` -------------------------------- ### Project Templates - Vue.js Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Starter template for Vue.js projects, a progressive JavaScript framework. ```Shell npm create vue@latest ``` -------------------------------- ### Build Electron Desktop App for Windows Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Electron desktop application for Bolt.DIY specifically for Windows. ```bash pnpm electron:build:win ``` -------------------------------- ### Clone Bolt.DIY Repository Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md This snippet shows how to clone the Bolt.DIY project repository from GitHub using Git and navigate into the project directory. This is a prerequisite for setting up the application locally. ```bash git clone https://github.com/stackblitz-labs/bolt.diy cd bolt.diy ``` -------------------------------- ### Preview Production Build Locally Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds and runs the production build locally. This allows developers to preview the final application behavior without deploying it. ```bash pnpm run preview ``` -------------------------------- ### Build Production Docker Image Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/CONTRIBUTING.md Builds the Docker image for the production environment using npm or a direct Docker build command. ```bash # Option 1: Helper Scripts npm run dockerbuild:prod # Option 2: Direct Docker Build Command docker build . --target bolt-ai-production ``` -------------------------------- ### Run Development Docker Container (Direct) Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Runs the development Docker container, mapping port 5173 and using local environment variables. ```bash docker run -p 5173:5173 --env-file .env.local bolt-ai:development ``` -------------------------------- ### GitHub Pages Deployment Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Enable GitHub Pages for automatic deployment from your repository. Requires connecting your GitHub account and pushing your project. ```Shell git push origin gh-pages:gh-pages ``` -------------------------------- ### Build Electron App for All Platforms Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Builds the Electron application for all supported platforms (macOS, Windows, Linux). This command simplifies cross-platform building. ```bash pnpm electron:build:dist ``` -------------------------------- ### Build Production Docker Image (Direct Command) Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Builds the Docker image for the production environment using a direct Docker build command, targeting the production stage. ```dockerfile docker build . --target bolt-ai-production ``` -------------------------------- ### Build Development Docker Image Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/CONTRIBUTING.md Builds the Docker image for the development environment using npm or a direct Docker build command. ```bash # Option 1: Helper Scripts npm run dockerbuild # Option 2: Direct Docker Build Command docker build . --target bolt-ai-development ``` -------------------------------- ### Build Electron App for Windows Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Electron application for Windows. This command packages the application for distribution on the Windows platform. ```bash pnpm electron:build:win ``` -------------------------------- ### Build Development Docker Image (Direct Command) Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Builds the Docker image for the development environment using a direct Docker build command, targeting the development stage. ```dockerfile docker build . --target bolt-ai-development ``` -------------------------------- ### Run Development Docker Container Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/CONTRIBUTING.md Runs the bolt-ai development Docker container, mapping port 5173 and using local environment variables. ```bash docker run -p 5173:5173 --env-file .env.local bolt-ai:development ``` -------------------------------- ### Build Electron Desktop App for macOS Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Electron desktop application for Bolt.DIY specifically for macOS. ```bash pnpm electron:build:mac ``` -------------------------------- ### Run Production Docker Container (Direct) Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/CONTRIBUTING.md Runs the production Docker container, mapping port 5173 and using local environment variables. ```bash docker run -p 5173:5173 --env-file .env.local bolt-ai:production ``` -------------------------------- ### Build Electron Main and Preload Scripts Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Electron main process and preload scripts. These are essential components for the Electron application's backend and security layer. ```bash pnpm electron:build:deps ``` -------------------------------- ### WebContainer Live Preview Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Utilizes WebContainer technology for a secure, isolated Node.js environment with live preview. Supports various JavaScript frameworks and tools. ```JavaScript import { WebContainer } from '@webcontainer/api' async function runInWebContainer() { const webcontainer = await WebContainer.create() await webcontainer.spawn('npm', ['install']) const exitCode = await webcontainer.spawn('npm', ['run', 'start']) console.log(`WebContainer process exited with code ${exitCode}`) } ``` -------------------------------- ### Build Electron App for All Platforms Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Electron application for all supported platforms. This command generates distributable packages for macOS, Windows, and Linux. ```bash pnpm electron:build:dist ``` -------------------------------- ### Build Docker Image for Production Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Builds a Docker image optimized for production deployment. This image is suitable for running the application in a production environment. ```bash pnpm run dockerbuild:prod ``` -------------------------------- ### Run Production Docker Container Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/CONTRIBUTING.md Runs the bolt-ai production Docker container, mapping port 5173 and using local environment variables. ```bash docker run -p 5173:5173 --env-file .env.local bolt-ai:production ``` -------------------------------- ### Create Unpacked Electron Build Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Creates an unpacked build of the Electron application. This is typically used for testing purposes before packaging. ```bash pnpm electron:build:unpack ``` -------------------------------- ### Build Electron Renderer Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Electron renderer process. This script is responsible for the user interface and rendering the application's frontend. ```bash pnpm electron:build:renderer ``` -------------------------------- ### GitHub Integration and Version Control Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Connect your GitHub account, import repositories, push projects, and sync changes. Features automatic commits, diff visualization, branch management, and reverting to previous versions. ```Git git commit -m "Major change" git push origin main git pull origin main git checkout ``` -------------------------------- ### Build Electron App for Linux Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Builds the Electron application for the Linux platform. This creates a package suitable for distribution on Linux systems. ```bash pnpm electron:build:linux ``` -------------------------------- ### Alternative Docker Build Command Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md An alternative command to build the Docker image, using npm instead of pnpm. This might be used if npm is the primary package manager. ```bash npm run dockerbuild ``` -------------------------------- ### Switch to Main Branch and Restart Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Switches the local repository to the 'main' branch, which may contain pre-release or test features. It then reinstalls dependencies and restarts the development server. ```bash git checkout main pnpm install pnpm run dev ``` -------------------------------- ### Run Test Suite Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Executes the project's test suite using Vitest. This command is crucial for ensuring the quality and stability of the codebase. ```bash pnpm test ``` -------------------------------- ### Build Bolt.DIY Docker Image Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Docker image for the Bolt.DIY application using an npm script. ```bash npm run dockerbuild ``` -------------------------------- ### Create New LLM Provider (TypeScript) Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Defines the structure for a new LLM provider by extending the BaseProvider class. It includes static models, dynamic model loading, API key configuration, and model instance creation. ```typescript import { BaseProvider } from '~/lib/modules/llm/base-provider'; import type { ModelInfo } from '~/lib/modules/llm/types'; import type { LanguageModelV1 } from 'ai'; import type { IProviderSetting } from '~/types/model'; import { createYourProvider } from '@ai-sdk/your-provider'; export default class YourProvider extends BaseProvider { name = 'YourProvider'; getApiKeyLink = 'https://your-provider.com/api-keys'; config = { apiTokenKey: 'YOUR_PROVIDER_API_KEY', }; staticModels: ModelInfo[] = [ { name: 'your-model-name', label: 'Your Model Label', provider: 'YourProvider', maxTokenAllowed: 100000, maxCompletionTokens: 4000, }, ]; async getDynamicModels( apiKeys?: Record, settings?: IProviderSetting, serverEnv?: Record, ): Promise { // Implement dynamic model loading if supported return []; } getModelInstance(options: { model: string; serverEnv: Record; apiKeys?: Record; providerSettings?: Record; }): LanguageModelV1 { const { apiKeys, model } = options; const apiKey = apiKeys?.[this.config.apiTokenKey] || ''; return createYourProvider({ apiKey, // other configuration options })(model); } } ``` -------------------------------- ### Build Electron Main Process Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Electron main process script. This script handles the core logic and lifecycle of the Electron application. ```bash pnpm electron:build:main ``` -------------------------------- ### Build Bolt.DIY Docker Image (Direct Command) Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Docker image for the Bolt.DIY application using the direct Docker build command, targeting the 'bolt-ai-development' stage. ```bash docker build . --target bolt-ai-development ``` -------------------------------- ### Build Electron Preload Script Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Electron preload script. This script is used to bridge the gap between the main process and the renderer process securely. ```bash pnpm electron:build:preload ``` -------------------------------- ### Build Docker Image for Production Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Docker image optimized for production environments. This ensures the application runs efficiently in a production setting. ```bash pnpm run dockerbuild:prod ``` -------------------------------- ### Build Bolt.diy Docker Image (Direct Command) Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Builds the Docker image for the Bolt.diy application directly using the Docker CLI. This command specifies the target stage for building the development image. ```bash docker build . --target bolt-ai-development ``` -------------------------------- ### Register LLM Provider (TypeScript) Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Registers a newly created LLM provider by importing it and exporting it from the registry file. ```typescript import YourProvider from './providers/your-provider'; // ... existing imports ... export { // ... existing exports ... YourProvider, }; ``` -------------------------------- ### Navigate to Project Directory Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Changes the current directory to the cloned Bolt.DIY project folder, allowing subsequent commands to be executed within the project context. ```bash cd bolt.diy ``` -------------------------------- ### Build Electron App for Linux Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Electron application for Linux. This command packages the application for distribution on various Linux distributions. ```bash pnpm electron:build:linux ``` -------------------------------- ### Build Docker Image for Development Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Docker image used for development purposes. This allows for consistent development environments. ```bash pnpm run dockerbuild ``` -------------------------------- ### Build Docker Image for Development Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Builds a Docker image specifically configured for development purposes. This allows for consistent development environments. ```bash pnpm run dockerbuild ``` -------------------------------- ### Build Electron App for macOS Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Builds the Electron application specifically for the macOS platform. This creates a distributable package for Mac users. ```bash pnpm electron:build:mac ``` -------------------------------- ### Supabase Integration and Database Operations Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Integrate with Supabase for database functionality, authentication, and real-time features. Supports real-time subscriptions, RLS, and built-in API for CRUD operations. ```SQL SELECT * FROM your_table; INSERT INTO your_table (column1, column2) VALUES ('value1', 'value2'); ``` ```JavaScript import { createClient } from '@supabase/supabase-js' const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY) async function fetchData() { const { data, error } = await supabase.from('your_table').select('*') if (error) console.error('Error fetching data:', error) else console.log('Data:', data) } fetchData(); ``` -------------------------------- ### Build Electron App for macOS Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Builds the Electron application specifically for macOS. This command packages the application for distribution on Apple's operating system. ```bash pnpm electron:build:mac ``` -------------------------------- ### Configure API Keys and Base URLs with Environment Variables Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md This snippet demonstrates how to set API keys for cloud providers and base URLs for local AI services using environment variables in a .env.local file. This method is recommended for production environments. ```bash # API Keys OPENAI_API_KEY=your_openai_key_here ANTHROPIC_API_KEY=your_anthropic_key_here # Custom Base URLs OLLAMA_BASE_URL=http://127.0.0.1:11434 LMSTUDIO_BASE_URL=http://127.0.0.1:1234 ``` -------------------------------- ### Create Unpacked Electron Build Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/README.md Creates an unpacked build of the Electron application. This is often used for debugging or inspecting the application's structure. ```bash pnpm electron:build:unpack ``` -------------------------------- ### Build Bolt.diy Docker Image Source: https://github.com/stackblitz-labs/bolt.diy/blob/main/docs/docs/index.md Builds the Docker image for the Bolt.diy application using the provided NPM script. This is a prerequisite for running the application in a Docker container. ```bash npm run dockerbuild ```