HackyLens Code is the standalone browser IDE for the HackyLens firmware. It provides a Monaco editor, Web Serial transport, atomic script upload and file management, startup selection, run/stop/status controls, and live stdout/stderr over HMPY v1.
This repository contains the complete buildable source tree. It is derived from
Pybricks Code at the pinned revision
recorded in HACKYLENS_UPSTREAM.json, with the
HackyLens-specific entrypoint, transport, UI, tests, and build configuration
applied directly. See HACKYLENS_NOTICE.md,
LICENSE, and UPSTREAM_README.md for
provenance and attribution.
- Node.js 20 or newer
- Chrome or Edge with Web Serial support
- A secure browser context;
localhostis accepted, deployed builds require HTTPS
node .yarn\releases\yarn-3.3.0.cjs install --immutable
node .yarn\releases\yarn-3.3.0.cjs startOpen http://localhost:4173.
node .yarn\releases\yarn-3.3.0.cjs typecheck
node .yarn\releases\yarn-3.3.0.cjs test
node .yarn\releases\yarn-3.3.0.cjs buildThe production static site is written to build/. Serve that directory over
HTTPS or localhost; opening index.html directly does not provide a valid Web
Serial context.
src/hackylens/— HMPY codec/client, safe Web Serial transport and UIconfig/webpack.hackylens.js— focused production/development bundleconfig/jest.hackylens.js— HackyLens test suitescripts/hackylens-start.jsandscripts/hackylens-build.js— entrypointsdocs/HMPY_PROTOCOL.md— protocol contract mirrored from the firmware repo
Large upstream LEGO firmware binaries and instructional videos are intentionally
omitted because the HackyLens entrypoint cannot reach them. The exact omission
profile is recorded in HACKYLENS_UPSTREAM.json.
The previous firmware-repository overlay and bootstrap script are preserved
read-only under migration/from-firmware-repo/ as migration evidence. The
canonical editable implementation is the standalone root source tree.