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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.50.1-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.50.1-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.50.1.tar.gz.

File metadata

  • Download URL: openbricks-1.50.1.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.50.1.tar.gz
Algorithm Hash digest
SHA256 67e0e4836c0559d7d3b477a1c5314bd01a3ef8a08ccaaa4001a16be095d27c88
MD5 3dbd6f44ff4fc79d524a1cb14ffc7fb5
BLAKE2b-256 6ae1f8cb945718366e6ee93dec0092ad98d501481d244c5633a5a82281fd3092

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2b3e284f8f0efa1bfdcc8eb42abc6574564cb6b67ab7b5f9ffeabf1eb18e0946
MD5 06533519d9b7f6e704bfc0044fcfa5aa
BLAKE2b-256 287f0f3924d0cad75185d78c114ef891435612e86fd18ee86827f72ceaa56e91

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.50.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.50.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.50.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9d062cf21bee1051bb44bf8aee0f18269c96604d6185576776a7c2ec46cb145f
MD5 a6d31288c366c1612dce9e33ac35887a
BLAKE2b-256 c4ebf28fd613a550276527b986107cfd1a8e832eeadd5f11c902ab9164ecb535

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 3415da1b4ccd65937447eb2ffdb36df05c24a651c30794629131d5e8c88b8bc5
MD5 54f9136dbe015c21611889ea2aafd984
BLAKE2b-256 570bd668942eb089b1ad8095109ded0e11234df53317f2f1743ea875e2b12745

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fdf639546d2cce5db054f824315a6650a7e9a56784771f7db8ca7a41f02b8ba4
MD5 69fa46effd6e5aa6437875dfd0c58717
BLAKE2b-256 1f0c537b2ac4886b3b4a441db2c2691d963d451538c88e19f418dafcc11bfec5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.50.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.50.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.50.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 84e800c35a39121b472df2eb6468e775b16420ca6ca09dc94ef2aba59bdf8ea2
MD5 cac30f2e537ee2ad5db1ca1ee8283407
BLAKE2b-256 26602c1f7c3dae6987e27a9c7cd8dcfc3aff20bce27f6f673b42df843ceb25dd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 10d3caf0752e8325e36825be8b34f794888816c2f09259fd54d55d0a52e95b2f
MD5 0d45e58cd6d9233c42420d03991ab129
BLAKE2b-256 2690795fdc1c097ef6ae30b151af8905a094d2317532deeaf5e7b7b4a185290f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 65f39b7c9b8eca1b0e9003c6cfb2a021ebcc6c6fdbc04c4bcbf8e6418ec5d857
MD5 657d361c96794214c5191c1b814aa82c
BLAKE2b-256 78742bdd213397413b057c20101b76865df2e38950c804c56aad340b542aa56d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.50.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.50.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.50.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bcce3d5352d333ad02730da29a0da6992720ab960d6a8b4c1d15ebd5f38453de
MD5 cb6b6ab0667511d185fb847f2980fbcf
BLAKE2b-256 d4acce621da10ed43ce4bebd1bcc9568c1207fee1cc55c4388c605ea474337af

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8d002263dc30a9f7bb50eed04ba57e79ae54f5d36c52f01f060c0a4d3b43440a
MD5 440ff6505ccb166889de3b0fd8c8cdc6
BLAKE2b-256 08e105ecc4da99ca12fbb2a3ed5fab449326b9dfd7569ccb3e3accd9e1171031

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0e054e82ea8dae04e417755e7fd41c1dae036815d47f8eecf815ee6e001c3129
MD5 a1edcbef961cee4ba99a75b013491cba
BLAKE2b-256 05256c8c8dda1e843c27689d7f938dc6fdd5899e30e22e59a5897e15c939fc00

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.50.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.50.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.50.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 360fc34e28bd85285b03a831afb0edf547de508e0f138d3b1026fdacace52e1b
MD5 891805c784eb76ceb64681dcc8ee5357
BLAKE2b-256 0855209d9e6096cbc3e1fa5bb10f63b75574a0b5a65ae2003e5d1dc2b05dd717

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 eb44ae1890402937b74b1886b6ca5342bbe5227bf6940ce5605f11f963794fe2
MD5 d194af9bb4b1664824b690b1db5d7148
BLAKE2b-256 fe19e671cb5d2d26c0457577b45078e772666ff914c18c6afbd1bc287b91816c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.50.1-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.50.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6d5d5a4694162d3f1ea199562fe68cca9d3ad0d740775b67ba9267b81c83968c
MD5 7bfeeafe08962101e3f9bdb374d510e6
BLAKE2b-256 e06a9e90f909e45a45027d322dc13e0dab8f0b957a5136f6492ebe18ad1edfdb

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.50.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.50.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.50.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e472b33adea5b27fa50860e764a461da472c797dfc28fe0603176fd0b5c87748
MD5 f8d703f9c8052cb18a11ba98aeb67d24
BLAKE2b-256 06a600454e4e5a3e09ee17ca396ed50bd9760917491d010074dde6368b89c41e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c8c8beb8ee14304de25cd2549dc84b3bb0c0969279eddfe83484ad6ec5a60ffb
MD5 9bec754df6ae6963e06a11f059d67fdb
BLAKE2b-256 fbe4f5c184c00894066241fcdd849dba3dce2b86bee6d06e2461efbd1d86772e

See more details on using hashes here.

Provenance

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