AI and LEGO
Free LEGO AI tool: run open-source BrickBuilder on your computer
A copy-and-paste prompt and illustrated setup guide for Claude Code or your preferred coding assistant.
Jake ·
I'm Jake, the creator of BrickBuilder.ai. BrickBuilder is an open-source LEGO building agent, and you can install it on your own computer. The code is on GitHub under the MIT license.
You describe a build or supply a reference image. Basic bricks designs on a stud grid; All parts uses the Nova agent with a wider parts catalog. Successful builds offer a 3D preview, building instructions, a parts list, and LDraw downloads. You can ask for changes and continue building.
What “free” means
The application code is free to use and modify under its license. AI generation still uses your own provider account or API key. Provider charges, account eligibility, and subscription limits may apply. A local install runs the application on your computer; prompts and reference images can still be sent to your selected AI provider.
1. Get your computer ready
You need Git, Node.js 18 or newer, Python 3.10 or newer, and a running Docker Desktop or Docker engine for All parts mode. The first Nova Docker build can take several minutes and several GB of disk space. Basic bricks can run without Docker.
Open Claude Code or another coding assistant that can run terminal commands on your computer. Give it a folder where it may install BrickBuilder. You can copy the complete Markdown prompt below; it tells the assistant to check prerequisites, install the app, start it, and verify the local services.
2. Copy this Markdown prompt
Copy the complete prompt below into Claude Code or your preferred coding assistant. On the BrickBuilder version of this tutorial, use the copy-to-clipboard button above the prompt.
# Install and run BrickBuilder on my computer
Install and run the open-source app at https://github.com/for-real-labs/brickbuilder-ai on this computer. Do the setup, rather than only explaining the commands.
1. Detect my operating system and read the repository's current README and local setup scripts. Check Git, Node.js 18+, Python 3.10+, and Docker Desktop (or a working Docker engine). Install missing prerequisites from official sources when possible; tell me about any manual installation or permission needed. Start Docker for All parts mode.
2. Clone the repository into a new folder, or reuse an existing checkout without overwriting my changes. Work from the repository root.
3. Copy backend/.env-example to backend/.env and frontend/.env-example to frontend/.env only if those files do not exist. Keep VITE_API_MODE=local and VITE_LOCAL_API_URL=http://127.0.0.1:8002. Keep credentials private and out of Git, browser bundles, and chat.
4. Run npm install, then npm start. The root scripts install the Python backend and frontend, build the pinned Nova Docker runtime, and start the local services. Allow time and disk space for the first Docker build. Diagnose setup errors using the current repository documentation.
5. Open the frontend URL printed by Vite (normally http://127.0.0.1:3000). Verify that the frontend and local backend respond. For All parts, check npm run nova:status and guide me through the app's local OpenAI/Claude provider sign-in, or help me configure my own project API key privately. Let me complete authentication myself. Basic bricks needs an OPENAI_API_KEY or ANTHROPIC_API_KEY in backend/.env and a matching model selection. AI provider charges or subscription limits may apply.
6. If Docker is unavailable, offer Basic bricks only by setting NOVA_SKIP_SETUP=true for both npm install and npm start, using syntax appropriate for my shell. Explain that All parts will be unavailable in that mode.
7. Leave the app running and give me the local URL, a short status report, and stop/restart instructions. Ctrl+C stops the app servers; Nova's Docker container stays running. Do not claim a successful AI build unless one was actually tested with my authorization.3. Let the assistant install and start the app
The normal root commands are npm install and npm start. The installer creates the Python environment, installs the frontend, and builds the pinned Nova runtime. Startup starts or reuses Nova, then launches the backend and frontend. The assistant should preserve any existing environment files and local changes.
Open the frontend address printed by Vite, normally http://127.0.0.1:3000. The local backend normally listens on http://127.0.0.1:8002. The Nova setup guide explains runtime configuration and troubleshooting.
4. Connect a provider and make your first build
For All parts, choose the mode and model in the composer. If the local provider is not connected, complete the app's OpenAI or Claude sign-in yourself, or explicitly use your project API key. After connecting, press Create. For Basic bricks, configure OPENAI_API_KEY or ANTHROPIC_API_KEY privately in backend/.env, restart the backend, and select a matching model.
Try: “Build a small red lighthouse with a blue door, about 20 studs tall.” Inspect the result, then ask for a specific edit. Treat generated instructions as something to review before buying parts or building.
If something gets stuck
Ask the assistant to read the actual error, check the prerequisite versions, confirm Docker is running, and run npm run nova:status. Without Docker, set NOVA_SKIP_SETUP=true for both installation and startup; this enables Basic bricks only. The prompt asks the assistant to use syntax appropriate for your shell.
Ctrl+C stops the app servers. Run npm start to restart them. Nova stays running in Docker with its persistent sessions; stop the managed container in Docker Desktop when finished.
This tutorial is based on the repository's setup scripts and documentation. It does not claim a fresh end-to-end installation or a completed AI generation.
Want to try building before installing? Visit BrickBuilder.ai, or explore and contribute to the GitHub project.
AI and LEGO is an independent publication by Jake, creator of BrickBuilder.ai. LEGO is a trademark of the LEGO Group, which does not sponsor or endorse this project. Research and drafting were AI-assisted.
Originally published on AI and LEGO on Substack.