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

Uploaded CPython 3.13Windows x86-64

openbricks-1.76.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.76.1-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.76.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.76.1-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.76.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.76.1-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.76.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.76.1-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.76.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.76.1-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.76.1.tar.gz.

File metadata

  • Download URL: openbricks-1.76.1.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.76.1.tar.gz
Algorithm Hash digest
SHA256 0c4326c8f0c588bc829664a8ce45aecc323e1adeac607dd5d4415d2f1a368368
MD5 2cc64eee19ca85222dbe1da63c71f822
BLAKE2b-256 30e30e1898e105048cb9936faf46875c957764725296cb697f87b6bfca298586

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 318e595282f931a207c82cae4070fc11d7e669fefa3282ac645e65d760448d8e
MD5 c5610bc6ac12f538c59aed0bbdd35e90
BLAKE2b-256 fb859aa5ba2a91dfa990d792c4bd14c0c25698d6176bfb02c45de77721b3b4b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.76.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.76.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.76.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ad1b5b03b5f717a4eb272f5c95db2eaa99ce09817307e248ce92d298cbcd3137
MD5 b900aa387be1b06cf24fda61a90b3f10
BLAKE2b-256 2d6b08d2f9b5073233d47c4329f712307b49de626a5048769f0885c8ea822722

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 dc99395899d47d214c6ed75e12f2398b910b40df8c3610936c52071bd2bd27ef
MD5 e865864afebcfcaa4857545be1b93fc0
BLAKE2b-256 cbec77617099788531c8721a8613105cca318d900338098ef57b4fef31728822

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e30bc3201b8588f95667f67be35f5f4c24c1d4fc622d2daddbb5da0c3882f144
MD5 2e14ea9100bd769c207921f23faac5d1
BLAKE2b-256 4ff393944a169f39a3c3800301a6c18a01e501d0689e54e6d3528709c053e48d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.76.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.76.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.76.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e074bf96fd6ac95fa931b9f83439e544ae4b13a2efd3d1ee967f6987e8b1715a
MD5 88214cf7a64479ab2d424b8b5e8276ff
BLAKE2b-256 a493508f51ccb91dafe455030a03a385e34e2161ab30a8ab27cbd927a80ff618

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d8c728ada1967ab016c0102cfb1aa6dccb4a06d96173fdf6fdf69c26324e392f
MD5 35e386c958a704a20d7bd07147672381
BLAKE2b-256 39d0a4e3564fa1f94ef976f16aa4a898a8cc410f7131b26e890d7ab1178317bb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 26a01cd1fc0f55548a33e0352416bc63916c506ed18f3103c569cd97a6ddd625
MD5 054649d1ec0e70d482058e3b61249b66
BLAKE2b-256 177225c34ef896c39c0e5b341a9179ae3c3ab1847bca5c4aeb316644f5defc07

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.76.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.76.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.76.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e7b442f81c8e228fc67826729362301ede096c015facedfc864defe9123376d2
MD5 c5f6df1f428d81c9c6bada2ae82b69ae
BLAKE2b-256 4712716c43ad26382eeb179c2ab59a08a38c9a24c76a1351fb231d1e8398b084

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c876b2d1f6f095cc15c6595259931d953958f16669a63b756112539aae4aa306
MD5 03fe2f1473d41842e5b0f23492999328
BLAKE2b-256 3ddb43b39f5150b1a9e8d46f889d6475ab3e1fadff6b1fa8a20a24bf4197703b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3e7dc65db69f1ee33d25d3d5a47cd5788b6eaab8fccb964b5e6b005bbd30b99a
MD5 18437c928a28c32d95338f9c149d6b2e
BLAKE2b-256 5b933a22d62376cdbcb526793de65cab3242c1e86dabdf1c0681cd8426f45721

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.76.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.76.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.76.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f903ef3cbf9d50f271704635b6ec45d058f4795c893e0b4b3aa7bab485315493
MD5 0e57370fb9b76b29b452c85869c701af
BLAKE2b-256 97eb7630d302ab879ebbac242768c08b9db45fb23064a2d9c07a4c7f41bc3c18

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4c7bc36e426466085427e4eb3912f1ef9ca2aab23a4c3b0c4ca757becb3aa605
MD5 ba433f503e54390a8398061b84465000
BLAKE2b-256 25dc6bf6a775f7f85312a1dbb8c6b273f36fbd4c93a316ddfb8bd170b390c9e5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.76.1-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.76.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 75b6a93fcf8da5b4fddfe7d64845f4a768cbb97eb4510ca7fc15682708ce4192
MD5 c69e10811bc0074d188d12f882c509d9
BLAKE2b-256 bee066835ee9debca954d538ed5e68b3030d06e5fcd675b4de3be0a8099e874f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.76.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.76.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.76.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8f23f5ed2dcae84e236ce561accfeda8376b33ca12b7f7a313a93c61c705012a
MD5 0da73e364aeaec58f3302189bd7534cb
BLAKE2b-256 0234385b0ff8cd3d9ef18a9ff4932eda756f282a4b417dcaefa509f839155c49

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1c2acdaa2d8a7e19f6a2a446e5e0587b00be80c659b0343ce736f0ea4ce78b71
MD5 e6ddc061f6ce33c70e6a19e15d912afd
BLAKE2b-256 b5a7a6aad9955e48e51540afaa29c030468a7b528b667c8a01d2715f1e499ee7

See more details on using hashes here.

Provenance

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