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

Uploaded CPython 3.13Windows x86-64

openbricks-1.49.0-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.49.0-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.49.0-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.49.0-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.49.0-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.49.0-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.49.0-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.49.0-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.49.0-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.49.0-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.49.0.tar.gz.

File metadata

  • Download URL: openbricks-1.49.0.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.49.0.tar.gz
Algorithm Hash digest
SHA256 7e82caebd9207e1f836eb97dede28b3e515b0716f113bf47a76b58bf29251d6d
MD5 aa080b32ad1dde98b351c90b450184c4
BLAKE2b-256 6a5e31c090613ad37c7c58531d800c039795f1dd1ef6667ae9b94e57add93238

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b7f05c86f27458b0f2758139743a5810e026ee2ddf3bd08556f1a8f36a1356c4
MD5 d71a7a5504db69ab0d486bb538f7e6b9
BLAKE2b-256 95684a8d8ec4ed29c3a99db59e48097930d1d8df32996e21f28a5bd54237caa7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.49.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.49.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.49.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 54e39243beb4db81a021e8dc1a9987e71da1ee364bbe4dc4cc60c7b957dfbbd8
MD5 43c04e7a2bbbc82138d807d9ac9cd5d8
BLAKE2b-256 a42090e5034b22cc0a3a3186fb8b2ea1275e3e0bbd47603ebf4314baadbb47cc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8a57eebd78226637a1e61292d6498597319ec0a29fe31e68ff69aa1da4820f2b
MD5 0700a3437030dff32da89365ea1dfff4
BLAKE2b-256 fbb9bc9dd3e8fdc9bc0585262e8e659aa9c27486e2ff23eeb00c6a6accdf2fa5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 aea0bc3ffe21e3b3705d5e09b613ff7e54e43f133c4d97aa9ebaa1821a6c7dc5
MD5 a8aab90024f3dcff794f1f61e2d26555
BLAKE2b-256 bb6a47cb25166af910f590d265507304c532c3d8caea931f2e106dfbb4a6f632

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.49.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.49.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.49.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0942cc77f093ec55b92673413e18e55b00c5d71a31cc3cf784994f3a3fbfc4fe
MD5 a57a48e56fc3dec51c1f31381877ee95
BLAKE2b-256 dd52097e08e6aeed7fdd759f3386879db2dbe6fe05788760c449df4861a35186

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 93aa183f6be0f31295dac67a5824e36a56876e500a1d6bd5490dc4f3d3b61b4c
MD5 32f31d455cd232c46b9eccf9b219146e
BLAKE2b-256 4ebd46bf6c8b01da2b0ed3a212a47d9d53b04eb25afbebb73105bccd71b3b571

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fb6e044f4237c2e52f29358ca4f71cdce778768e220cf0aa6d6a4c0836ad25d9
MD5 aae76e88b7a28dbd228a84b38e7edd05
BLAKE2b-256 5fdf1681af111c2dd5bc5d7ba97d33883f6cfaaad828efb848c957541a8936e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.49.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.49.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.49.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 498e55b1f1e485e5f5128fc1918a50a0cbe52e7c599f8a2e9436b24b93ae18cf
MD5 64f83d9d845ce85fc16c58bd0b44a88d
BLAKE2b-256 c5596652a3ed2f7bb4aae88e903a48ef51bbbce2abc8312b88be3cbc4036612b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c09737cfbc8f7c399ea307075af356ada1a9cfd2b29e3f00d6950d573736ef23
MD5 e71667f2aa74036198b42bd805239c20
BLAKE2b-256 bbe3d1b644439233487f3e79218228f38e01fca39655f15ade6c9f6e66777554

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6f37f6ca9142d3e3e939be60bff77a1d8be26db1d5b59bd8c9bd3feb446ea637
MD5 7e67f0305c29275e0a3f3e3109098f31
BLAKE2b-256 4cdc3301ea86be4e74808df3e3676117c1cc32f5e8547328fb6bd7e2fd438ac7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.49.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.49.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.49.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d512996aa8ad27fd75fae6ffcdd90454f75b0e1d395423b7c12e951d2500e986
MD5 a2b707a0dcb9054430dae0d5cc3887ab
BLAKE2b-256 513e50f73862217018eb2b7cae79048c47da990b8098a3e34e3070289c63a83f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 87af715c41d55a6efcfd9c0fd82dc2f6c4bcfa6b5739057566e80406a7494e7c
MD5 0fd5c40732126edf5b3c9b4e4a408ade
BLAKE2b-256 2358df632a8966ee88dcce216b7988deb1d3c19221e3aa043052fe6d83dc8a84

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.49.0-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.49.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 aeaadf3fe341a44fd6907e32d4ec2f47bb1b79b4ff52fc338b2a437a4c92c8ea
MD5 d4bd9b483dbe4db54ada6e9b71ffd9a3
BLAKE2b-256 49bec24f4b04a32bb359cf0bd95fd5eb36deb37fa9c39176baaa4fee8e16ba7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.49.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.49.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.49.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3d2199f942a2eec4b495c565290f076a9ab0b2f845e8787688596c0b2f4f7165
MD5 8e7b449368a9f7cde9bf67563381d953
BLAKE2b-256 ba3e9319061ed09ce9995aad4aac609b6205d79f21c1511fff4c264b65831821

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 43627aef956bfde7c66ff91bac8f114dc1a15c02ba184f7a78250847380af9c1
MD5 7cdc17fffbb667c6f3cdaf69add55bb7
BLAKE2b-256 61a92a77b9a29ab615dc74f8b78d4a07ad3cb791bb3f3de1bd049eab89c54b7f

See more details on using hashes here.

Provenance

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