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

Uploaded CPython 3.13Windows x86-64

openbricks-1.43.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.43.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.43.2-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.43.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.43.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.43.2-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.43.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.43.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.43.2-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.43.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.43.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.43.2-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.43.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.43.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.43.2.tar.gz.

File metadata

  • Download URL: openbricks-1.43.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.43.2.tar.gz
Algorithm Hash digest
SHA256 0c4c4a4463b7ff7405670062fb93eed2ef2ffd362e42256bd2e11d8cd2abc7c3
MD5 a30c2c3f404c123935bc7907cfdc8425
BLAKE2b-256 81e9f199820f4f3c9cf75d15d39902a1018a457e97e7e4aaad43e5d83a539691

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e2554cdfd5221136b34e012435b0cf318360660248e1d82e33ef420950948569
MD5 55926f09cce43de84cf43f212c9ccf4f
BLAKE2b-256 651bfc3b3d8cdc26f56e11193a8350806978a0985a2dff9538b7df535b8fa0a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.43.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.43.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.43.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 864204011fb8d61dde94ad456520d74c8675b19d6630cef8d3000f46a45fe045
MD5 8e962acea5757904466422f12700d07a
BLAKE2b-256 1d6b059779af292ca12f37b322256fc0ef952e1743205c41b060404fdd32a7ce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 672f185994c0ca167042d108c89bb92c7b8122ab16a7e8ddc0ca177174a43741
MD5 730a8ac790fbcc2c056cce894046b373
BLAKE2b-256 26c8df8adc620953809e63495b723fc5eb4c3e5d1cb44fb9c0171d89eaa7abce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 18845c9b55db7fc512605aa5b4c295a083ee4de6626a4aeab883ee9e67aadb54
MD5 6eb28dbdb70e7c9bf9d55db8beb689d6
BLAKE2b-256 e8cfe8085f6e90ca4bc981c8ba3233c1d05f89c423d9a72a4cdd7b8407e24375

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.43.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.43.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.43.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8b9d825f82307cf9932712692449005b703efb4703ba36e82362d550e943d251
MD5 f4245f68e894f635d1930e7e6f6cc8b1
BLAKE2b-256 e791da5ae4f1e27bb6c38b784ee28796c2d971dea3b7dd4d8232a74f17426225

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 4cb7467c6439aa234575dd1f27d024f73c4476d56d7aac6b0a300c311a6658e8
MD5 5a8e50187176d02802768f248c440edf
BLAKE2b-256 bea46099be0975c7ecd6572a2b135a3bea3ce34c08291bab668e4511b402d157

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0fe05ecb72cc4242f87982adff0bd390b76ae4bc3f3165a25308589639ff5ba9
MD5 a66d9eef9ff3f31e971d0cd4bf9b8be7
BLAKE2b-256 f9f84df3e8469839a7f58998d06b952fc8b254dac211c673ce4f37d9ea7a7ccf

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.43.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.43.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.43.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 453707513af0836271f84be0800ed763763c0ad0cba14743609c30c1f305d2ad
MD5 2539900573789d344f5e4a12ce9a7090
BLAKE2b-256 118dfb8662d6ec9d6fa3687889f34ab149d0f4e6093e9255cdd7a0b4623b1523

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1dbfd360f35377287ffa4c65dc70bb1f9a7ef3ee7f24b05e8b5ff6dedb85f0ba
MD5 2d0dd928b3822e411cc0d5f076078cb8
BLAKE2b-256 851d506384dfabac8a2d2a2729155123f8a580ba05753fff03d3c18ffd8d29e1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 41060c372e5fc34e15f8af7fc75d98714792888f32a88821f0e0fc729f792347
MD5 63b8d17e60a36f443ae85aa4e65a097d
BLAKE2b-256 cc4ac30964644269729c141171fbca10df655e1d7b8da5ff71169d182e74afbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.43.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.43.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.43.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 27982dbf97b290ecfd9a5b162b47b38caf30925e41c28cd12d0ab87d419e3e87
MD5 82ef495a3b18a5a7bd7beef1e56e529c
BLAKE2b-256 2808d763309b89f65dd742860e9cb9912a59937b8e0709ee463add7f5b33bbc1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 00240c8b090fda782c6583d9cd81e5b6c755c9c7085ed50adcee169f2143d1a3
MD5 e692229c7bbfd83983a339a76ba57fd3
BLAKE2b-256 cae950b599946e6d92e51c8320977255a703e5760d56b9cbc3c0a7ad281f936e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.43.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.43.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 fd9f473f75a3d8384fadd82f14ed135182af89c65ae8ae458627795c949f2fe5
MD5 3bfa5ccd6c44fc6eec114ac79432692c
BLAKE2b-256 78a1021d8be750fd313ecb5cc3e676f29bad7026e403c7dfe40c9a4c5b7be418

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.43.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.43.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.43.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fc8b02b1f8ee34967774118de54cd70c64067bb2db8617517e65cd904c2e5307
MD5 09552ea89be880f94ee7ad33d4959c68
BLAKE2b-256 b99d7ea15ec0f9818a19fb26819636214f686f557b28c22d57375ac053ba9169

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0fc158734db1b6f74527a0cf122ea1ecec7f5f245dc6a0e97d715559797d3b94
MD5 f4b0404ff09669dedf0f834b3b58da85
BLAKE2b-256 5dc57f469731227af2d0e8762efb096c42b68c13cdb5279f1d2c8a02d5143f56

See more details on using hashes here.

Provenance

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