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

Uploaded CPython 3.13Windows x86-64

openbricks-1.59.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.59.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.59.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.59.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.59.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.59.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.59.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.59.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.59.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.59.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.59.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.59.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.59.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.59.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.59.0.tar.gz.

File metadata

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

File hashes

Hashes for openbricks-1.59.0.tar.gz
Algorithm Hash digest
SHA256 96795708120d09ef3a52eda980e2c000dae5f1b54b64c47f6d573f63cb4f8e5f
MD5 50298d1505570a0b79448a9d01bd94a5
BLAKE2b-256 788a94217f17b96db077020ef63f0c6f17433bbc373c5774c3b7c24ebb9f2d2e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1be6df5fbcd88652dc5ac81e0ece8e34f9dcdf1b733ef72bd4255a8fa5a1184c
MD5 4f5b171de10dbad9f5735be394749001
BLAKE2b-256 dadf3b7f65face09930189375e6e547c2d89a3f95ece685413af942f5db1fde6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.59.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.59.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.59.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 64376d6b65d1513490ca5543360aa5e7060bbb46471eadc3a46e62ca57750df9
MD5 fc2576308cab46a3c60cd891f5dff05d
BLAKE2b-256 32a5d551d63a11c191358030ae31623e4854f2e24d4e5378ed6da11d4c90bdf7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 647b3dbddc6b1f63e3f3b6983bd6e04a980dd1452c1f62224bfff4042079f0f4
MD5 990cad9845c61256ea9ad8f189ccb78d
BLAKE2b-256 bd89486ab0e82b3eaf3b9ca76bc7b914ad0d530a13832368141a81a7ed83b6bc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6e66bbac16574b5ad762c5e264388a9fbd13d85e66e5a1a69d709d6581cb3d08
MD5 52d16ca13639801f3fd7872bb3c5a096
BLAKE2b-256 bba0b0a8e9c934457235fb2ea37c0f1c967d40e42545e3821f52d528485136f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.59.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.59.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.59.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 304636291dd6cfa5e669d9f4af72511a99ad662c790482bab24d9c29c6a80e82
MD5 bfe25ad8d7b5951c901dfb5c5355cd07
BLAKE2b-256 ca251136f62e07e4cec1285d19a5c6ad7b6eb5823e0afc6dfef468b1c016df47

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 b639c0523cc8796ffff04e1bcb8832b5c91c7388049bd87e65acc375f26e98fa
MD5 31b6332473c45994de0b5829a7a68569
BLAKE2b-256 5abd4d2e9f011fdfafe8bc605442d226397eceda178c785334ebab1e70d394de

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0125be007227eea7b3c0a79be04090d478627c3ff20e3c13627193c86c5bc77e
MD5 1fcbad49594f4f0a382663452578680c
BLAKE2b-256 6cdc4117ae265c1183df672a6af704e417fbf0a77fee3aae65448d8dadbe264a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.59.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.59.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.59.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1863666f780c3c3eecb12682cf0f10f7b6de20c0dca726bc664ce8ee41ac4022
MD5 e805b1cfaa421e2b5a2de83b8f2ab7b1
BLAKE2b-256 08ceafbf84b0f43a8b05411dda563aa55b426c8aea5feced5fbd312d9c7fbe7c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a0c44d357a9356aa11a78107b8d7215d7282a19a9ef60966b8ad271a25339ce8
MD5 3a4a157b17ae8cbdb5d792bb4d7bb7d2
BLAKE2b-256 c689fc15dd43665eb94ce4b9c4a93898326851164df2e3dc40d5ba267340ddd9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 74cb65710d60f9d025739f0f8b9785d016b8992dd1aa87e57a4d10e3f6b3d8d7
MD5 25df073f4174fa24d1b152b733d6435f
BLAKE2b-256 168b8ca186c12ff7cd07636dbb5f5eeeb7f981d94044382a8a4250f9c83e858a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.59.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.59.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.59.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 89d69056283f17bda61bc05e2769f9b41edd61beddc00ab439af7a4a6b98d0e4
MD5 4caf882bad0f2b2b132be7174e6d44dc
BLAKE2b-256 c03af64761ba4a7c3b7e1b8f089b75e386857cd81a210e395deb8f7bf2c93b35

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c0fe8be808cb81d5b58aa95599d991fd0e2b91999c927c0b111a64d2ccb98a38
MD5 f1910bf7c1383af850f7488fea6145fb
BLAKE2b-256 1e5f4beca92c646302f64759c85114d2c81a1dc2c8a02e39386320d2a571c2a2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.59.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.59.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e3a73eab11f9cd98237db9cb0be45f6a90ce0526bdddea93424b029b8984cb15
MD5 2c15be05189ba981f47c79085783d1bb
BLAKE2b-256 880c0696d414aa92ef70e070251a55c2e27d1e5f064d07c4a22694969ab2eb95

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.59.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.59.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.59.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a226ae34522bdf68b70e853b818188581ff5c800a607cfb88a1bfc0959741dbd
MD5 f6dc3e5089ac0018ed0ac371cec03c9f
BLAKE2b-256 4f8866baa86c3126ed7fd62713062823e758935aae428a6439efaab106b28c48

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5997b6d7f3f82bac1c709769496b7dbb251566fde92834d55f76c27658532905
MD5 41c1eda00067f2b13a6204e74ab8eca0
BLAKE2b-256 5bcf1147e3ddc002e7200c623c3d526c83929b547a59c7dfe39f45f9f55bda73

See more details on using hashes here.

Provenance

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