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

Uploaded CPython 3.13Windows x86-64

openbricks-1.32.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.32.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.32.1-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.32.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.32.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.32.1-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.32.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.32.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.32.1-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.32.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.32.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.32.1-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.32.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

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

File metadata

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

File hashes

Hashes for openbricks-1.32.1.tar.gz
Algorithm Hash digest
SHA256 2851e3af487ca2c4892a543c516411d0bfb4bb5695ee2b5c08146dc6a2282f10
MD5 56653a0e7b7b5daf5e61a789a4760d2d
BLAKE2b-256 7bb6e8ec2fc60ef1045f2a4a2bd5904ea905b75e182791b98e23f74d57ff56a2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b8f85a0932db6f5588d7bbee92b554034133694848fc76835840b560f0976c4d
MD5 c160162521c3f78d8ea1017314f8e83d
BLAKE2b-256 573c3aa4b7766b4967ac21fbfa122042c23ac31de4df2aa17dc999e0ec775648

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.32.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.32.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.32.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d7433f282bfcd7213b14db2108ede9700c473c0d792201f0a8d080cde8ce719a
MD5 75cd35b3e205693a8b1cb03047432317
BLAKE2b-256 7cc9fc41790222851debe758cbd4b7e21e47e3a0800d2f7f7bc1812833f36c97

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a40a5fc4b33a098e0d5c16880467285a24c14d53e9ecc7fb03e277b5494380d7
MD5 70a11ad558cee431b9e6020f99caf6f8
BLAKE2b-256 d5317a67783e4a0b53db90b6554208db10fb19c2bef981c95f49c23f4e3415fe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b982ee2ed5b7e0736b3560db00b0e9db949d9328a349985e209bd919370230c7
MD5 9e50620934b90f8da50c81e0719f6ae2
BLAKE2b-256 46e99af1d0d2af6c20a25fe2b6a69d9195889d0296e90191ece920a9a21b989e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.32.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.32.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.32.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ab6e456190d2ea2d34fa9bf0f182f0c7feb69651b050e77c73712dd22f776471
MD5 9e2c4f13aacac01e631c6dccb227747d
BLAKE2b-256 83cbd8780f049474c69c01bd8536d975ac082d1e6c09dc77fc9d5fa14bcc5103

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 45412e34bbc396c6792ac6a37a0fe1d195021e4efd8d34d25ebad2d00a0d4b40
MD5 25e4096daa11032ac3a943dc42a69025
BLAKE2b-256 ee17e65534cb60ffc3c35264a5c09f0c28066cf6ce76164168536fa2980f2dcf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 96eeca94d1a26ce61de39f3bddd62200613e98f9a786a073ca74462582248235
MD5 19f930306c42bb56e9abe2b1ca488053
BLAKE2b-256 f750fe8903ee74c87dd556cc2d35c57446b7bcd52117f7944fb87eda3a7758f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.32.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.32.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.32.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b98b1b6ae1550559759322584876035e04064dca6e9179d1632f7c2c2f9c7282
MD5 76e647376edb2a3df05d7d957c3aaa26
BLAKE2b-256 9f499e56fda6c4207d427ede0901506e055c01252a284b8e3251952219865f8f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e90198ec8d7ae363ab24ad63227f72eeda4a0747094d09c5a53a9087b8f4a724
MD5 bbd37a8e8a56630458dcd4e34591e55b
BLAKE2b-256 4df15331f0b8420ea38da2156a86ae5c1ae016fb3d269d2fd5ef12bb942bec6f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 efd471e761d1c3cfac208af73698823ff54ca7b3b7aa8859f14c56d8248845a9
MD5 f9f069b900b60289cc6c7f704db98d09
BLAKE2b-256 6f7223dd33fe5ee97f586d29d396b850e4efa474c993b0decfc85043950767d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.32.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.32.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.32.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b84fd5321b19d90388f267a5adc6cca97a794903ffec5457b605791accf59d7b
MD5 55e3c2ec46bfa79173177a0d649a3b93
BLAKE2b-256 58aadc47368b54ca5767b4f234cd2a3846ff9ba121e295fe24285b750918e8bf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 83f7797822c235bdf28a079329912a0c56cbc7d43bb92be01d7543bc150b38e5
MD5 c09a8ea9cee74bdafb35e0798f0b2d03
BLAKE2b-256 42bd2f11c69af9b4534c89383e21ecfc945ffd09e21fa20142ff45fb5862a43e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.32.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.32.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9156b7d4a144772da2bd3343e5e44c3c7e7dad798083ef0753e008bc226a2e64
MD5 9dd16f799517eaff73f049d3205b25e4
BLAKE2b-256 8549b8dc83c4b06c0bfd884a636decb1c07244167bc84a1f613d30f713046531

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.32.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.32.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.32.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8b13689cbffb429550dbab65406bda052d87ed1c4aa98d5d3d5ee26381c6dad9
MD5 f3a431bad8d3aafed2f5681025e3d064
BLAKE2b-256 028d238cfdb600a07f5243d18a0e4a4af9c0495d5b32394a05d0348dae82aba0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b9af9b5a0d17a9364669c5a2c66fa565f618b37150de992b44d9cc30800908fe
MD5 5a9db2b542efdf43be2e461d95d5f2fb
BLAKE2b-256 2453b20db2804fd3c4b8ab537e837b5671af6ad8931076a90b25f7218244a63e

See more details on using hashes here.

Provenance

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