Skip to main content

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.

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.94.0.tar.gz (3.8 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.94.0-cp313-cp313-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.94.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.94.0-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.94.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.94.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.94.0-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.94.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.94.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.94.0-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.94.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.94.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.94.0-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.94.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.94.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.94.0-cp39-cp39-macosx_10_9_universal2.whl (3.6 MB view details)

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

File details

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

File metadata

  • Download URL: openbricks-1.94.0.tar.gz
  • Upload date:
  • Size: 3.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.94.0.tar.gz
Algorithm Hash digest
SHA256 46ccea53b2e3b395432efca992957a56d4ee209b79a75a6f2dc1eb4ae7b865dd
MD5 ea5016c1d10d27d4a4355e2943c896a4
BLAKE2b-256 1320fffbc1969ed4c148bc8f098dc200a3a39f15133a699f84427fc71c193878

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.94.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2e6f68f71fe3468132a32fd7e84b24bce848d65cbdebb41a13cc05e743262f2f
MD5 ead93b15e6f1fe325df9fe8ae2ccc456
BLAKE2b-256 b8740bcc18efdd13d2f7595aa7f957ea7e7a48f4416c3fc563c19e9da2278368

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.94.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f3da8e32974bd6fe98a06649b028a0059bf5d6a83763d06d247ee883a2e4fbe5
MD5 d2d973c29266999a0bb6f02a66d0284c
BLAKE2b-256 6254898177f18139cd45bedb3363375ea569b017a6676e3ffec16cbe60e83787

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.94.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 4ac5423c4b38a0099d264337643b56a7096edfee27bca379c60f90b43176376e
MD5 fcd0dd2d668392594894932967e189d6
BLAKE2b-256 090b4f4ba25e9f6bfbaa1404d0c4ee7a910692bff061a89c7a99cc1d90853e02

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.94.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0382ba9e931d4a414ce7f17b845872da74dcdb36505b14b760978edaf455bcc4
MD5 697fce641f7caeb897306b02c23e34c4
BLAKE2b-256 1029087979fdbc322555e622881b078411436f65c084293b40d61be54fe2c11f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.94.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 cbdab5aaaee3527253c74b02c7e4bc8760255190c353eafbd63c11b63f7d423c
MD5 f91b276c3be9f43bace32e1d99a65e83
BLAKE2b-256 1d602962aeb5726dbcb01467ec94ecd2393f378a630670fc051a8fa9412bbc02

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.94.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 1abdfcf9e1281841db943445c4de952ba67a41b4f29fe62cfeb85466f9702e92
MD5 2e9cf7e1f3a9274417e70ec486b2af6a
BLAKE2b-256 4aa1b26d5984a22e770ae09998425733c20fa16555117c850345e03024099293

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.94.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7ad8b863cb897c876ec1524928893f835c234b0336411c338cdfa76c589b0709
MD5 725bb9c6ca4351c32c7673bee98813c4
BLAKE2b-256 33ef90e7f28e569575b958845743272d8143ea7bf41f4444f1406365ecc4db55

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.94.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b1e3172ae33a2c526569b128ac27959baf3c45df9196ebaed0fd20b62b875e75
MD5 785889d133b2c7034ad102f16820b867
BLAKE2b-256 7da931c50f4200c892c43c5c2aa2c801860b9604d3835f7e07fd7fdbf2f6228b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.94.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 90a01ff265a99d8d7d42c44f26a67d73a8bccbea5b29239ba05a5bcc6fddc0c4
MD5 05dcc35679abb1dd0c77702cd8b412bd
BLAKE2b-256 0bc6f3a7e42adbc18f13dd6576d68b852b41b2c339e57b07fb777478933b223f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.94.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8710722c434af7d1539e614235f4eb935dce622cc5f643f49230053f15db4ed9
MD5 79471a4b21bff842cafb4021004ed849
BLAKE2b-256 45bdebef0f30a9180c24a9fb03b3d34c831f85da207cc3fffcc8a38d4667fad4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.94.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 193f1d39bdee995f351b1d2afb9bbbd9b64315dccb5e5df054aa7e8b55672e38
MD5 821710fbbef3fbb81b5bd8c7e5449c5c
BLAKE2b-256 b6b298f14283cb8d2993b7f14cbdc6c7926c32edb8e41d67f3774c47e111a0a6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.94.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f988c191e576fcdd86592715b04397f30bfa9b3de965c09ed8e4f2466e4630fb
MD5 02865081d19ffb964c1f966720ae8cc1
BLAKE2b-256 08c29f3a0f7492d75bdcce1565214a0a23a67aa62fa115d5ba4b620e3350674f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.94.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.94.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d1a6f18e0b45a79fd5e261a042fa5022ceb4cee7ff8f722a14ca183a4e6bd533
MD5 44d192a8b6320a4d670303eead91e2de
BLAKE2b-256 48c92b2ab1b3112dd25fa5fa790fc6ca637b10b722cb8d0f3a0a91e7cddce88a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.94.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 516cc05febceb4a4aca6fe1062f75636613423a7bea1fceeacae6ce8092d5efc
MD5 592ebcff10b089b0f18b128443514bdd
BLAKE2b-256 aca31384f912c79aa061ca096d4aa3209f7abe3edd9381d5c7591ec1b9d5ce43

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.94.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f5f4bced3e845747a6a91981aa43bbe1420c01d6b998d3fb84813150185f04a9
MD5 0695c448ac52247bbe0f1e3c7a14a6f2
BLAKE2b-256 44c99f3860ece039a1aab1e202c430e369d2710b961ed99919d8e6c6794b9420

See more details on using hashes here.

Provenance

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

Release history Release notifications | RSS feed

Supported by

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