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.56.1.tar.gz (3.4 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.56.1-cp313-cp313-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.56.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.56.1-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.56.1-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.56.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.56.1-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.56.1-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.56.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.56.1-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.56.1-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.56.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.56.1-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.56.1-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.56.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.56.1-cp39-cp39-macosx_10_9_universal2.whl (3.2 MB view details)

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

File details

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

File metadata

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

File hashes

Hashes for openbricks-1.56.1.tar.gz
Algorithm Hash digest
SHA256 9e63106afaed6b9284c1aed428642251bbbfc6032a8d5995671ea3a5ea4634cc
MD5 f97bd852852fae7199d8e59b6223d999
BLAKE2b-256 87fa8c69a86068e682a0ebe8a74ff8f9a50deb72227636765e1155658168b428

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 18d7255f872b1a9488bd9d927d8e69b94a8c7784187bf77cf7b703c1418860c7
MD5 ddb66b31be20088753942303cf90b28f
BLAKE2b-256 21ed60a281fce18b4a112b63cc82b7a997dae100671787add64d4b97f0da982a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.56.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.56.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.56.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 40439b85d727cb4a4cb54fc6ebd6ba0c300ddcb4497e0bbefe204f3abd66d734
MD5 d9af3a24e6fd9448256c3ef61a805ade
BLAKE2b-256 fbe4bcde97bb4653ee1c79af9bfab7d0c85fe6804b61d7507a7d7dcd92c193dd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 37bcfda70ae4daad97233b5aba515ce66eab300cb04e2ca5f14db5ef9e94f27d
MD5 ef004d65fb4d233cb7b5c3c4cb8e04cc
BLAKE2b-256 7544c49dd55f19dc01ffbc89290f77283dbd30c0ddc353ab1a63c81d94c1e698

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 cf043e87246b60dcdc05fb88fa9da20d3045d80469816fcc996348d7ea53ac65
MD5 0036d3209b0faa7e23e6137e8c6ad6f6
BLAKE2b-256 6aa639be79463673c74873ab3a5fa2e346d509a31f50ce648ad9c0b2c57b4708

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.56.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.56.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.56.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8c01443793bcc3687684e7f8ae7c31c100edde36f258cee93b8c8257eac072c6
MD5 bc74f7ea227d563c7e2b6643b8e51bb6
BLAKE2b-256 7c8a01af3a7c2c73613c2f5c1e472ee17f875db95b4d71190cefbc5fc4b8918d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 78e10fb49e01edeff14f0a3fa6bb03f235268fa4cb323a8d6fcbd1ec6ac2171f
MD5 ba8f9b2a061350728c55646985a3c531
BLAKE2b-256 ffda87f1ef6a3a0b1cc5a7c60c9a08d020185c67520bf9b1832aa4dc6880b683

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 412baea9fe046952d601c9f04249ac0be30129d645fb66e36022c5c59f188d10
MD5 1f155a5fbf2476e4bd1ac7b63a184ddb
BLAKE2b-256 494011ee43c79e3febc2b5c0b79c052162283c44dacc22c1ec5b068218916358

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.56.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.56.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.56.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 889afa6cb0e5e4602d6eb568b3cf2ca0c4eef8a04f0b3ed4e4813da9d94997ea
MD5 954bc014e2c716a5df8ab14ff626c008
BLAKE2b-256 7a243ee7f28c06c490409e84392f60b71272bde11df1281c65bf269b6afa9530

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c46783a422741d8f54e1dece1816301c70bdef3263de5b985fdc75db98c1303f
MD5 b0e0c84a28c88db4d2e233dcbeef8aa6
BLAKE2b-256 761ebad705e18a80c3eeee11cbe28941e2a1b9f81475f37a64b4f5e0cef08095

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8a29a98a5b792b50ebac8712703f8b7e9ce155eb660c36f89903e9172d086437
MD5 213f35c6b016a3531cc7c31ac0493ffc
BLAKE2b-256 680ea76878e351ca900e0b5fa52ef2723b8d755ed5025bed7ea902f374236989

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.56.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.56.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.56.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5cb50b66006dbcd6cac9f87a1013f55fff194dc23711607929c04ff47e6248dd
MD5 2da1a99e75869b6aaea01a01e7b9fe56
BLAKE2b-256 19eace9c05faa670c859e9335f7c5d90174b4f34bda7fc6b5b3f0f7ea0683a96

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2f4306db9b0358eab82f032d4997bcf67012b815f54130e177126e1adcd91403
MD5 3c27c74baf4282a90079da69d3e14099
BLAKE2b-256 82858f54505c608f18df089b165185e56133c9d1b6c1822b126f6b72edfdccb6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.56.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.2 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.56.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1b8894e32c0e3d56ab5623e7f44130563ed02e8407f3aafe29b7e155d6a0b9a2
MD5 a6649933eb6f244f7ec9208dbf3462b8
BLAKE2b-256 337b5680f4fd9590301425c327bbfa82733ecd3fcc49ee86291acd8ee28db504

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.56.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.56.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.56.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c7f8c85610fe4fb426f6d2df7fa22db3eaa387a81aa2daf8a71c3bfe3b2de745
MD5 8c625ec90c54117caba5a6008a897cb7
BLAKE2b-256 39b7ec7616c9c250ae262108268a7e8c72c08ca85500d020ea8f6710b0521c7a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d1306d2c63afde6037c39f7b945ed072c498cdc0a9839dbeaf99354b245cc67b
MD5 834046c877fdc2882099a5c5bef309da
BLAKE2b-256 a589ee20a929395aa2444d8bf5465a3ac24111f019d3ae4ee142d31066a21cdb

See more details on using hashes here.

Provenance

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