dazeb / Bolt.new-ALL-LLM

Bolt.new fork
MIT License
19 stars 6 forks source link

Bolt.new: AI-Powered Full-Stack Web Development in the Browser

Bolt.new Fork by Cole Medin

This fork of Bolt.new allows you to choose the LLM that you use for each prompt! Currently, you can use OpenAI, Anthropic, Ollama, OpenRouter, Gemini, or Groq models - and it is easily extended to use any other model supported by the Vercel AI SDK! See the instructions below for running this locally and extending it to include more models.

Requested Additions to this Fork - Feel Free to Contribute!!

Bolt.new: AI-Powered Full-Stack Web Development in the Browser

Bolt.new is an AI-powered web development agent that allows you to prompt, run, edit, and deploy full-stack applications directly from your browser—no local setup required. If you're here to build your own AI-powered web dev agent using the Bolt open source codebase, click here to get started!

What Makes Bolt.new Different

Claude, v0, etc are incredible- but you can't install packages, run backends, or edit code. That’s where Bolt.new stands out:

Whether you’re an experienced developer, a PM, or a designer, Bolt.new allows you to easily build production-grade full-stack applications.

For developers interested in building their own AI-powered development tools with WebContainers, check out the open-source Bolt codebase in this repo!

Prerequisites

Before you begin, ensure you have the following installed:

Setup

  1. Clone the repository (if you haven't already):
git clone https://github.com/coleam00/bolt.new-any-llm.git
  1. Install dependencies:
pnpm install
  1. Rename .env.example to .env.local and add your LLM API keys (you only have to set the ones you want to use and Ollama doesn't need an API key because it runs locally on your computer):
GROQ_API_KEY=XXX
OPENAI_API_KEY=XXX
ANTHROPIC_API_KEY=XXX

Optionally, you can set the debug level:

VITE_LOG_LEVEL=debug

Important: Never commit your .env.local file to version control. It's already included in .gitignore.

Adding New LLMs:

To make new LLMs available to use in this version of Bolt.new, head on over to app/utils/constants.ts and find the constant MODEL_LIST. Each element in this array is an object that has the model ID for the name (get this from the provider's API documentation), a label for the frontend model dropdown, and the provider.

By default, Anthropic, OpenAI, Groq, and Ollama are implemented as providers, but the YouTube video for this repo covers how to extend this to work with more providers if you wish!

When you add a new model to the MODEL_LIST array, it will immediately be available to use when you run the app locally or reload it. For Ollama models, make sure you have the model installed already before trying to use it here!

Available Scripts

Development

To start the development server:

pnpm run dev

This will start the Remix Vite development server. You will need Google Chrome Canary to run this locally if you use Chrome! It's an easy install and a good browser for web development anyway.

Tips and Tricks

Here are some tips to get the most out of Bolt.new: