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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-2.0.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.0.0-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-2.0.0.tar.gz.

File metadata

  • Download URL: openbricks-2.0.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.0.0.tar.gz
Algorithm Hash digest
SHA256 376a926552e988ff68e1cba054a9b5e3fe6764edfcf0f169559718a071811c18
MD5 474a9d1ab2b2c8054feca57e78ca2b4f
BLAKE2b-256 98c0109f52cf556a28bd54f55bd3e2d36af994f84788feea9181551af20e1a39

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.0.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.0.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 18672c1edf15a9bd5a06683ee6409b5f09909c62688274265bdb638ed6bfe0a7
MD5 b52ff8a81afdb8ce9b1771c97bfaf3bb
BLAKE2b-256 f5d5ff95bf1eef316c34ffa64b7dc7afc86b2e8754db66f49f9f280ad11b0134

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.0.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.0.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.0.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1928c6b710090ad56c070fd5715afc75cd736463a45dfc80e6a8d046894afea2
MD5 7033456226854a649d288d27bfa659ae
BLAKE2b-256 e9ef650b3f9aca9090dc61897be71a475783942ed8b107b80812a5e8e1b41433

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 2aa92f303035cb4c6b5f21c6ad174faedbe8b6d5595ffbf0a9669ad3f7b190f3
MD5 4264b386ae1f13f9c70d630ffe9ab82f
BLAKE2b-256 cec540aba63f406adf93da53a6f40f70e07884094af07ae0b3f9efee375ea6b9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.0.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.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2c1ada97c552e4fcaca92a2328769d10394f3e21cb5a9d7ddb2966604a8d7b6c
MD5 90dcf4093c8c04101080538f6ed44edc
BLAKE2b-256 1386b06f4b29c64551199c9b84b13ff4a5c29e9d97acbfa381290e7dea03e0e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.0.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.0.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.0.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7105716747e5511bbf45ade6a4378f8c8ee2dd4f7d8c35d640bc2b722d02aa6e
MD5 4cbcd71b5c15b4031489b23d6566da87
BLAKE2b-256 41d8432c7cac7661870ee4463f1e967ed0af25deee337434e180e2aa17c6403c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 cabddcc56d9ea60da4b67890d107c391b949021352623772bdc4f4ed99a4ccd1
MD5 6dbb8d1ad626d00202b131399cd9e155
BLAKE2b-256 b8b8fcda3bfa6e6697d5f7138eefa7b06a4227de59c70a6346423e7a38afc77e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.0.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.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 269a7befd525db5b475592ea3592457991a3d001af213ecf6d178a50b54bf386
MD5 341b23de8385f4f04d40c2716f3466dc
BLAKE2b-256 2e7134c1edc3a57c3cc4c075fe4ffae608d1a507e75d3c2d8569aeee5c70a205

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.0.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.0.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.0.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2389186f46b1ec928c05c7b17a2aefd41f2f4e6c6ab1521a8d24132a4c6b53ef
MD5 19a8e3eea68707141f9e2a73e1499088
BLAKE2b-256 62320c2df5745098b47460b09cdec818b742a9cc5e6c9f82dd74d0db3a3b32e3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 816b75aa0232273c415cc456279ebd0472e1a8f129169606b1d4d9fa20501ae7
MD5 6c1c5d8df3dc7970f61891a03f1f2172
BLAKE2b-256 879613a3f5ed76e75ba6e285714d8f6b2801a6fb1cf1293f8597762df9ff174e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.0.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.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1f48765037dde4c9f00becb47a4101f1a989e31c3fb6b619a0d71b9e16f2f2a4
MD5 ea8ecbb2976d7af6d9df68bfe8115714
BLAKE2b-256 2a92fbf121be26f495e90d3a9b182783b6f0c6d5f013d32233d431273252f839

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.0.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.0.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.0.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3fb276f8df49ed33412ccf7f22d8fbd1c1a5f3c4055e116cfc1a68fa53d1b7c1
MD5 8e1c8baa498d53b9cdea9975dff6ff3c
BLAKE2b-256 7050752c4cb4d69178ab237c837c960027cf2e445b6f9ed6e68d4eacd9b40780

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3f9aabb3fce59c80a8a70bd6f87b9bdb515a19dd5cf9262b5e0da9edf08ca5d4
MD5 b08a266d45b03e3b1bcd46c912d5a60c
BLAKE2b-256 09f20edf586737ca41c69116aee57abfb81fbf51405898bdbbffd289ee5049d8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.0.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.0.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 da377514515fe5502c2bd27d8c82a3778854b4507dbe9837f99372a9f6061d76
MD5 87b1d2b31a8bd83057e093e80606e707
BLAKE2b-256 cc69fec0a67cac0c9a34807565a332381bbf89430ba0983d272465681c1c45e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.0.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.0.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.0.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4cce8481a015afd7fa7d31fa7a416ab415e87155b6527e94ec556a3aa6405a5c
MD5 4e15fb3d5b2b93221bf850e137a18d92
BLAKE2b-256 3745534f402d25ff973a76a8468a5106df1b7ce4e3eea0fe56f47ef951ce3270

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d9a90080edc77e13bed54db326e59362119d41049bcef9a64bb94eca6ce38107
MD5 1eeae7558e7fd30d49c7d77bc71042ea
BLAKE2b-256 f71013f6ce0d2f54698cf0e7f80fd3b80b35ba1eeab69972890c3edd6601e7a0

See more details on using hashes here.

Provenance

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