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.92.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.92.0-cp313-cp313-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.92.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.92.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.92.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.92.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.92.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.92.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.92.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.92.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.92.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.92.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.92.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.92.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.92.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.92.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.92.0.tar.gz.

File metadata

  • Download URL: openbricks-1.92.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.92.0.tar.gz
Algorithm Hash digest
SHA256 42cfbca3f7a06b20277c33afb9d3b1ff76aa605643c10e1824241c039103e3eb
MD5 bcba14f3f72d5fb791061e578d283fb8
BLAKE2b-256 fbbdd902ecf240d0aec52a7fe5d45f8559d7cdf0476ac29c455b4be5bb443f8f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 10bf59dd2be6891fd2596845f32897d1a0c375dcd78327d395cb63e01d0cc7ff
MD5 06fbda9979c293c4a59f8f5950947efb
BLAKE2b-256 f2aa42e5398627285f234ec73d48682571ed11968007e713538048fb18e12431

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.92.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.92.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.92.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0605b90401fa62c36efc6762c88ecd3a3e652aeaee0bf1854a036e3dea9e6d46
MD5 cf521a099c369f90938fad79ba2c2abc
BLAKE2b-256 b52dd1b76367ec3dce88042a105a0625db73cbed4cdbbb5c7b46b5e1edd68137

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 90be066a7573f38effe54c116a87f54ed5e6af242d96ea1caaa5a2873d67d952
MD5 151def171a7327a4e24e0e528f685ef6
BLAKE2b-256 3fcf2cf1e25bc34a696074a96923635ff43107448c15a1ff6a31a1fffc26ffbe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 24c1db821e76301a26a75da92ea20be72fd6f8cf5365ce23b3704b943387b0b0
MD5 7b2229188854ca451f5ac9fd6af04143
BLAKE2b-256 9b690ca9cd451aac80099edb8f4b65d6d41e85d524abc0557286bb0b4205d98d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.92.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.92.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.92.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2009e055e8f7c4ecac573f09be626c8172c75b4616c1f8042095caf05c24956b
MD5 504988c783e06091696aab3182a402f2
BLAKE2b-256 23b0d6377f62261feab2ade7a41ced93beb64c0cce14f53bf8251de7c9e717ad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 1422e42ba4cd8b97ca11c87ad1d2339979b3d5e2e126e29a826f3539af811331
MD5 99b8682ca336175b8de7521207f299f4
BLAKE2b-256 a95d3a230eccb99e3092ada5d200e2259ca6d66d51fdf13b3a9a538da9937ac3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0268abef1d86303ccd6c8dc36972f09b7871f411b35357c6c02d9bfd9e8bb1a3
MD5 03811ea72d7ebf8ed2652c8efe056197
BLAKE2b-256 8be74ddfbefb0195a39a4abcce8a6d01847ddb7aa98542979943a1174fd75a0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.92.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.92.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.92.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ff2cf3b010d63c852671007d0b4bc13f9cd9deda69e18115940acd21c1460e80
MD5 fbff3e5ee70753b60d13de0edfcc4078
BLAKE2b-256 223b78a480db004b8fcc82f22892f3a47216df9259a80338ea22bb07317a275c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ed4e9170cc1c2166036071b52b82d4eb2c177cc33879415f30dfee8a81b621da
MD5 6da95f43707f4d5319b91c96c0001d89
BLAKE2b-256 f1fd19c3c52e6be7e9d223788298620ca6ebf691a7395188f2f6e6c400d0b4ec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6c6ecd09f9e4cf0e1b7ea8e01264d84c355ce1da66a58a2392b0ee1539ff3ba7
MD5 77cf178eebd62da7d654012a6f05894c
BLAKE2b-256 caa4e1871848f93fe8cfd670ce0d92919bbd1a38fd5474a478e1e8d95a147a40

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.92.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.92.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.92.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 75d853fb4771fb91a60c06b997e4e3ee9c8c40cdbf182b139e973f385549e0c2
MD5 4e4981ba2bc793a188d11f0c6dd8c9a5
BLAKE2b-256 df8e7c124f25dd06be454ee5e0558727f7373273f93dc86e493227223b122450

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e2d7ae9637f9a893f11132dc820d4737df8b39345262dc434457b2d819c77d3e
MD5 04b5b0dddaad040dede818a3b476955a
BLAKE2b-256 2e37abaccb363b9d3fd45a12a09595ec34ed64b1bf1721a5bc61492943838c62

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.92.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.92.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7da8e8ffdf102843cb32cfbad84cd2bdb390e857d60e0bce377f38dd4e52fa2e
MD5 5643e8420f836beb690c1fc3f6a28030
BLAKE2b-256 0795582e2ce648c556fe59155b6ad7aa342532c669fb9ca0b8859ff9b4cebd70

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.92.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.92.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.92.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5c523ce0ab614668d6b5b0a95e0cb5b328c203bd37e190830623d288d1275208
MD5 a5799b631f30b8529cc779121b2152c6
BLAKE2b-256 42e1142e70b65760b4d21203121765d1d80bef706be84dc33202f1456f432591

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8211283be3e909d6482e352d53badd157290ddc84cebcb412ce18d38fe25fd5f
MD5 1a9ce39c6b2f51325dadb6992a62502b
BLAKE2b-256 3e870337b557c291a368b46c18b87fd4a988e96359e484debd90fa23cc26f773

See more details on using hashes here.

Provenance

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