forked from stackblitz-labs/bolt.diy
-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' from coleam00 into add-docker-support
- Loading branch information
Showing
19 changed files
with
962 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Rename this file to .env.local once you have filled in the below environment variables! | ||
|
||
# Get your GROQ API Key here - | ||
# https://console.groq.com/keys | ||
# You only need this environment variable set if you want to use Groq models | ||
GROQ_API_KEY= | ||
|
||
# Get your Open AI API Key by following these instructions - | ||
# https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key | ||
# You only need this environment variable set if you want to use GPT models | ||
OPENAI_API_KEY= | ||
|
||
# Get your Anthropic API Key in your account settings - | ||
# https://console.anthropic.com/settings/keys | ||
# You only need this environment variable set if you want to use Claude models | ||
ANTHROPIC_API_KEY= | ||
|
||
# Get your OpenRouter API Key in your account settings - | ||
# https://openrouter.ai/settings/keys | ||
# You only need this environment variable set if you want to use OpenRouter models | ||
OPEN_ROUTER_API_KEY= | ||
|
||
# Get your Google Generative AI API Key by following these instructions - | ||
# https://console.cloud.google.com/apis/credentials | ||
# You only need this environment variable set if you want to use Google Generative AI models | ||
GOOGLE_GENERATIVE_AI_API_KEY= | ||
|
||
# You only need this environment variable set if you want to use oLLAMA models | ||
# EXAMPLE http://localhost:11434 | ||
OLLAMA_API_BASE_URL= | ||
|
||
# Include this environment variable if you want more logging for debugging locally | ||
VITE_LOG_LEVEL=debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,8 @@ dist-ssr | |
|
||
/.cache | ||
/build | ||
.env* | ||
.env.local | ||
.env | ||
*.vars | ||
.wrangler | ||
_worker.bundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,41 @@ | ||
[](https://bolt.new) | ||
|
||
# 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!! | ||
|
||
- ✅ OpenRouter Integration (@coleam00) | ||
- ✅ Gemini Integration (@jonathands) | ||
- ✅ Autogenerate Ollama models from what is downloaded (@yunatamos) | ||
- ✅ Filter models by provider (@jasonm23) | ||
- ✅ Download project as ZIP (@fabwaseem) | ||
- ⬜ LM Studio Integration | ||
- ⬜ DeepSeek API Integration | ||
- ⬜ Together Integration | ||
- ⬜ Azure Open AI API Integration | ||
- ⬜ HuggingFace Integration | ||
- ⬜ Perplexity Integration | ||
- ⬜ Containerize the application with Docker for easy installation | ||
- ⬜ Better prompting for smaller LLMs (code window sometimes doesn't start) | ||
- ⬜ Attach images to prompts | ||
- ⬜ Run agents in the backend as opposed to a single model call | ||
- ⬜ Publish projects directly to GitHub | ||
- ⬜ Deploy directly to Vercel/Netlify/other similar platforms | ||
- ⬜ Load local projects into the app | ||
- ⬜ Ability to revert code to earlier version | ||
- ⬜ Prompt caching | ||
- ⬜ Ability to enter API keys in the UI | ||
- ⬜ Prevent Bolt from rewriting files as often | ||
|
||
# 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!](./CONTRIBUTING.md) | ||
|
||
## 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: | ||
Claude, v0, etc are incredible- but you can't install packages, run backends, or edit code. That’s where Bolt.new stands out: | ||
|
||
- **Full-Stack in the Browser**: Bolt.new integrates cutting-edge AI models with an in-browser development environment powered by **StackBlitz’s WebContainers**. This allows you to: | ||
- Install and run npm tools and libraries (like Vite, Next.js, and more) | ||
|
@@ -15,40 +44,86 @@ Claude, v0, etc are incredible- but you can't install packages, run backends or | |
- Deploy to production from chat | ||
- Share your work via a URL | ||
|
||
- **AI with Environment Control**: Unlike traditional dev environments where the AI can only assist in code generation, Bolt.new gives AI models **complete control** over the entire environment including the filesystem, node server, package manager, terminal, and browser console. This empowers AI agents to handle the entire app lifecycle—from creation to deployment. | ||
- **AI with Environment Control**: Unlike traditional dev environments where the AI can only assist in code generation, Bolt.new gives AI models **complete control** over the entire environment including the filesystem, node server, package manager, terminal, and browser console. This empowers AI agents to handle the whole app lifecycle—from creation to deployment. | ||
|
||
Whether you’re an experienced developer, a PM or designer, Bolt.new allows you to build production-grade full-stack applications with ease. | ||
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! | ||
|
||
## Tips and Tricks | ||
## Prerequisites | ||
|
||
Here are some tips to get the most out of Bolt.new: | ||
Before you begin, ensure you have the following installed: | ||
|
||
- **Be specific about your stack**: If you want to use specific frameworks or libraries (like Astro, Tailwind, ShadCN, or any other popular JavaScript framework), mention them in your initial prompt to ensure Bolt scaffolds the project accordingly. | ||
- Node.js (v20.15.1) | ||
- pnpm (v9.4.0) | ||
|
||
- **Use the enhance prompt icon**: Before sending your prompt, try clicking the 'enhance' icon to have the AI model help you refine your prompt, then edit the results before submitting. | ||
## Setup | ||
|
||
- **Scaffold the basics first, then add features**: Make sure the basic structure of your application is in place before diving into more advanced functionality. This helps Bolt understand the foundation of your project and ensure everything is wired up right before building out more advanced functionality. | ||
1. Clone the repository (if you haven't already): | ||
|
||
- **Batch simple instructions**: Save time by combining simple instructions into one message. For example, you can ask Bolt to change the color scheme, add mobile responsiveness, and restart the dev server, all in one go saving you time and reducing API credit consumption significantly. | ||
```bash | ||
git clone https://github.com/coleam00/bolt.new-any-llm.git | ||
``` | ||
|
||
2. Install dependencies: | ||
|
||
```bash | ||
pnpm install | ||
``` | ||
|
||
3. 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: | ||
|
||
## FAQs | ||
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. | ||
|
||
**Where do I sign up for a paid plan?** | ||
Bolt.new is free to get started. If you need more AI tokens or want private projects, you can purchase a paid subscription in your [Bolt.new](https://bolt.new) settings, in the lower-left hand corner of the application. | ||
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! | ||
|
||
**What happens if I hit the free usage limit?** | ||
Once your free daily token limit is reached, AI interactions are paused until the next day or until you upgrade your plan. | ||
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! | ||
|
||
**Is Bolt in beta?** | ||
Yes, Bolt.new is in beta, and we are actively improving it based on feedback. | ||
## Available Scripts | ||
|
||
**How can I report Bolt.new issues?** | ||
Check out the [Issues section](https://github.com/stackblitz/bolt.new/issues) to report an issue or request a new feature. Please use the search feature to check if someone else has already submitted the same issue/request. | ||
- `pnpm run dev`: Starts the development server. | ||
- `pnpm run build`: Builds the project. | ||
- `pnpm run start`: Runs the built application locally using Wrangler Pages. This script uses `bindings.sh` to set up necessary bindings so you don't have to duplicate environment variables. | ||
- `pnpm run preview`: Builds the project and then starts it locally, useful for testing the production build. Note, HTTP streaming currently doesn't work as expected with `wrangler pages dev`. | ||
- `pnpm test`: Runs the test suite using Vitest. | ||
- `pnpm run typecheck`: Runs TypeScript type checking. | ||
- `pnpm run typegen`: Generates TypeScript types using Wrangler. | ||
- `pnpm run deploy`: Builds the project and deploys it to Cloudflare Pages. | ||
|
||
**What frameworks/libraries currently work on Bolt?** | ||
Bolt.new supports most popular JavaScript frameworks and libraries. If it runs on StackBlitz, it will run on Bolt.new as well. | ||
## Development | ||
|
||
**How can I add make sure my framework/project works well in bolt?** | ||
We are excited to work with the JavaScript ecosystem to improve functionality in Bolt. Reach out to us via [[email protected]](mailto:[email protected]) to discuss how we can partner! | ||
To start the development server: | ||
|
||
```bash | ||
pnpm run dev | ||
``` | ||
|
||
This will start the Remix Vite development server. You will need Google Chrome Canary to run this locally! 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: | ||
|
||
- **Be specific about your stack**: If you want to use specific frameworks or libraries (like Astro, Tailwind, ShadCN, or any other popular JavaScript framework), mention them in your initial prompt to ensure Bolt scaffolds the project accordingly. | ||
|
||
- **Use the enhance prompt icon**: Before sending your prompt, try clicking the 'enhance' icon to have the AI model help you refine your prompt, then edit the results before submitting. | ||
|
||
- **Scaffold the basics first, then add features**: Make sure the basic structure of your application is in place before diving into more advanced functionality. This helps Bolt understand the foundation of your project and ensure everything is wired up right before building out more advanced functionality. | ||
|
||
- **Batch simple instructions**: Save time by combining simple instructions into one message. For example, you can ask Bolt to change the color scheme, add mobile responsiveness, and restart the dev server, all in one go saving you time and reducing API credit consumption significantly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.