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

Uploaded CPython 3.13Windows x86-64

openbricks-2.2.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-2.2.0-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-2.2.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-2.2.0-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-2.2.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-2.2.0-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-2.2.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-2.2.0-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-2.2.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-2.2.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-2.2.0.tar.gz.

File metadata

  • Download URL: openbricks-2.2.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-2.2.0.tar.gz
Algorithm Hash digest
SHA256 2decc89cce6bcd93aa5c3c27cf2921f8c9fcacdaf88eea2d6fda30b9df816b37
MD5 94195b97cfeff9c1d94d10e5bd158689
BLAKE2b-256 74b4e7803ef24aeef9f82cf9add0d53a873f5f5776175e47ebba0af95c16580a

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for openbricks-2.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4b31ec3bfb8b094f15049c2821b7e4c8142b44ee6828422761e7acf14c17c76d
MD5 db1616eef32d5c01945004a92d238d85
BLAKE2b-256 ef5892bcd8723692c724834e775d3fc96862ee9ce5183a23883a9a50c2664435

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 66b442778b777ad4ede44a020860a969dd13f02ae4f8c4f9ba37b7a2e5b07d30
MD5 127f1b24973033a0e93731e9b8af68e3
BLAKE2b-256 572c8e4b2f3ded969f41fa43e96a71eee48d63db30d3bd56352aa91c75f61518

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 06239501d9e2d02758344821ebbea61ba06b512c3c85fd2351a65ff05831e3b2
MD5 1b18093d1fcb7ca9d56d133a60a56c98
BLAKE2b-256 7a25e26fd71d2c687b30b516e74a69d156cbbdecfc91dfc3d7ecb77eb7e9edce

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for openbricks-2.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d84cfc8e2be92466747d71b4e91c39c8ec5c91a32c989bd21d435bea14841858
MD5 68ba3a6ebfbbd4b03e408945e18bca6e
BLAKE2b-256 b5e719553352a17c8cc46ee2fae9475a4567504c9f49b2131ba498660f095328

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5e0055bd9d94e118f5a7e65bd8be4a43583eeb0293bc40917404bee4c920dca4
MD5 95a7031bac398120c991557b4d402c53
BLAKE2b-256 657be32cb407f15474e4a520b076e7c25b28235624144080ab28d2d405a2efea

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 cd5f23524e408468611387c10a2d41787e5e48058c5e22df2b4c3cb5761bb7d1
MD5 1cd11af19c92c396659602df48c5913f
BLAKE2b-256 99cc72b98d83215b2cc1507cc6ccb297b508579c84400e84804109a99c428052

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for openbricks-2.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f9f8a8a89400c8c7fd9e65693cbd122c101f9529a48a2c1626dba00676bd17b6
MD5 542f24f9f94188d6816a9295efbd0e5f
BLAKE2b-256 3b77a96cfae4bfae7065f5acdb77e3ee83b913c90d77c34c33bbca9053d77a09

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bdfa561bcbef64602c394dbdba18827f301570857441e05fc7baaf27d0fcaded
MD5 75ee89dbeef5e99e492d82a2121230ac
BLAKE2b-256 2e2f80a3a8f3f487acfe901ca087f07b63df2daf0a20b9f88d2ea60b3795a9f8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 318e833cdd790582e32812e9a277d0f7a0d12665027d7c7572ae9aabcff2172c
MD5 6fe57be38cfaa3355491757ec855dab4
BLAKE2b-256 c0a6d6b5c82964aa3b7e28b5fcc451059541e7b0504f6c48d08ea0dfc06f74aa

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for openbricks-2.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 81bf8ac25fd80ab16fa86c0596e774943f6e4fbdfb6cd3dca4cd00867b6bd18b
MD5 41837b19a7918a257a8a1c0ab386f520
BLAKE2b-256 71f3f593806febd5ca2e46edd494f942d834e0f00a67c9076396a78d443e7a3d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ad90670e0be43793c1f81a907cc5df23921890afb16d661c2feccecb9cc69950
MD5 766b6baed9047c8486b025b0877e93aa
BLAKE2b-256 49d56ba58fce971cc5dc902bd9aa9d8d80b66077f64a4fb53897d99d1ea5ccb2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 220ad36dedec7aa1f6d1782197c646c3088a1da94870e2a5f3faed41c0d97cbe
MD5 efd835b19351a70a2d3df41dd8a21f00
BLAKE2b-256 72a63e77a9fe2c5eacd862cb0c3542aeab85dc785068896e57be92a33bfc7b9d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.2.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-2.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 641cd19f85304bc216526aff94f6e2c7bbb4109189fb3839ddf3cf2229b17404
MD5 fe091d7cbd91c9ac6f405b789e8f7e5a
BLAKE2b-256 c3488ed0b564d0079f3949173231cb84f82ae889489748bc4e1b0d56ee1ecdfe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c577b62287be2e1f43bf71707b0723773402304e0473ecd0468c85a2fb2f6d2e
MD5 398f09a9148a305790fb5551f0f0abc1
BLAKE2b-256 aab9a753cf58e694b35d3bebc7ad1fdd47519d43fffd707a78d4e57f2422f703

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a0a6b31d17896123c191237a22f8877cdde67946cac865f3e9ddc43ca8cede14
MD5 9c59087c5ba706a4b1849193e02b28b1
BLAKE2b-256 41148163e430dcfa944bbb93557029e4d8eec31765405adb8b2337a64e1b7de9

See more details on using hashes here.

Provenance

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