File size: 9,305 Bytes
e0d0c4b
1323e7d
e0d0c4b
90a206f
e0d0c4b
50de8d0
e0d0c4b
380aa7e
e0d0c4b
1d5ad99
e0d0c4b
50de8d0
 
8c4933d
41cbad7
d49a7e3
8c4933d
 
 
6eea1a9
8c4933d
 
e0d0c4b
7b28a75
 
 
 
 
 
848c697
 
50de8d0
 
 
 
 
23df7ae
 
e25bb28
62bdbc4
ff8e7c8
 
 
aef26f1
67862d4
6467995
 
2b8236f
c54e6e5
5cb693c
e0d0c4b
7b28a75
 
121ea7e
8ac7931
2feeb18
 
 
67862d4
 
 
90a206f
e0d0c4b
c502b14
ec4b43d
 
 
 
 
 
 
c502b14
e0d0c4b
c502b14
ec4b43d
c502b14
b1e54a4
e13790c
b1e54a4
 
7fe66ae
b1e54a4
 
 
 
 
 
 
7fe66ae
b1e54a4
e13790c
b1e54a4
e13790c
b1e54a4
ec4b43d
b1e54a4
e13790c
b1e54a4
e13790c
b1e54a4
90a206f
b1e54a4
 
e13790c
b1e54a4
 
 
 
 
e13790c
b1e54a4
e13790c
b1e54a4
e13790c
b1e54a4
 
 
e13790c
b1e54a4
 
 
 
e13790c
b1e54a4
e13790c
b1e54a4
90a206f
b1e54a4
90a206f
b1e54a4
90a206f
b1e54a4
 
 
 
 
 
 
 
90a206f
b1e54a4
 
 
 
 
651a4f8
b1e54a4
651a4f8
b1e54a4
 
7fe66ae
b1e54a4
7fe66ae
b1e54a4
7fe66ae
b1e54a4
 
 
 
 
7fe66ae
b1e54a4
 
 
 
 
7fe66ae
b1e54a4
 
 
 
 
 
7fe66ae
b1e54a4
7fe66ae
b1e54a4
7fe66ae
9a8dcce
 
e0d0c4b
9a8dcce
 
 
 
 
 
 
74b6d27
 
 
9a8dcce
 
 
 
74b6d27
 
 
9a8dcce
 
 
 
 
 
 
 
e0d0c4b
9a8dcce
 
 
e0d0c4b
7fe66ae
e0d0c4b
 
 
 
 
 
 
 
 
7fe66ae
e0d0c4b
 
 
90a206f
e0d0c4b
23df7ae
e0d0c4b
23df7ae
e0d0c4b
66ef47c
e0d0c4b
66ef47c
e0d0c4b
66ef47c
931272b
90a206f
e0d0c4b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
[![bolt.diy: AI-Powered Full-Stack Web Development in the Browser](./public/social_preview_index.jpg)](https://bolt.diy)

# bolt.diy (Previously oTToDev)

Welcome to bolt.diy, the official open source version of Bolt.new (previously known as oTToDev and bolt.new ANY LLM), which allows you to choose the LLM that you use for each prompt! Currently, you can use OpenAI, Anthropic, Ollama, OpenRouter, Gemini, LMStudio, Mistral, xAI, HuggingFace, DeepSeek, 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.

Check the [bolt.diy Docs](https://stackblitz-labs.github.io/bolt.diy/) for more information. This documentation is still being updated after the transfer.

bolt.diy was originally started by [Cole Medin](https://www.youtube.com/@ColeMedin) but has quickly grown into a massive community effort to build the BEST open source AI coding assistant!

## Join the community for bolt.diy!

https://thinktank.ottomator.ai


## Requested Additions - 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)
- βœ… Improvements to the main bolt.new prompt in `app\lib\.server\llm\prompts.ts` (@kofi-bhr)
- βœ… DeepSeek API Integration (@zenith110)
- βœ… Mistral API Integration (@ArulGandhi)
- βœ… "Open AI Like" API Integration (@ZerxZ)
- βœ… Ability to sync files (one way sync) to local folder (@muzafferkadir)
- βœ… Containerize the application with Docker for easy installation (@aaronbolton)
- βœ… Publish projects directly to GitHub (@goncaloalves)
- βœ… Ability to enter API keys in the UI (@ali00209)
- βœ… xAI Grok Beta Integration (@milutinke)
- βœ… LM Studio Integration (@karrot0)
- βœ… HuggingFace Integration (@ahsan3219)
- βœ… Bolt terminal to see the output of LLM run commands (@thecodacus)
- βœ… Streaming of code output (@thecodacus)
- βœ… Ability to revert code to earlier version (@wonderwhy-er)
- βœ… Cohere Integration (@hasanraiyan)
- βœ… Dynamic model max token length (@hasanraiyan)
- βœ… Better prompt enhancing (@SujalXplores)
- βœ… Prompt caching (@SujalXplores)
- βœ… Load local projects into the app (@wonderwhy-er)
- βœ… Together Integration (@mouimet-infinisoft)
- βœ… Mobile friendly (@qwikode)
- βœ… Better prompt enhancing (@SujalXplores)
- βœ… Attach images to prompts (@atrokhym)
- βœ… Added Git Clone button (@thecodacus)
- βœ… Git Import from url (@thecodacus)
- βœ… PromptLibrary to have different variations of prompts for different use cases (@thecodacus)
- βœ… Detect package.json and commands to auto install & run preview for folder and git import (@wonderwhy-er)
- βœ… Selection tool to target changes visually (@emcconnell)
- ⬜ **HIGH PRIORITY** - Prevent bolt from rewriting files as often (file locking and diffs)
- ⬜ **HIGH PRIORITY** - Better prompting for smaller LLMs (code window sometimes doesn't start)
- ⬜ **HIGH PRIORITY** - Run agents in the backend as opposed to a single model call
- ⬜ Deploy directly to Vercel/Netlify/other similar platforms
- ⬜ Have LLM plan the project in a MD file for better results/transparency
- ⬜ VSCode Integration with git-like confirmations
- ⬜ Upload documents for knowledge - UI design templates, a code base to reference coding style, etc.
- ⬜ Voice prompting
- ⬜ Azure Open AI API Integration
- ⬜ Perplexity Integration
- ⬜ Vertex AI Integration

## bolt.diy Features

- **AI-powered full-stack web development** directly in your browser.
- **Support for multiple LLMs** with an extensible architecture to integrate additional models.
- **Attach images to prompts** for better contextual understanding.
- **Integrated terminal** to view output of LLM-run commands.
- **Revert code to earlier versions** for easier debugging and quicker changes.
- **Download projects as ZIP** for easy portability.
- **Integration-ready Docker support** for a hassle-free setup.

## Setup bolt.diy 

If you're new to installing software from GitHub, don't worry! If you encounter any issues, feel free to submit an "issue" using the provided links or improve this documentation by forking the repository, editing the instructions, and submitting a pull request. The following instruction will help you get the stable branch up and running on your local machine in no time.  

### Prerequisites  

1. **Install Git**: [Download Git](https://git-scm.com/downloads)  
2. **Install Node.js**: [Download Node.js](https://nodejs.org/en/download/)  

   - After installation, the Node.js path is usually added to your system automatically. To verify:  
     - **Windows**: Search for "Edit the system environment variables," click "Environment Variables," and check if `Node.js` is in the `Path` variable.  
     - **Mac/Linux**: Open a terminal and run:  
       ```bash  
       echo $PATH  
       ```  
       Look for `/usr/local/bin` in the output.  

### Clone the Repository  

Clone the repository using Git:  

```bash  
git clone -b stable https://github.com/stackblitz-labs/bolt.diy  
```  

### (Optional) Configure Environment Variables  

Most environment variables can be configured directly through the settings menu of the application. However, if you need to manually configure them:  

1. Rename `.env.example` to `.env.local`.  
2. Add your LLM API keys. For example:  

```env  
GROQ_API_KEY=YOUR_GROQ_API_KEY  
OPENAI_API_KEY=YOUR_OPENAI_API_KEY  
ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY  
```  

**Note**: Ollama does not require an API key as it runs locally.  

3. Optionally, set additional configurations:  

```env  
# Debugging  
VITE_LOG_LEVEL=debug  

# Ollama settings (example: 8K context, localhost port 11434)  
OLLAMA_API_BASE_URL=http://localhost:11434  
DEFAULT_NUM_CTX=8192  
```  

**Important**: Do not commit your `.env.local` file to version control. This file is already included in `.gitignore`.  

---

## Run the Application  

### Option 1: Without Docker

1. **Install Dependencies**:  
   ```bash  
   pnpm install  
   ```  
   If `pnpm` is not installed, install it using:  
   ```bash  
   sudo npm install -g pnpm  
   ```  

2. **Start the Application**:  
   ```bash  
   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.  

### Option 2: With Docker  

#### Prerequisites  
- Ensure Git, Node.js, and Docker are installed: [Download Docker](https://www.docker.com/)  

#### Steps  

1. **Build the Docker Image**:  

   Use the provided NPM scripts:  
   ```bash  
   npm run dockerbuild       # Development build  
   npm run dockerbuild:prod  # Production build  
   ```  

   Alternatively, use Docker commands directly:  
   ```bash  
   docker build . --target bolt-ai-development  # Development build  
   docker build . --target bolt-ai-production   # Production build  
   ```  

2. **Run the Container**:  
   Use Docker Compose profiles to manage environments:  
   ```bash  
   docker-compose --profile development up  # Development  
   docker-compose --profile production up   # Production  
   ```  

   - With the development profile, changes to your code will automatically reflect in the running container (hot reloading).  

---

### Update Your Local Version to the Latest

To keep your local version of bolt.diy up to date with the latest changes, follow these steps for your operating system:

#### 1. **Navigate to your project folder**  
   Navigate to the directory where you cloned the repository and open a terminal:

#### 2. **Fetch the Latest Changes**  
   Use Git to pull the latest changes from the main repository:

   ```bash
   git pull origin main
   ```

#### 3. **Update Dependencies**  
   After pulling the latest changes, update the project dependencies by running the following command:

   ```bash
   pnpm install
   ```

#### 4. **Run the Application**  
   Once the updates are complete, you can start the application again with:

   ```bash
   pnpm run dev
   ```

This ensures that you're running the latest version of bolt.diy and can take advantage of all the newest features and bug fixes.

---

## Available Scripts

- **`pnpm run dev`**: Starts the development server.
- **`pnpm run build`**: Builds the project.
- **`pnpm run start`**: Runs the built application locally using Wrangler Pages.
- **`pnpm run preview`**: Builds and runs the production build locally.
- **`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`**: Deploys the project to Cloudflare Pages.
- **`pnpm run lint:fix`**: Automatically fixes linting issues.

---

## Contributing

We welcome contributions! Check out our [Contributing Guide](CONTRIBUTING.md) to get started.

---

## Roadmap

Explore upcoming features and priorities on our [Roadmap](https://roadmap.sh/r/ottodev-roadmap-2ovzo).

---

## FAQ

For answers to common questions, visit our [FAQ Page](FAQ.md).