DEV Community

Cover image for Running bolt.new Locally
M Sea Bass
M Sea Bass

Posted on

131

Running bolt.new Locally

What is bolt.new?

bolt.new is an open-source tool for creating web applications.

While there is also a web version, this article focuses on how to run it locally.

Environment Setup

This article will guide you through the steps to run it using WSL (Windows Subsystem for Linux).

Installing pnpm

First, let's install pnpm.

sudo apt update suto apt install nodejs npm
sudo npm -g install n
sudo n stable sudo apt purge nodejs npm
sudo apt autoremove
sudo apt update 
sudo apt upgrade
Enter fullscreen mode Exit fullscreen mode

After restarting the terminal, check if pnpm has been installed successfully.

node --version
npm --version
Enter fullscreen mode Exit fullscreen mode

Downloading bolt.new

Next, refer to bolt.new/CONTRIBUTING.md to download the environment from GitHub.

git clone https://github.com/stackblitz/bolt.new.git
Enter fullscreen mode Exit fullscreen mode

Install the libraries on WSL.

cd bolt.new
pnpm install
Enter fullscreen mode Exit fullscreen mode

Create a .env.local file under the bolt.new folder and specify the Anthropic API key in it.

ANTHROPIC_API_KEY=YOUR_API_KEY
Enter fullscreen mode Exit fullscreen mode

Execution

Run the following command:

pnpm run dev
# or
pnpm run build
pnpm run start
Enter fullscreen mode Exit fullscreen mode

After running the command, a message like the following will be displayed after a short while.

pnpm run dev
> bolt@ dev /mnt/c/Users/<your folder path>/bolt.new
> remix vite:dev

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
Enter fullscreen mode Exit fullscreen mode

When you access the specified URL, the bolt.new application will be displayed.

Image description

By providing your requirements, it will create an application for you.

Image description

Next time, we will add and modify some features and provide explanations.

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (1)

Collapse
 
leojr profile image
Leo

Hey, if you're working with AI-assisted coding tools like Cursor, there's a GitHub repo with some useful prompts that might be helpful. It's got a collection of prompts for generating code snippets and exploring new ideas. You can check it out here: github.com/KingLeoJr/prompts

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

AWS Security LIVE!

Hosted by security experts, AWS Security LIVE! showcases AWS Partners tackling real-world security challenges. Join live and get your security questions answered.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️