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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.47.2-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.47.2-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.47.2.tar.gz.

File metadata

  • Download URL: openbricks-1.47.2.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.47.2.tar.gz
Algorithm Hash digest
SHA256 4994561a4eaca73049f4336105866a9b4703582c0cd4e33be9c36e3aa4576df3
MD5 21d940a934479cfc6f843e7f23ed5937
BLAKE2b-256 dd9e624afbfdf58aef1dfcc8ea30b00a584f076f3951dd361d5dcf450b3a4da0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d6cecfc09bed1bd707416004a2f3be3a1dc3006eca26d86c9e3a29a49ca4fac9
MD5 d53fae07af806bd27cb5b555f1fc35a8
BLAKE2b-256 77226d61bf700315f9fbf9552e63cd56552fa121dc1ce183b1034a5e0f0bf277

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.2-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.47.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.47.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ade23c66b2cf6c8b07e75b10d5703b8636130757d33100ad7baa8390c1774a01
MD5 9cc8561695e1444193d0c60a6d132253
BLAKE2b-256 afffd8a6d2541d4dbfd4d970fe4d9398ccee2ace440a571a7b7dae0e7405f1f1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 c36f73b2ffb22b1c24c0e3f62371fbc01a58815de2ce268654bfe101967572da
MD5 b741b802046081d24819395b7bba1505
BLAKE2b-256 a15f17498b39f7386e0b509144bb1d50ac6fffc6e3182421d6ffc1d8a40248d4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fe26a8233b9c022d01115c2d9d711f57f2340df0d1b5f6eb4deb131d54658686
MD5 49fb15395a61510cd757376b978e9c69
BLAKE2b-256 05bba47a43d7dd59fd906e1f36209e28134cf4090a92728eda8b6040ed86754d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.2-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.47.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.47.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1ee143b83ffc6d9b7650478515e53931459803c0827c3f53e0cdd6ece7a7bdc5
MD5 1bef9f2a8d65228726056ce203544c42
BLAKE2b-256 dfa3b280089bee42b655d42c803fddc7be50fa0cc40359f0e41a784a055b0053

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d266b12d44547f512039cc0cb79117467a4020893afc7960806c2f4a9fe0d297
MD5 c94aa4e5cacf622b66df05d9b3fc81f9
BLAKE2b-256 ec9e213b4bf7ff95dc2af03cd326c04a3d5144dd262131bea7e00edd81472d4e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3c54fc877385f5dd79de2c22eebf8a8432020116c9d1d0c75a1b2be74a1f3441
MD5 0035bd7671b11c9ea032009eea650c35
BLAKE2b-256 c47b7ee8f0d4df961c0e8b1a61bda7c8c5d37cba760a82e8e3911cb22c9b310c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.2-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.47.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.47.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3437c21388354c330b1ed7a7c77312f92873723fde53c881afc9be7f6d4d138c
MD5 1818247768dc5789704c742eef1447f3
BLAKE2b-256 525f02cc34f6f37f500154a582790ceb0a5b86c45fd82dc9124e88b00fea0d19

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3f93522ef94560acc199919cb9409bd9c78f36591068166c80744dc17dde41a2
MD5 efb6ea34abfc7d9dd77dbc9f637c92c6
BLAKE2b-256 fcfb466def5cce4de079a5d6ad51b9bd5ed777632fb246ac45009bb5f65a09db

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bab3b0fa8657a935773f1873a1678c0430d64b780e8a1bdce911e2952af6ab3d
MD5 cd3f50386f26afae9c5f3286ebf21ab7
BLAKE2b-256 bc5795a6dbd93eb5aa29f53d6fb3f26153e632a795c6255fd3180fa0687bd4ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.2-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.47.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.47.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4ab44433c7c086d8540799fc027529442e26228f5a8ce6591f7ba0d1bb53dbef
MD5 653ffe54eb8950386cb5170c1e65f88b
BLAKE2b-256 c3ecc53d8613b740a60fa6c83d48c3bca2b156a43e8ad8745315ea1db7abe63a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 bce0742a18dc3bec0267736163b8609170c1e22ed6858024d8457086d053142f
MD5 94017ca0fa3adf447825ebdd439ac35e
BLAKE2b-256 ecba45fc4313a4369cb54dcad1113e6284232430bdaef20805c70bec7b1eabbb

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.47.2-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.47.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 731b080601ea39598cba8aec5ac7eea1adacec427da61ea6735fab00d4a61a95
MD5 bab89370c3d1a632c67e66e657a33963
BLAKE2b-256 479a6523c82e89aefecd225f09193663b3ecc25d47cff93616dcbfea5a93a61f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.2-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.47.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.47.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ceed2d84b0632b9aa1cf9b4d1e16121bcef6d2877cc513f4099af02c8d8bed90
MD5 e1bce340153f89995cf0326654147bc6
BLAKE2b-256 5ca3313dd1700f3f92d69d70ef1a96e45f70f644aa1492301998cd943d9f8139

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e121b5c658ad23a2480e0b4cf6a1db07b70ca2a830a16bf7b60ea6ce215fecd3
MD5 4064a6af8b3175cf51f6c9d06ab5d94a
BLAKE2b-256 7603706ae63f08e55e17d00e8b9c66fd2bd13798ffc581b477e02e665b519087

See more details on using hashes here.

Provenance

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