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.65.1.tar.gz (3.7 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.65.1-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.65.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.65.1-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.65.1-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.65.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.65.1-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.65.1-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.65.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.65.1-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.65.1-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.65.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.65.1-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.65.1-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.65.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.65.1-cp39-cp39-macosx_10_9_universal2.whl (3.5 MB view details)

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

File details

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

File metadata

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

File hashes

Hashes for openbricks-1.65.1.tar.gz
Algorithm Hash digest
SHA256 792a47341e411bc8c6457a1ed4d9cbd3efef6d0bae015f2c8fe01bf3af9fb884
MD5 2b2063cbda33d55ddb69416d3617f5a3
BLAKE2b-256 6ecc13909b7a084e57dfaaca802abf42270bb157b40aeb9764f3873a995f38cb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9b0ef6f30da62f845874ccf9f634100e4584b005bdb55066b9eda9a2584f9af9
MD5 0e70a0fc61055f33816eb30a910ee00e
BLAKE2b-256 0e9a8ebbe60e307658df02139a8e781a6adbd7e3901c6ce872f9f2434c046701

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3e00df0f25ace7dcaefd98ceb9674c94e593c80894564ba681a891d03b186ce4
MD5 bb972d4846a38fd427f8d8a135e33679
BLAKE2b-256 f6ed6d9de159774d4c4a3ea62497cc065235e37ad18299dcaba2b4f3e3eb4b82

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 2be2010cfb034c05c2345e869a9b31d3f419d69b5f9d6880584557ce2a99d7f1
MD5 728878e18ca5fd3352af3b83151e0de4
BLAKE2b-256 b3d496ba0696caff30114702d47b4fdbd8f36b6467501ced7c35cf1a98ba2d0b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0cbc9f0d03867824cafb9e648272e4357b0e4515c6254c8bad4f7f43042c5f02
MD5 8e1860ea69cb12413883d47b99792cec
BLAKE2b-256 1358432955e072e4637e026e84b6d2a548ad21800ad26f511b21233d71fa3e8f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f23305c052e0451829b3e21ff40577f9753f6b5103c107bafedc94dd6ba71aab
MD5 26c8c16e8714f5e31016024f25315430
BLAKE2b-256 41c12085beeda5360a9c5b6a9a891554015129c46e70d4807e5ec3c9593b8475

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f8fe8a2b64a46151ea2104d98739f84420423f2790390d5118e8b5abe19661d6
MD5 ce99c45ac1341eb0a673343640be64a9
BLAKE2b-256 4544abe868925445f3f1306aeaca0d7283264907156c699f32972d3b5fc707ef

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cc5225df53ca62ea056a82203f099ef682256201ada0039ad563ecce2d07d01c
MD5 6fbb8b6db0c9bd847b2e24b4768752a6
BLAKE2b-256 c47854b09cf42d2c5287fcb66cd574db672a8ad336eb32568233b604f439db2d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 208a39f34b87766d36ee7d85214a27d9ba90fc59b68d64b5297f0bbc37379650
MD5 b3c3cdf502854f3aa38a289219d1beb4
BLAKE2b-256 526fabcc1e697e32ae6caaf8036b167fdccf7d833bba5ed3518b3830c3658ae8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9c2bb8418d0cb6e225a876020c2bc1c966c4526209b58a56d5280657ae674d20
MD5 23504210617c52a3b5157e506658d65e
BLAKE2b-256 38615dca106ea2d1c68c54d207a0601cdaad3f0c7298b42dacdf0bdd66620a6b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e1648f577282d3d9941be8c23d16e73efe258bfc14dab6724fe5082a16cde4b0
MD5 0227de1456e25c4d1e20157406a8edc6
BLAKE2b-256 d4021e1cf112a15263cbfa56b8e6832d4686f6fe170a34e3dae9c420acd4eee7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 74063fe91b6789dc4f52be324b10f28ef4ddbe633ddecb7654c4a3973dd091b0
MD5 ea7070c5910d133511520a767ed97228
BLAKE2b-256 30c6b74d3b2fd9e1c3b82b58dd4969cc972fcdfd04fcdcd1a2335eb235097ccc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 87a3d097a49539283aa912a3518b649c0b6e27e02f6de77f51268ec809ab3d02
MD5 e5540bbd17bd055f5c999390d7c89131
BLAKE2b-256 ca4d5b5cf9b0edc49b2c96d838eb0e57d8dc2d6172d5eedcb1acb6b979fbb8fe

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.65.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.65.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f7504b265b7aa5e2149cdd9e496160534b4b9a70f094a17cae00e76f2a63b990
MD5 4c1c071ddf001c1a718860309ac78063
BLAKE2b-256 1094f7ba28de5e6212fa5b26f972b82721cb8c2be25a93456e11ac0306115208

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 45d5e459c9a5edec1f7185c3582dd75a7fcb137f15ad80874f1e184734800c0c
MD5 530b95de6461fac02e660a4a0f097266
BLAKE2b-256 8e6025d24cf4d8c874e666990d821d9d85c16b2326e8ed4d80dc92edc017c52d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1ba3529b2ec555adfdf9fea8ab23a08dcffc8e0e1a1a2095cb7013d90e79f2ba
MD5 9a08640d3389719d1ada717ca7d11a7f
BLAKE2b-256 52f433555a69f412bdae1e43072056783c6b123f64102e1f122fcc414b9c75cf

See more details on using hashes here.

Provenance

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