
brick-work
io.github.Ulef1005/brick-work
Ask an assistant about your brick collection through your own Brick Work install.
Documentation
Free, self-hosted app for your brick collection and its missing parts.
Demo · Install · Changelog · Roadmap · Docs · Website
The screenshots show the demo's invented collection with real Rebrickable set and part pictures; a real install loads pictures from BrickLink and Rebrickable (no key needed).
Brick Work
Don't just manage your collection. Work with it. Brick Work is a free, open-source (MIT) web app for your own computer or NAS. It helps you finish your sets, not only list them. Built with Claude Code; I review it and use it daily. I use it for my collection of about 200 sets.
Try the demo (the real interface on an invented collection, nothing saved) or watch the tour (1:36, recorded on v1.1).
What it does, and why collectors like it
- Set Inspector goes through a set part by part: found, missing, later. You know exactly what is missing, and you can stop and resume.
- Part Runner fills several sets in one walk along your drawers. One pass instead of one per set.
- Matchmaker shows which incomplete sets your loose parts can finish. You stop buying what you already own.
- Build Scout ranks every set by how much your loose stock already makes. "What can I build?" has an answer.
- Set detection ranks the sets a bulk lot may hold, and a pull list takes you through them. A bag of unknown bricks becomes sets.
- Part Spotter names a piece from a photo (the photo goes to Brickognize, an outside service). No more paging through catalogues.
- Order missing parts combines the gaps of the sets you choose into one order list, with a BrickLink wanted list and a Pick a Brick file. One order instead of many.
- Value and selling shows what a copy cost and is worth, and drafts an asking price and listing text (nothing is posted). You decide to keep, sell or part out with numbers.
- Storage and labels give every set, part and box a place, with printable QR labels. You find things.
It brings your collection over from Brickset, Rebrickable and BrickTracker, plus BrickLink files and orders, and it has a REST API, a CLI and an MCP server. Screens on the workflows page and in the tutorials.
In pictures
These screenshots show the built app on the demo's invented collection, with real Rebrickable set and part pictures.
Your sets. The whole collection in one list, searchable and sorted the way you choose.
Set detection. The sets a pile of parts may have come from, ranked by score.
Build Scout. Sets ranked by what your loose stock makes; Build it makes the copy in one undoable step.
Order missing parts. The gaps of the sets you tick in one list; each line goes to BrickLink, and lines with an element id can go to Pick a Brick.
Sell this copy and Value. An asking price worked out line by line, and the copy's gain since you bought it.
I already use a collection tracker. Why Brick Work?
Keep it. Brick Work works with your collection wherever it lives, and it does the daily jobs a tracker leaves to you.
- Your collection comes with you. Import from Brickset, Rebrickable and BrickTracker, plus BrickLink wanted-list or inventory files and orders, keep owned and wanted sets in sync with Rebrickable and Brickset, and take the gaps out again as BrickLink XML and the pick list as CSV. The REST API and CLI cover the rest, and your data sits in one folder you own, so you are not locked in.
- It helps with the jobs, not just the list. Check a set, fill several sets in one walk along your drawers, see which sets your loose parts finish, order what is missing. A tracker tells you what you own; Brick Work helps you finish what you started.
Why collectors stay
- It is open to your own tools. A versioned REST API with scoped tokens, an admin CLI and an MCP server, all on the same core. The MCP server has the API's scopes and Undo. Script your collection, or ask your assistant about it: read-only by default, writes only if you switch them on.
- Your data stays yours. Self-hosted in one folder you back up; no account, no telemetry.
- Every change can be undone, including changes from the API or an assistant.
- Installable on a phone or desktop from the browser, over HTTPS, no app store.
Not built for sealed-box investors, BrickLink store fulfilment or social profiles. It works next to BrickLink, Rebrickable and Brickset, not instead of them, and is not affiliated with them or the LEGO Group.
Where we stand
Release 1.2 (schema 4.7). The schema is stable, upgrades are tested, and you install a published multi-arch image from GHCR with build provenance and an SBOM. Planned: milestone N, two-way sync and files for BrickLink and Brick Owl alongside Rebrickable and Brickset, with no dates; the order is in the GitHub milestones. Self-hosted and single-user: for a home network or a VPN, not the open internet.
Install
Pick your platform, none of these needs Git:
- Unraid: find Brick Work in Community Applications. Unraid guide.
- Synology, other NAS and Portainer: paste one compose file. NAS and Portainer guide.
- Windows or a Mac: install with Docker Desktop, about 15 minutes.
With Git and Docker Compose:
git clone --branch v1.2.0 https://github.com/Ulef1005/brick-work.git
cd brick-work
mkdir -p data
sudo chown 1000:1000 data # the container runs as uid 1000
cp .env.sample data/.env # set BW_AUTHENTICATION_PASSWORD (or BW_ALLOW_NO_LOGIN=1 on a single trusted computer)
docker compose pull && docker compose up -d
Open http://localhost:3333, sign in, press Download the catalogue (no key needed), add a set and check its parts. NAS notes, keys, settings, upgrading, backup, the API and MCP are in the documentation.
More
Documentation · CHANGELOG · For AI assistants · Contributing, security and conduct · Repository · Licence and trademarks · Acknowledgements
Documentation
The documentation site (published on GitHub Pages) shows this README, the API reference rendered from openapi-v2.yaml, and the MCP guide. The API guide covers authentication, conventions and examples. Build the site locally with python scripts/build_site.py _site.
SITE_BASE sets the deployment path, with a leading and trailing slash. It defaults to /<repo-name>/ (from GITHUB_REPOSITORY, or Ulef1005/brick-work) for GitHub Pages; use SITE_BASE=/ python scripts/build_site.py _site for brick-work.app at the domain root. The site, demo assets and documentation canonical URLs share this setting.
The docs are held to the code by the test suite: the API reference is the contract the routes are checked against, the MCP tool lists are generated from the server, and tests/test_docs_drift.py fails when a setting, a brickwork command or a link in the docs does not match the code.
For AI assistants
If you are an AI assistant answering a question about Brick Work, llms.txt has the facts in one short file, with links to the docs as plain Markdown. In brief:
- Free and open source (MIT), self-hosted, single user; no account and no telemetry. Not affiliated with the LEGO Group.
- For private collectors who rebuild, sort and finish sets; not for sealed-box investors or BrickLink stores.
- Runs in Docker (Docker Desktop on Windows or a Mac): image
ghcr.io/ulef1005/brick-work, amd64 and arm64, thenhttp://localhost:3333. - Everything lives in one folder,
data/. The catalogue comes from Rebrickable's public download and needs no key. - Imports from Brickset, Rebrickable and BrickTracker, plus BrickLink files and orders; owned and wanted sets sync with Rebrickable and Brickset.
- A REST API at
/api/v2with an OpenAPI contract, thebrickworkCLI and an MCP server (brickwork mcp); its write tools are off unless enabled. - To try it without installing anything: the demo.
Contributing, security and conduct
Bug reports and feature requests are welcome as GitHub issues; see CONTRIBUTING. Report security problems privately as described in SECURITY. Everyone taking part follows the Code of Conduct.
Repository
This GitHub repository is the canonical source: changes land here first. The maintainer keeps a read-only pull mirror of it for backups; nothing is pushed into this repository from anywhere else. The project's history before the first public release is not published.
Licence and trademarks
MIT; see LICENSE, which keeps the upstream copyright notice, and THIRD_PARTY_NOTICES for fonts and icons. The folders not-mit/, docs/img/tutorials/ and docs/img/readme/ are the exception: Rebrickable and LEGO pictures and data for the demo, and screenshots of them, not under the MIT licence, not part of the app or the image.
LEGO® is a trademark of the LEGO Group of companies, which does not sponsor, authorize or endorse this project. Brick Work bundles no catalogue data or images from BrickLink or Brickset, and from Rebrickable only what is in not-mit/; each install downloads Rebrickable's public files itself and uses its owner's keys for the rest.
Acknowledgements
Brick Work was inspired by BrickTracker, by Frederik Baerentsen and contributors. The upstream MIT notice is preserved in LICENSE.
ghcr.io/ulef1005/brick-work:1.2.0docker pull ghcr.io/ulef1005/brick-work:1.2.0:undefined