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.13.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.13-cp313-cp313-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.13-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.13-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.13-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.13-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.13-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.13-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.13-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.13-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.13-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.13-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.13-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.13-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.10.13-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.13-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.13.tar.gz.

File metadata

  • Download URL: openbricks-0.10.13.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.13.tar.gz
Algorithm Hash digest
SHA256 178bdf234ee7766c11680eea16b5b6fd0210d1353ddb6eaa7a464bf0440c6c56
MD5 1dfe27795f6c35fef20d0dd612376a92
BLAKE2b-256 e580171b1ab78f0a883187e37632f90dda3f8f25839033ea21685ca786f2e546

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13.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.13-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for openbricks-0.10.13-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a36a2c2de6bf6317973abfe941326128d5c6d2f6511a916f364a2a544b0d4181
MD5 48d8e13389b57c776e00966864ad85af
BLAKE2b-256 2aac5a1e35a7a362c7ba974246bf9828a7eec90646eb80fe85735e6991089275

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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.13-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.13-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0c423926d8f767e12f1fb3ba093808aab40749d777c876e784581d9f960b5c83
MD5 750f5c2659207d6818a38ccfdaa20218
BLAKE2b-256 1897ff34c736420beeb1d06c7323b5765d49064b1fa0689d4fa9bea3f84b2103

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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.13-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.13-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 54a6ce2152a3ff258e9f1e69bdc72b10158c3021a854a938cb29db2adac4ecf6
MD5 227a211bc153e8c5e3f5f4a873f443a9
BLAKE2b-256 c8529516e8f0047f5d19761edbfcd5f4f724618a38720f4e92e2ab01dbaae919

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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.13-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for openbricks-0.10.13-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6b88a64375734b50bf106bfd4d3a91b2536bca02465a8306777ad6e36b7679cd
MD5 0b8c5763fbeaf4837f05a2b37c611b3c
BLAKE2b-256 438f66f00403e21a0008bc14366421ce9c68f893e52c486a1d80974933fa8f7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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.13-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.13-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8c83be2c6ff8826534694d2941560d3e1d5047287213e484aaa88c7156639b46
MD5 1a6d8a0fb78871651ff2c141220c8e4d
BLAKE2b-256 d36da16220fcc955545f5397cfdcc531d5f14cff8f36a626832dd950ad26590f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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.13-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.13-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d478e04836a8e1346e968ce43b9fade425efa9f46c56119bfe02f91f7d486b57
MD5 75cc9f2b110a0a3062f84ee6715d3bae
BLAKE2b-256 f9a284a8b8d74d4c75e142f3d14814bac7c3103fa0b178b9db44093343731412

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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.13-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for openbricks-0.10.13-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 78461f84cd82ad63ffb2dfdfbba3a6759e9d9dd74a52e83fa716b629d9f24c95
MD5 fa1d9167ff3b6ab9be851d561dd6b87b
BLAKE2b-256 03fffe89fda2e7383ebed474e5d1100b06788be5a87103697ee40ef2692cec00

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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.13-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.13-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0fc854339ad7207ff38aee579bf4b5efc2e59e6fcdcf496b46f337659c7e5832
MD5 1233f2e927422a0cafbc753c1e0921e7
BLAKE2b-256 8faadb75e4cd59179f0189b13a407d106dde69d403e1b0ffd327721589364035

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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.13-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.13-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ed2d40dd4354b347955f8bb5e1e0e24272b48732bf27dc92b1c93d4ab7e43927
MD5 86150045b78cda0e8e7640567a80f737
BLAKE2b-256 97dbe919b66459a62c05bfbe583e69dd22c7b4d45f05f1458bece1c3af7dd0fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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.13-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for openbricks-0.10.13-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b5555b38645d47dc32d6d3aca2cfa9bf6deebc7cd5310579cf23b1fed7cc0052
MD5 3ee52609705c708b1d2c0523f6b41905
BLAKE2b-256 4c8c9a6e56a366887f91f4b180e8c7add2285827867a62dbf2c0f1247e13012d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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.13-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.13-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 aa8d24bb6c94c9969dbfb545cd477872d28c555e8274824bd9528d9b800b54d9
MD5 2ac7cb47140f6a810b956010641432d4
BLAKE2b-256 68c56e4fe1b547058b8217da110a97f4452235b7543969614491d4b7e755365a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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.13-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.13-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 75c85160ad20ab5a74783fdc5ac865b66e9578c852fdfa4c0eb984e54bd37465
MD5 2ccb5599cd32702d39bb41a42fda14c1
BLAKE2b-256 9ca7e6189290a5a282ba450b415a335cd694389616cb70c9afb55856625fd84e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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.13-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: openbricks-0.10.13-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.13-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9956d9ee37855d266b952cd93d2780f80d9c555f8000b15c3c071ca2ad5b3284
MD5 a7899d993f2082f716ffc78bdbcbadca
BLAKE2b-256 9496e9f01616176451ea9ae5d7b12815bd5eb65effdce12044d4b03855af0120

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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.13-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.13-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 29007b6cf06acf7120a086a887e6ae9c4e29ad63b461c0397f90dc1316bb5664
MD5 2964a4ceca29e1daef1a140f73980f5e
BLAKE2b-256 60d501513e434d6faa5b17fc70e2e99d81bd2855150c8a6cb54730fffbdcfc33

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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.13-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.13-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c8d5b5c9a4e7c2ff82e0d7268e7e874e7ee815d708642a52bf0c89cc02c92597
MD5 cdb1590704d7092feb057477e1376452
BLAKE2b-256 0b7ca0e6c1a458cc8b4cf7ecdff65e40203c6f209548d356bc18c9d25bb6b4be

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.13-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