Skip to main content

openbricks — host-side CLI + MuJoCo-backed simulator for the openbricks MicroPython firmware. Flash, list, run, upload, log; ``openbricks sim`` for the physics simulator.

Project description

openbricks (host CLI + sim)

Host-side tooling for openbricks hubs — same UX as pybricksdev, built on commodity Python tooling (bleak, esptool, mpremote). One package, one console script: openbricks flash / list / run / upload / stop / log. The MuJoCo-backed simulator is built in too — openbricks sim … opens the sim's CLI when the [sim] extra is installed.

Install

Recommended — with pipx so the CLI lands in an isolated venv and avoids the "externally managed environment" error on modern macOS / Linux distros:

pipx install openbricks            # CLI only (lightweight; bleak / esptool / mpremote)
pipx install 'openbricks[sim]'     # CLI + MuJoCo physics simulator

Plain pip works too:

pip install openbricks
pip install 'openbricks[sim]'

For development against a repo checkout (editable install):

pip install -e 'tools/openbricks[sim]'

[sim] adds mujoco (~50 MB, native OpenGL) and numpy — most users (flash + run + log) don't need it. Without [sim], openbricks sim … prints a helpful "pip install openbricks[sim]" hint instead of crashing.

Note (0.10.x): the package currently ships sdist-only. pip install openbricks compiles the bundled native extension (openbricks_sim._native) on first install, so a C compiler + Python headers are required (gcc / clang on Linux/macOS, MSVC on Windows). Manylinux wheels via cibuildwheel are a follow-up — when those land, fresh installs will be faster and toolchain-free.

Commands

flash — program a hub

openbricks flash \
    --name RobotA \
    --port /dev/tty.usbserial-XXXX \
    --firmware native/micropython/ports/esp32/build-openbricks_esp32s3/firmware.bin

Writes the firmware image and bakes the hub's BLE advertising name into NVS. --name is mandatory: two hubs with the same name can't be individually addressed over BLE.

Port syntax: /dev/ttyUSB0 (Linux), /dev/cu.usbserial-* (macOS), COM5 (Windows).

Useful flags: --chip esp32s3, --baud 921600, --skip-erase (faster dev loop, keeps stale NVS).

list — scan for hubs

openbricks list [--timeout 5.0] [--all]

Runs a BLE scan and prints every named device found, sorted by RSSI (strongest first). --all includes unnamed devices too.

run — stage and launch; button stops it; client exits on stop

openbricks run -n RobotA examples/hello.py

Stages the script to /program.py (same target as upload) and triggers the hub's launcher to execute it immediately. Output streams back to your terminal in real time.

  • Button stop. Pressing the hub button while the program runs raises KeyboardInterrupt via the same launcher path upload+button uses. The client sees the clean "stopped by button press" line and exits.
  • Program completion. When the program finishes (or raises), the client disconnects and exits — same as pybricks-dev run.
  • Script persists. Because run stages to /program.py, the hub can re-run the last program via a button press without another upload. upload and run differ only in whether the client auto-launches after upload.

Stderr (e.g. exception tracebacks) arrives after stdout and is surfaced with a blank-line separator. No paste-mode === echo — raw-paste mode is clean.

stop — interrupt the running program

openbricks stop -n RobotA

Sends a single Ctrl-C byte over the NUS REPL bridge, which MicroPython surfaces as KeyboardInterrupt. Useful when openbricks run has already exited but the hub's still chewing on a long-running user program.

upload — stage a script; hub button launches it

openbricks upload -n RobotA examples/wander.py

Writes the script to /program.py on the hub. The code does not run automatically. Place your robot, press the program button (GPIO 4), and the program starts. Press again to stop it mid-run.

(Pybricks calls this same operation download from the hub's "download to me" perspective. We name by direction-of-data-travel — bytes flow up to the hub, hence upload.)

This works because the firmware ships a frozen main.py that:

  1. Brings BLE + REPL bridge up immediately (so openbricks run / upload / stop are always reachable, even when no program is running).
  2. Instantiates the board's Hub, which wires the BLE-toggle button (short-press on GPIO 5) with LED feedback.
  3. Watches the program button (GPIO 4) via openbricks.launcher.run() — a short-press runs /program.py, a second short-press raises KeyboardInterrupt in the running program.

Two separate pins (4 for program, 5 for BLE toggle), each handled by short-press only — no duration-based dispatch.

Pass --path /alt.py to stage at a different filename (if you've written your own main.py that reads from there).

Tests

cd tools/openbricks-dev
PYTHONPATH=. python -m unittest discover -s tests -t .

No real hardware needed — esptool, mpremote, and bleak are mocked.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openbricks-0.10.11.tar.gz (17.3 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

openbricks-0.10.11-cp313-cp313-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.11-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-0.10.11-cp313-cp313-macosx_10_13_universal2.whl (17.3 MB view details)

Uploaded CPython 3.13macOS 10.13+ universal2 (ARM64, x86-64)

openbricks-0.10.11-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.11-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-0.10.11-cp312-cp312-macosx_10_13_universal2.whl (17.3 MB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

openbricks-0.10.11-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.11-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-0.10.11-cp311-cp311-macosx_10_9_universal2.whl (17.3 MB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

openbricks-0.10.11-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.11-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-0.10.11-cp310-cp310-macosx_10_9_universal2.whl (17.3 MB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

openbricks-0.10.11-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.10.11-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-0.10.11-cp39-cp39-macosx_10_9_universal2.whl (17.3 MB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file openbricks-0.10.11.tar.gz.

File metadata

  • Download URL: openbricks-0.10.11.tar.gz
  • Upload date:
  • Size: 17.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.10.11.tar.gz
Algorithm Hash digest
SHA256 68734a1db3f814fc9ebe1bf0a788d341fa855008bf9b1171363287c34b9cfd7c
MD5 8aa0fa74db407e6c1bef6b8bc30ed70d
BLAKE2b-256 788a25ec3cb1cf0939cecb8d302e8c4a16eb18f7f2f11b63cb08c7cb0d85afb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11.tar.gz:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for openbricks-0.10.11-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 76ea4307151575118f88c550d1a4d97d9a6c1a5ea275ac0c2ab42c215db6b71c
MD5 bd7e036eed3e6bb6ceddcf985f2ef17a
BLAKE2b-256 7b88bcde55a4a4d22eced07df1f4eb26f50d8ecee501ecc55f84870b492be96a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp313-cp313-win_amd64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.10.11-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 473f6afab2249248d5db8ea0a6ae9c42e53dd49b8d378b26dbb4c4099ea2bcb6
MD5 1beb2bd9d295cda8cd91749e36578e3c
BLAKE2b-256 4b5b17c65e2e597c663d06b189ef9ada13d56863ce7c202dbc81c5cdc581c7cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.11-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e0733afb7f20195c0f24f95bfc8a27f343fe13c87719f2f6124c4b6139e5412c
MD5 6217d5d867d6f34ed697867f4e73e4f1
BLAKE2b-256 09c9c0cd1682986d7ae74eed52c74bacc736d9b19924da9bc23ece006f78fe3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp313-cp313-macosx_10_13_universal2.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for openbricks-0.10.11-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 81972d8af8e6d45c9284cf1027728adba2019de7e839a809038b53960afbdf3f
MD5 fa4fc98f45a7d047e0350829aa058f79
BLAKE2b-256 8d04703774287983ed5d23d22bd1dbfd8cc5a84234d993e615527cd9c5dc12f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp312-cp312-win_amd64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.10.11-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c0348a261f7daf4eaba541cc6aa0cc73c9aa3b86cf41cd425db77631535eca8b
MD5 5ffafc50b3541f35d86e802bd790013a
BLAKE2b-256 1dbf220a9ac253fa15feab89a3a1691bc302af684d672a705c02ed8879e05c16

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.11-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 0569d6136abed263293f60aa25582cfd5278a627f2f98f262d4c00dfdeb37d9d
MD5 febef0017bb6919ae36e8a7bccd44719
BLAKE2b-256 49e6aff1831ed750f829985a678c2eac9f57baf8cf50287498d426c951e8680e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp312-cp312-macosx_10_13_universal2.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for openbricks-0.10.11-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 47df885ba6540f7485d992efe4541a7b0088ccbdc8bc69ad3cb016d1b3a11c79
MD5 e0058ab0b9ff028337a30ef6e1fbbc2b
BLAKE2b-256 78713b5f6c65329e5b4db6e639d4539edaa881bd38a61e73cff0dd21597a3ec9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp311-cp311-win_amd64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.10.11-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c46a98163983f3a671af58bf64c13d3d883dc0770db4790e77d6f428627ede6a
MD5 14a89808fa7382568f45debda037b0a2
BLAKE2b-256 2b47d7faac7d81fdce301bbb01fb9709baefb54e57e5ae2ecd0188038d8617f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.11-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f25bdd409e8bad2da7ff31edecedb609e962679c7ef5b2f8f2cdfb87decfe7bb
MD5 c15fdc0d05f07921a980b51627d7082e
BLAKE2b-256 acdf04eabad71e704ad1a2cc5c45ba596c6d54b3de61a1ef0af055c5c99a45af

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp311-cp311-macosx_10_9_universal2.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for openbricks-0.10.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f11a870aefc9a073bc1c113f160d898352196d4ce6b127adb0284e689bfad94e
MD5 6edcc7f2586fff4475c8fe0821b68ae2
BLAKE2b-256 47970f4906d4c68d9cd91427af9a389b646819c3a5fd9552a54e42da49804c6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp310-cp310-win_amd64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.10.11-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6c83d9fb8993a3ba5265511d65cd0efdfd032399dafeb49fab5d7603b6ed0675
MD5 40022c5b01e3ab06954482955ac89373
BLAKE2b-256 214a3741344eff58a1668c71fcdea5db04975860164475728a378088855ff596

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.11-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 97771ab885b27f708b386102cd5c18bf11718778414630ed8c7145b1fb583959
MD5 2db47aabb68263cd6a59ec904897953f
BLAKE2b-256 4c69e868498bc370c57f12d0b493e41e45c19de01e0b29f1bd26ad8356a5d672

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp310-cp310-macosx_10_9_universal2.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: openbricks-0.10.11-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.10.11-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1cdb160cfa9559d6a9b76833b9584fda1a95ffcee917782761939b0d1ca3428a
MD5 a5a31315d13184be688e3d990a05dc2b
BLAKE2b-256 6a42de5e774c47dfcde06e1c63abec302ecc2707c1cc8552aebe032fbd9a2469

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp39-cp39-win_amd64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.10.11-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3328a5a8e2b72e60c740a2ca87497f29c315ccb137a2dd175e80d1dda601a8b5
MD5 fa1b33ffe1ed080342da019b71fc4715
BLAKE2b-256 e2c2fec701c979088fca4c93b86479091daa1ec6c5918a306b6df1ea7c2e02d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-0.10.11-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.11-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c15fe06e63a1ebb2ab623f5466b156cca2dc002142ea4457af680ff3d376c2f8
MD5 22591bb06a7d7c86731fb8c606b34893
BLAKE2b-256 c8618d56b0704f9b450b9074d20ad172c25261d46bd67c4d35daf758b6bc524b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.11-cp39-cp39-macosx_10_9_universal2.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page