Skip to content

About

FormBlocks - instead of BrickLink Studio: the brick building app from the FormAI family of apps. Find parts in the open LDraw library, place & snap them in 3D, colour them & save LDraw files; agents build over MCP. Runs locally, no account. Free & open-source under Apache-2.0.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

1,305 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

FormBlocks icon: stacked bricks on a studded plate, with the outline of the next brick

FormBlocks

FormBlocks · instead of BrickLink Studio: brick building in the Form family, on the open LDraw parts library.
Find parts, place and snap them in 3D, colour them and save LDraw files,
on your own computer with no account. Agents use the same engine over MCP.

version 0.7.0 TypeScript and Vite Python and FastAPI macOS, Windows, Linux License: Apache-2.0 Status: live

Download FormBlocks on formai.tools · Run it from source


The FormBlocks window showing a small red car built from bricks: the parts palette on the left, the 3D view in the middle with the step strip under it, and the colours and the model's information on the right
The sample car from the LDraw library's models folder, opened in the window.

Features · In the box · Agents · Parts library · Under the hood · Download · Run from source


The open parts library

About 20,000 LDraw parts, searched by number, description, category and keywords as you type, in the library's own colours.

Parts that seat

A ghost shows where a part will sit before you drop it: on studs, clips on bars, hinge halves, pins in pin holes and axles through axle holes.

Local-first

No account and no telemetry. Models stay on your computer, the engine listens on 127.0.0.1 only, and the library is fetched only when you agree.

Agent-ready

The window, a JSON command line and an MCP server run one catalogue of commands, and the window asks before an outside agent changes anything.

Features

Placing and snapping

Pick a part and its ghost rests on whatever is under its whole footprint, across a gap too, seating on studs as you move. Clips grip bars, hinge halves meet, pins seat in pin holes and axles slide through axle holes, each found from the part's own shape. Snapping never turns a part for you.

Turning and editing

The pivot tool turns a part on its pin, axle, bar or hinge in steps from 90 degrees down to 1, or to an angle you type. Move, copy, cut and paste, drag copies, use the stamp, brush and sampler, nudge with the keys, and select with the pointer, a box or by kind.

Steps and submodels

Build in steps with the earlier ones dimmed, walk them in a strip with a chip per step, read the model tree in step order, and pack parts into submodels you rename and unpack.

The parts list

The Parts tab counts what the model needs by part and colour, for the whole model, a submodel or a step, and saves it as a CSV with LDraw part and colour numbers that a spreadsheet opens directly.

The 3D view

Six preset views, fit, perspective or orthographic, and views you save, name and reorder, kept in the .fblk project. A right-click menu acts on the part under the pointer, the selection or empty space, and the hide tool hides what you click or box.

Keys and Preferences

Every command has a key, and the Keys page of Preferences changes any of them, asking Swap or Cancel when a key is in use. On a Mac, Command stands where Ctrl does. A row of tool buttons holds the stamp, brush, sampler, move handles, pivot, hide and pick mode.

Every feature in detail, ending with what it does not do yet: docs/MANUAL.md. The specification FormBlocks is written from: spec/.

Everything in the box

  • Parts library: choose a library folder you already have or fetch the official one after you agree; search as you type, favourites, Recent with pinned parts, your own order of categories, and a moved part number that follows to its new one.
  • Placing: the ghost and its stud marks, seating on studs including across a gap, clips on bars, hinge halves on each other, pins and axles in beams, plates with a clip, handle or hinge finger on studs, and an overlap check judged on the parts' real shapes that keeps apart parts that nest by design.
  • Editing: drag placed parts and copies of them, move handles, the pivot dial with a typed angle, copy, cut and paste, the stamp, brush and sampler on keys, nudge, hide and Show All, select by pointer, box or kind, and one undo step for each change.
  • Colours: the library's own colour table, a colour per part, and a colour chosen from a list in Details.
  • Model: building steps with the earlier ones dimmed, submodels, the model tree, the details of a part with a typed turn about X, Y or Z, and an Info tab with the model's name, description, author and licence beside its counts and size.
  • Parts tab: counts by part and colour for the model, a submodel, up to the step shown or this step only, copied or saved as CSV, in the same order the command line and agents see.
  • Pictures: Save Picture at the view's size, 2x, 4x or a typed size, on white or transparent, and one picture per step into a folder.
  • The window: a right column whose three sections fold and resize, panels that fit short windows, the agent dock (Ctrl+J), Preferences with a Building page and a Keys page, and a dark theme by default.
  • Desktop: a Tauri 2 shell that starts its frozen engine, says why in a dialog when a start fails, keeps its port from one start to the next, and ships the licence texts of what it carries.

Not yet

Ball joints, gears and flexible parts; a limit on how far a hinge or a beam turns; a small picture on each row of the model tree; and Preferences for strict seating, edge lines and the ground. docs/MANUAL.md keeps the full list.

Formats

  • Native: .fblk projects, which keep the model, hidden parts and saved views
  • LDraw in and out: .ldr and .mpd, read by other LDraw programs; a saved model holds references to parts, never a part file's own lines, and hidden parts are left out
  • Parts list: CSV with LDraw part and colour numbers
  • Pictures: PNG of the view or of each step

Built for agents

The window, the command line and the MCP server call the same catalogue of commands, so an agent builds in the model you have open. Every cli subcommand prints JSON, so an agent can read the library's status, search parts, read a part's mesh counts and place, move, colour and count parts.

./formblocks mcp                       # the MCP server on stdio
./formblocks cli help                  # the command line over the same catalogue
./formblocks agents install [--dry-run]   # register the server with Claude Code, Codex, Cursor and Antigravity
./formblocks agents sync | check       # write or check agents/manifest.json, the command reference and the mirrors
./formblocks agents status [--json]    # per program: found or not, version, where FormBlocks is registered
./formblocks claude | codex | cursor | antigravity   # start that program here with FormBlocks attached

A checkout already names the server for Claude Code (.mcp.json), Cursor (.cursor/mcp.json), Codex (.codex/config.toml) and Antigravity (.agents/mcp_config.json). Two skill packs live in skills/: formblocks-harness, for changing this code, and formblocks-driving, for using the running app; its references/command-catalogue.md lists every tool and command and is written by agents sync.

The agent dock in the window (Ctrl+J) holds Chat for Claude Code, a terminal tab for each of Claude Code, Codex, Cursor and Antigravity, and a plain shell; each tab reaches this engine with a token of its own that is revoked when the tab closes. A program that is not installed shows the line that installs it and nothing is run for you. An agent program started outside the window reads the model freely, and the window asks you before it changes the model or a file: Deny, Allow once or Always allow, with a read-only Outside agents tab logging each call. Fetching the parts library is the one thing an agent is always refused, because only you can agree to that download. What each program gets: docs/AGENT_DOCK.md.

The parts library

FormBlocks needs the LDraw Parts Library on your computer, about 147 MB as one archive and about 20,000 parts. It never ships with the app. Either point FormBlocks at a copy you already have (a folder holding parts, p and LDConfig.ldr, read in place and never written to), or let it fetch the archive from https://library.ldraw.org/library/updates/complete.zip after it has shown you the address, the size the server reports, the licence and whose work it is.

./formblocks cli library status                 # found or not, where, the update, the consent text
./formblocks cli library use ~/ldraw             # use a library you already have
./formblocks cli library fetch --i-consent "https://library.ldraw.org/library/updates/complete.zip CC BY 2.0 and CC BY 4.0"
./formblocks cli library check-update           # ask the server whether a newer archive is offered
./formblocks cli parts search brick 2 x 4       # 3001 first
./formblocks cli parts show 3023                # a moved number follows to 3023b
./formblocks cli part-mesh 3001                 # triangles, edges, bounds, and whether the cache answered
./formblocks cli colours                        # the library's own colours

The fetch runs only with your consent, given on the library card in the window or with --i-consent naming the address and the licence at the command line; the engine refuses a fetch asked by an agent, even one that names both. FORMBLOCKS_LDRAW_DIR names a library folder for the engine and the command line when your settings name none. The parts are the work of the library's many authors, under CC BY 2.0 and CC BY 4.0; NOTICE.md carries the attribution FormBlocks shows.

Under the hood

  • Engine: Python and FastAPI, bound to 127.0.0.1; every route needs the window's key, and every write is the person's. Commands live in a registry in backend/app/cmd/, each a module that registers itself.
  • Window: vanilla TypeScript and Vite with no UI framework and a WebGL 2 view; colours, spacing and layers come from one tokens file, dark by default.
  • Parts library: backend/app/library/ finds or fetches the library, indexes its listed parts once and searches them on every keystroke, and reads the colour table; the engine serves it under /api/library, /api/parts and /api/colours.
  • Part meshes: backend/app/mesh/ flattens a part's files into one mesh with numpy and keeps it on disk, keyed by the library update, so a part is flattened once.
  • Settings: the library folder, quality, category order, favourites, grid step, snap, overlap and keys in settings.json in the data folder, at /api/settings.
  • Desktop: a Tauri 2 shell that starts the engine frozen by PyInstaller beside the window.
  • Network: nothing unless you ask. The one server FormBlocks reaches is library.ldraw.org, to fetch the library after your consent, to show the archive's size on the library card, or when you choose Check for an update. It never checks for updates by itself.

Download

Platform Download Release
macOS Download FormBlocks for macOS FormBlocks releases on FormCompiler
Windows Download FormBlocks for Windows FormBlocks releases on FormCompiler
Linux Download FormBlocks for Linux FormBlocks releases on FormCompiler

All FormBlocks builds are compiled and released from FormCompiler from apps/formblocks.json; this repo holds the source. The app needs a webview with WebGL 2, and the parts library on first start.

Run it from source

Prefer it in your browser, or want to contribute? Run the web UI straight from this repo.

Requires: Python 3.12+ and Node 22.12+; Rust only for the desktop app.

git clone git@github.com:nodemode-dev/formblocks.git
cd formblocks
./formblocks_oc_install    # the engine's venv and the window's packages, once
./formblocks               # engine on 127.0.0.1:8330, web UI at http://localhost:5330

The launcher opens no browser by itself and runs until you close its terminal. ./formblocks help lists every command, and ./formblocks doctor checks the toolchain, the installs and the ports. ./formblocks install-desktop then ./formblocks desktop dev opens the desktop window instead, and ./build_app builds and installs the desktop app. On Windows use formblocks_oc_install.bat, formblocks.bat and build_app.bat. FORMBLOCKS_PORT moves the engine and FORMBLOCKS_DATA_DIR moves the data folder. The wiki's Building page covers building in detail.

Contributing: branch from main, keep changes to source here, and leave packaging and releases to FormCompiler. Read CLAUDE.md first; its laws bind people and agents alike. Write from spec/ and the public LDraw documentation, never from another program. See CONTRIBUTING.md and AGENTS.md. Report security issues privately as SECURITY.md describes.

Repository

Path What it is
backend/ FastAPI engine: app/library/ the parts library, app/mesh/ part meshes, app/ldraw/ the LDraw reader, app/cmd/ the commands, app/routers/ the routes
frontend/ Vanilla TypeScript and Vite window: the 3D view, palettes, panels, the model tree, Preferences and the agent dock
src-tauri/ Tauri 2 desktop shell
setup/ the install and boot scripts behind ./formblocks
skills/ the agent skill packs
spec/ the functional specification
apps/ the registry entry and the portal row

Docs: CHANGELOG.md, docs/MANUAL.md, docs/AGENT_DOCK.md, docs/RELEASE.md, .docs/wiki · Agents: CLAUDE.md, AGENTS.md · Conduct: CODE_OF_CONDUCT.md



Maintainers

Maintainer Role
@nodemode-ai Owner
@gbarnai Co-owner

License

FormBlocks is licensed under the Apache License 2.0 (LICENSE, SPDX Apache-2.0). Copyright 2026 NodeAgentc, Inc. Every dependency and every family source is listed in NOTICE.md. The LDraw Parts Library is not part of FormBlocks: it is the work of its many authors under CC BY 2.0 and CC BY 4.0, fetched by you, and credited in NOTICE.md and in the app.

LEGO, BrickLink and BrickLink Studio are either registered trademarks or trademarks of the LEGO Group in the United States and/or other countries. LDraw is a trademark owned and licensed by the Estate of James Jessiman. FormBlocks is not affiliated with or endorsed by the LEGO Group or by LDraw.org; the names describe file formats and compatibility only.

About

FormBlocks - instead of BrickLink Studio: the brick building app from the FormAI family of apps. Find parts in the open LDraw library, place & snap them in 3D, colour them & save LDraw files; agents build over MCP. Runs locally, no account. Free & open-source under Apache-2.0.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages