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.

Website: https://openbricks.dev · Documentation: https://docs.openbricks.dev

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: binary wheels (manylinux, macOS universal2, Windows AMD64; CPython 3.9–3.13) ship on PyPI since 0.10.3, so installs are toolchain-free on common platforms. On anything outside that matrix, pip falls back to the sdist and compiles the bundled native extension (openbricks_sim._native), which needs a C compiler + Python headers.

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

Uploaded CPython 3.13Windows x86-64

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

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

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

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

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

Uploaded CPython 3.9Windows x86-64

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

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

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

File metadata

  • Download URL: openbricks-1.15.4.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-1.15.4.tar.gz
Algorithm Hash digest
SHA256 1cceb4a6f3402db00668424e83ad44ef92190cf1b9fcda59b2d0b6e30fe0fd56
MD5 1e7c2cda0acce7181234f1201f8fe3da
BLAKE2b-256 bfd0f7095c39f23ad0e0e599b09659758a9e8cb8850c3401cc325e53af02a22f

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for openbricks-1.15.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a4c4205e465992a6b4221eebd302a7e24b25ffb202c593fb740e5003c47f541e
MD5 3a0b676132d4cc37ac74a208170490fd
BLAKE2b-256 bf482ffa474537a6cad099c543128806f4e8f7bc573731a4e1fae4f2b6ea70c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.4-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-1.15.4-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.4-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8c58be21e86aa14111754e5477e614fdc36a30a7fa33ef04b9d57e5c008cd340
MD5 82c8fc54e4e209fb646d11177a5f680e
BLAKE2b-256 025273f091604286c0d7cb6a975e3efb4356ce34d0fe8309ad6075a6a170e15d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.4-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_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-1.15.4-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.15.4-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 4edfcfa333c23f8166a41dff17b4f3beebef66145dd76264087af7ec29795f3e
MD5 5703ad3fdc67f767fa1eac74383e3a2e
BLAKE2b-256 f73b1646ab34b598c0a7771c98d487723125a118cff599b5a66a5a34c4472bf4

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for openbricks-1.15.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ad8c35663689f20bcc7a6baafa4f23862fb98fdedc2d1cc4a9b812c01818336b
MD5 c3b327bb758c6331d382f31ce7a3c911
BLAKE2b-256 89beaa5ab78e0b958032e27fe8f11bb396a447d98dfb928d966fa39f3da69646

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.4-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-1.15.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4b8d7601a84976c5f3536435402d0eb9d90ecfa6cd1798a34c06d8baffcd84fd
MD5 8cedf74b80fab73ac718713532113f28
BLAKE2b-256 cba013f0cec2e56238b58ef113992fbcc5c0913ed2b46f405347f29548a85cf8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_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-1.15.4-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.15.4-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e88d5f7b30cda2e6caa4e9012b44c070018c4c34beadbb8357c030b9c928daa3
MD5 21dcebde0e3396ebe6505f4fd8e92559
BLAKE2b-256 fe1f1686e2eaf220d4bdb8c9f537b2f2e6cd03bd4364dc89eb0df6ca0a3094c6

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for openbricks-1.15.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e93f1188497553b0b254601e489b1801d8b59ed6f6e472dd2f940fb0543e0e0e
MD5 a272a3f95aa947833715cd45da46fca5
BLAKE2b-256 64159ad34d1f4ace6b3229f79447f31a4ee4b462de4204b9e6f1b1495dea88fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.4-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-1.15.4-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.4-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 25997929a42fa7568a61f95eb378779502d3b572e2a6a8c929ad7a5771c53799
MD5 32a459a050b36906030033819122f0a2
BLAKE2b-256 c7d95d47a8203648b1483848236dcb829abb3cf14ad15a13e6cbb2893bde4be1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.4-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_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-1.15.4-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.15.4-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7505124bfd9dde42d85294fa3cd4f6108e748592cbed6cf77f189a4f9d6bcc3d
MD5 b35573f084bf88b53e05e73b6be26326
BLAKE2b-256 b472b3a86554a57e6da2b85bb1b581b921c8be0c95b0c73af6f6df917766cab3

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for openbricks-1.15.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 195e8dc4a9795508567f465cd9a6cbac4a8c7de6b130e268452ebd8f7fcecb27
MD5 58d013261fdac1fd27f75fe8c419ed49
BLAKE2b-256 9fa48645dc72bd47c3ac8c9d9d70019d7f29a0c821c087692f1e7b8c1223514d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.4-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-1.15.4-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.4-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4f496cb8d0f977ba7c2b26ba8f55581fcbf6e5f84b85a058f9c74fc3995731bc
MD5 86b5924805c1b343deba34158b84e8a9
BLAKE2b-256 c437dc156a1f02301d87023e5477af34e38fdb1dc10c247608616f3c0454389b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.4-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_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-1.15.4-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.15.4-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 be4c5eb57961fe1a7d120fb9986b71394b9889c7216447c518d70227aee55c88
MD5 2391f6b30ec866de242407511f851936
BLAKE2b-256 ac465249e9d252d21c68bdf6273ec6f33796bb51b1f3ffd44682d3683d711aa1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.4-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-1.15.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c21dcf73bf106f24db705c64276b91124067fb5f6529615e4d545a965a1fe6c2
MD5 7674d6fd70b889d46eec64f9667b2e4b
BLAKE2b-256 b9f4850be940b37c87ef82e039dd8eef18054dc0c67435643bf620c617a5061f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.4-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-1.15.4-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.4-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 50bcb1358f6b028e50ed1195a8c4a8c797d88e370f5690ecd9d74136029aa827
MD5 3687faed5f982c70a29673b6a8f5b768
BLAKE2b-256 2dcd8d835667fbf5346bb75976519095cb6e2eab181226167ec12ed30eae0499

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.4-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_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-1.15.4-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.15.4-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5a94b0349e449068dc0c973fdb5614d83edc5b2eeb95d4c430538308055666b0
MD5 e33d3b8020ff9bc534e83b5d6e2d957c
BLAKE2b-256 a0ab3724b949178a12965bf8e49242daaed379b22a9dc4d662ccb891e15cb6ef

See more details on using hashes here.

Provenance

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