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

Uploaded CPython 3.13Windows x86-64

openbricks-1.88.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-1.88.1-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.88.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-1.88.1-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.88.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-1.88.1-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.88.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-1.88.1-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.88.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-1.88.1-cp39-cp39-macosx_10_9_universal2.whl (3.6 MB view details)

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

File details

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

File metadata

  • Download URL: openbricks-1.88.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-1.88.1.tar.gz
Algorithm Hash digest
SHA256 c4ae29995215f9e2a20cb80326a5d47380b64dc5b5abdf638a3983da6456ee70
MD5 7d2af752f2ee1c70d4b68866221b2dd1
BLAKE2b-256 63d491c78eb900f7c60552316cd562755e12f8307df9353dde1ab110c325bbe9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 25b5334de6201addcc5c479e10d8e0a5781e62e378bddb879db236f865cd0de8
MD5 e742439eed088a07c7e73da1a488ca32
BLAKE2b-256 59657e62ab1c09eab0da29bf5984d7621be9d0022fdcd7fe968e7c0460445ea9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.88.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.88.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.88.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1ef2e3753ed50e32e6bc7d51aa09a1c822c7dbc2b7816d144aacb536b05cd994
MD5 9f8a90850dcebdbfe2156b6564c79854
BLAKE2b-256 e981cf6f00a6217654ebfef4b3bf9550418c987d85ea90ae5279a91682b5cda0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8544cf0d6f9f310bbc8d23ef97eb2e94662abc55f1ad8d25607a9b7fd5f80c99
MD5 b69be18a17119579af45bf3d00c0ab24
BLAKE2b-256 6faeec770a0ac0b9ad1fe06ef1c9ec2be353d91040fb4da7149bd535b6ad40e0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 20a778d1e696428c8213adad833f833127fafe9b03a97e77ded47407b9f7dc68
MD5 7ff8c495e7f2e5bb9df3a98f4d4b55cd
BLAKE2b-256 b36f558ba006bade55d0fff2bc792ce061ef961bfa94e118d16cb0ca827c8237

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.88.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.88.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.88.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9404b392863d2971bc357e2c9d5e9203db58ce4d78384e4b5c52a032ca0ee167
MD5 114d36994d9d1ce8508f1957c1ceb756
BLAKE2b-256 0c585a48d3670a33550c94a67147fa3124d8590e5aa6d6155060123e1f035627

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 08da5c4b6d6df39245b436e07773cf394ef6f46675cdcd929fcd1976cdab5ad3
MD5 4856b73715c1d07b81056351e5c09dde
BLAKE2b-256 faaaf5844b70651145c6566fd1f05a10c9f885f7ee4db9bb0c41c8ee58a96f34

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 45ab9fdab0f5016e9a32efad06dfa0db0f962c0ffd410d025414c11e4aa57b64
MD5 0b504289b2cff1763ca195272b688686
BLAKE2b-256 bfc94159888f4d52301a1b0cddb68a9ee24773264d2ae64dd53fdba4723db99d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.88.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.88.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.88.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 61f010f93bd8a9250e5d4792079f75fa6c5b632c8edd4fe36e50ae740cd272d5
MD5 3dbc2d56f2cabcea838d948446f70d70
BLAKE2b-256 0e08c1d51957b9a8d35ce9c8580ac99bf82166ae69fc55eff356abe7090d507c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 97788de078675f2867ca599235b76268807e22c80bf2f799e95911a21f0a2499
MD5 d23610972640ef1e59d132150d527a53
BLAKE2b-256 2fd0e632e2f0054b244e88379b08fe8edc6db6b5389fff259a56fc779713887a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5de41c6421f465a3c91934685274dabd40cf738f7c9afd9fb9b85c162ed840e9
MD5 0bfa9013edf8f78d048d11833bdf04f6
BLAKE2b-256 64b81aca0602028af7da437e9a9cb0b1ac312b0fa561883a80d501f8e7dce1e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.88.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.88.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.88.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 08aaa9b869d0304019d42fcbf60ac748a1ee59b115b346b41498728fecf98cc9
MD5 313a7bbfe4b941af08dad485d29d2783
BLAKE2b-256 b0e4af091a0cb3d94af0085af1d0c92708336928ec4bcb718b7b1838399ca4fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f33ee7deba0a763ea5b567ad0de03cccd8763d73c8e572e5b6a3a50479cd9f5c
MD5 ee0f2dd066c4ca9b1ac59a1bcc41ab1b
BLAKE2b-256 a287f90aedb94ebfa82f83ef773daf8e7d7a6da451c469ca1f5aa24e0cc0ad76

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.88.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-1.88.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7294f2fa5d7f3d4a25a2e8ca828e62acb03edb0827ef1f2eb2a760633eb2039a
MD5 bc356b064a3f4c886075b0bda40a35d7
BLAKE2b-256 7aaa281a6e850f7c22dd8ebe48d98f113cbe0c5da9a5442041dd8c586abb06e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.88.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.88.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.88.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 522927cf5a4f56e1df5b240eb33f02d881a96926e1a7ceac8033e8aa1dcf8d24
MD5 b831f2cfb17216dff76162001e7fd6cc
BLAKE2b-256 5c0de9b46408a5787273b0007820c69ff34b0ab3d7e2d31d25128d9583813eaf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cf2d2c558a875abd32ac4662f7f9cb1218aa7a10af60f79201391c40ff22bb50
MD5 979023b4d0a7c7a74653b518612ad00b
BLAKE2b-256 c68f909696abacf94efe17bdd3801827fa2b70c4b44ed5d04cf59392adb6653a

See more details on using hashes here.

Provenance

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