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

Uploaded CPython 3.13Windows x86-64

openbricks-2.6.1-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.1-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.1-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-2.6.1-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.1-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.1-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-2.6.1-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.1-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.1-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-2.6.1-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.1-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.1-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-2.6.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: openbricks-2.6.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-2.6.1.tar.gz
Algorithm Hash digest
SHA256 247fcf87726a3ad3b13415c0cdf7c8eebbd03250ade816512b03e7f2d80b495b
MD5 beddab91c03abfb1ef570e640598244e
BLAKE2b-256 c37aae6c4bfcabf6f54790ef47cc90be21763feba6345f05de078aa7bfa3e8a0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.1-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.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 55d40d3c2efea5059c3abbcb97797534dcaa9047394acdf227c31f98326b4e17
MD5 97c780bd9b7d8fca7cff78bd910dd201
BLAKE2b-256 c4e1cd02d255a22d9ab3e77cf9d9f82a428248a91066c7c63e8679182d99e6c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.6.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-2.6.1-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.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0cb97e50eaf04187f6f62bdadd879a86c12a6f0e32cbec07b00d43118fc326a8
MD5 7e73f65729361099f5a1e48873374de9
BLAKE2b-256 157af3f84dbd8f44c69f5a5d5576fe02702d78f2830ba0547d69ff8f4c5901ec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 ced1eb7f30c04e37ea0a5cee57738b91cd28835c958dd1b09ec3e175dc267ef0
MD5 ffe599b962b44d4185f6963fe40a1f25
BLAKE2b-256 42dbbed39ad7b7881d296ff62f97692802d741ca2170598c2e8c9e241646b30f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.1-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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3e240162a691fa050ae0b04a5da94a52046412197fca9e9bc5600ef06e6c7404
MD5 0d7a770920f9070303db88ea4d512cd4
BLAKE2b-256 24a38a0b736cf0558d8c1bf54e55ca0b75ba8892768cb21f86704340f3183fe0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.6.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-2.6.1-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.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6b8c2e629be79e6f9f8a2b2a33c0059b13712ed5ef2964ebedfb68f4cc0070e3
MD5 e24fd3cb26800028c7f99d103deb406e
BLAKE2b-256 08becdf55e35f9abc82bbcb3465d7555df785459ec9c3472804b5520660af883

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8322139790b23fb67468342ba76213ca3cc08505941470acbf027ec4130eb132
MD5 1d9914bf3b619fda2fd483aeb0110dd7
BLAKE2b-256 ff585e5077d3756db659761950b8678d98382094639e71551908281023c525bf

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.1-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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6442cf8166bcd03c26a3cd85d273a2f578c8d646555f294199f15dc09ed15b96
MD5 a64c854f3d302e8db7fd62b8aa096648
BLAKE2b-256 ee6aaeac80953749ad20b01a3edce1d7aba4b47393e59b5b3efba4ee76e6adb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.6.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-2.6.1-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.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b515886c5d0c9caef41416279aa6fef7bb92413e9a65c717b84a6263952e60b9
MD5 4d1bfdb228c8deac2df77456bab33a41
BLAKE2b-256 a1a2642dd92c140f0279248e4fa618ed1b936c8105edbaccb04f2e5792ba6e2d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 bb029d7097a533a8b22dbdf1a19a17d2291860a365a195797581c9c4b576f3d4
MD5 d7b4e4bf6587bddf840af9b8876d0ee6
BLAKE2b-256 967922420a7d79d7c9b97862300d5e2510bc1c24319d63aea0b037a42a877818

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.1-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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 68474b4ebe2111431caf7d6f6321f55740432b4079d77f5927e162b0d4504a05
MD5 0a56fd23f7e7fe3023fc5763109eddaf
BLAKE2b-256 5467e173935c364801a7044dab23d91c77658e18f91f03dbae3449e161e0ea68

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.6.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-2.6.1-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.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 82c6af860c6d2af99631d7374fe940f86248444dd5b8882216a47be263bccefe
MD5 76f16f227ea2a735384f7bbde71d5c79
BLAKE2b-256 0c17825601ae86bfed207bb20833c9f6fb91b2466d6246d29ab5b2fdacd21b87

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5bec6cf876cc43ff2e15a62207f164612f7af73ed787fe1095cc18635921922e
MD5 03b706dfcde685dc7e2bb9554adf63ef
BLAKE2b-256 5ea73ac9ca6e74d25e8457375490817839e06f0474a14e97ab3560c6c0909bd6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.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-2.6.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4a65b6e3be0ea1545cc6ac5fe27bca30954428a955e57e5de3cca9b92be30669
MD5 abeca8d43fba3d1af7f5f35893566cae
BLAKE2b-256 4cacaca30f19bdf1fc11b67a99aaaf061deb79cd01ac7bd845e0a3df0826be3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.6.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-2.6.1-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.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 927362bbd55ac39fe4bf54a9c8b7ede9a610e2c1a6e56f9b9b63af494461540a
MD5 f75954fe75cc31275cc028bc17186d3a
BLAKE2b-256 418cb7b4c21560555b60b9bb9e236d8484f799b10a78034b537e7cafccff313c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1d4e570c0d1c6b6b0093c008529eda59146b02803596eef78ee218239edb1da7
MD5 8d8e5286db7fbbafc52e8319b2791420
BLAKE2b-256 2a2e0691244a0866bdb68c32de667e68b8c663e458d05dade071915a35482bfa

See more details on using hashes here.

Provenance

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