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

Uploaded CPython 3.13Windows x86-64

openbricks-2.6.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.6.0-cp313-cp313-macosx_10_13_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-2.6.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.6.0-cp312-cp312-macosx_10_13_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-2.6.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.6.0-cp311-cp311-macosx_10_9_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-2.6.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.6.0-cp310-cp310-macosx_10_9_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-2.6.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.6.0-cp39-cp39-macosx_10_9_universal2.whl (3.7 MB view details)

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

File details

Details for the file openbricks-2.6.0.tar.gz.

File metadata

  • Download URL: openbricks-2.6.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.6.0.tar.gz
Algorithm Hash digest
SHA256 66e94b117c0fb6c9d3c625f111eb0fee5ec03bb8fea3d211136f841a80277bbd
MD5 c093dc2a9610c3c4f9619876082ea021
BLAKE2b-256 e571e3b9912ee8d1e3444caa7a400d2b8c2688e12e02433d2860a65a47ddb429

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.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.6.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3b73d0b5f69b53a37916b18e8c6523cf687b645fd7eeca77a329748033aa363c
MD5 bb363ceeaeba924358c5c3b9fb0e4072
BLAKE2b-256 9006c437b77d28630b78fa5ed1d43b0dd58fc49e74976cdc32004016cac7484b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.6.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.6.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.6.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 32ce2311d34466e0bc526f65a258661f497763459c2987ad3c3f1132646b93e3
MD5 2622c10f832763578602e589b73dc9a2
BLAKE2b-256 60e9c09252ebe0530c2ee41e2043171596b79bc02315a70160e38a03f01dfa93

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 7743cb58d29da42be3f23bcf106c94b2872ea76810a06665ba458ff668708e48
MD5 ec953233fd12ec6a48ed0351897ec506
BLAKE2b-256 5489afb4a478b9fa8e47d7918bd5df028ea6f7c95d436429b5e97a5d9795841d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.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.6.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 06eb4b69ab3055aab130c4f81b45e83cffd862b04ff9e80d01bebca9ebebcf23
MD5 00d6df821f51623537a5ff6fc7dbb35f
BLAKE2b-256 df6f486372a6185e6e9393c07c55bb3052eba30bb3b9d7f720da5cf0875f4b0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.6.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.6.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.6.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0ee8292f808480bbdb83e4a9c95286bda39b4424324c12ac8752cd0252be2f7d
MD5 d5319bb265e047e5485dd912be70fc17
BLAKE2b-256 9f6c3330617da6fb14a5824c3f466e6a683d8f95c3b202d6b10cfd94f1d8dde5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 abbe0c9e9b1d25c8a8d856c9e1bfbe9ceeaeef567d599885bff5ffdbcfb58cf0
MD5 3648135859d8d93c38b56f700e5d6b49
BLAKE2b-256 d8e0b8fa1c85b08341842ddc78b0f0b94da9d414d0a64dac68f2e41f7fdbe251

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.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.6.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 32ebbc9e7c80e1a410aa5bcd17e0acd8cce866cc275f4c055fa3bfb741c6537d
MD5 aa7d1c0da61b4f52446cce75419d21d1
BLAKE2b-256 d88945f3e1c1822334ddba26187cc69bcc81c4b7b6b79232f7404c7364ce983f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.6.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.6.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.6.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 895d82313b0ed2f3e659f1e184891e56646bcd28a33216d08fc8508495d277ad
MD5 a093684b65b869a9eb445011b4ba164b
BLAKE2b-256 f916037039319a984520d9f37358aa43b2a9273822f4982893945fe439b4f407

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 013ea7c5698397698c50f20b4dd5bd0383f15e8fe336a0002e2f8a17ddecb90b
MD5 f12cb107e75095f920b32e68e9f95fa7
BLAKE2b-256 6e5e00f08d5b354c04a9e1cac3f18a393400bca39aae17c3da969442373d9e70

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.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.6.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 592279b19f6e8f2a50c2a11e85ba337a48412fa4a3430b1fef18acb6a0e9c401
MD5 fcff30b475a366f0b888492d64a0af92
BLAKE2b-256 2fe150d884e1d57f1a6c0da3df4477b1fa8260a72c0c1d6764fb607aab36abb0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.6.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.6.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.6.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d8ff47bc9cd63354fc5eed19ddf27dfcb67fe1c2ae1cdc17d98c8562df649ab2
MD5 4809edd6c159dacd4bb751f6f0f8343a
BLAKE2b-256 2b5634d1ee7b25d7fb2914171c6ff0ed1362e67c5e8c2656c3f583c663ea56bb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 abd568f71ef6deb30947c6c899c73eaa800ebd0f6ad6823d9b2c7fab707fe535
MD5 42c4de94a3be0b9d639d676a093bfcc3
BLAKE2b-256 c8446eea35b65ef1a28d1b9fab3dee9cc93fd49edbc62bfb002fb9d710e5a7bf

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.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.6.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 44656b96772b0c62aa3a3080d81ff53d97e918566c8986313778ee46b05ec0db
MD5 832296205e26c83e1da518d1d403647b
BLAKE2b-256 a0535d6b5a83b20269c7ff15832111f906bddd69c2d33f7775dcdf03b9456a3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.6.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.6.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.6.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 baed05445b763bf507be124ddca4720427fbd5d60a35d1fb3797c87d82504b57
MD5 5d15120f297095d649a7b65e43ce4955
BLAKE2b-256 90b05b5c00c5cc691aa6e8f2e95c76678dcf22d8fd7f39bf5b6e69a8e2a39015

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 451cd6ceb4c74f94afa923d3f4deb4eb1b109ca03598d2efb85d9b7e0af4cbac
MD5 90db076967e650d6706b8be847d7ee1b
BLAKE2b-256 05ad0e3e1a51e092f5416d7acd82b1efbad66c3c66cd4c56928ff062dbf45a68

See more details on using hashes here.

Provenance

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