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

Uploaded CPython 3.13Windows x86-64

openbricks-1.77.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.77.0-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.77.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.77.0-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.77.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.77.0-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.77.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.77.0-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.77.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.77.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-1.77.0.tar.gz.

File metadata

  • Download URL: openbricks-1.77.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-1.77.0.tar.gz
Algorithm Hash digest
SHA256 e40ff90a374646183230ce5eb423072f8116fb0adb6043527fba1ab1455a1e94
MD5 01341828dcc9aae6be006eda4cdc5e25
BLAKE2b-256 b310ceedbeb437cfc2b18fa7ca1d673cea4c9e689a81e08326e13a43b7041e00

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e38b9357a038221ca0783412a5749153bf112bbcd6e8feb9139542b415bdde22
MD5 82a6fe418c169cab48eefbd8ff1dfda6
BLAKE2b-256 4b7ebf654d4f93271b7908012a24ad2e7eab60334b60e8afb3aaa91eb1d1e647

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 828f1a8d4f0132c315f79eb902302b0bafe5f1e3bd669b631ad676c26ede040f
MD5 2f3fa8332e5ce9737732e57047357f91
BLAKE2b-256 237165f2c628a5bc22743083b081163d241015dc7934bc754e8a5a5f08859fe7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8ba658fc72d533a2d867f5c5ff5458cf97f9831111aecdf013b7ba6d52c307bd
MD5 26881edb99060d1f22d1a0391e43de6f
BLAKE2b-256 03779e1a0dff3edd20e6500e35d366f30b886b5f3bedc874825eb134bf525695

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 db15adeadc0d80206f6dcd9f597aa5dd3e3f8a705d6e6fa73e966c9154b93597
MD5 372b84b70a5e46b2bca275b85475fc78
BLAKE2b-256 f0123fc15417b8ac4ea53d41290e8f7d2b81c09e277b475b3247396e7947129a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f30e75673209aeed0e2068f7a672bce8f655bbd57d24970fa5c1560723b6700d
MD5 5a4acae50fc166803b774cf8b84be341
BLAKE2b-256 7a906db7ab00327100fd74bbfe1e44d7dfd8f3bcf0253a9af16b75c4db993cc1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 cd16e9ae95ee5ab053ea2e55cd6bd3c7b93ba74a5ba761320404b802044aa577
MD5 089723fca3a26e35838ff3b7c6ad9675
BLAKE2b-256 e932373708db6deaf3dc04dfeb85ddd85e254ddad6eb4ff68af67e10c1bb67c2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 31a510057aa865583bc96e887336701c3eb7b0184f3e5ee8c1360a4f52261e5f
MD5 72c3916711b0efc2295a50ee9518a5fb
BLAKE2b-256 ee4de0f564da9f82894871a8e71aa991a9e9e10a2c91c1a21b2515fdda4257ee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f36a95b27e65879123435a47a28e6003f72de1b5f91a523efaf416b1853e8b39
MD5 8c7ffe3cec81ea62555e276f8e835cf2
BLAKE2b-256 507370fa7a55dc850292b2bce1241186c5966b61bef083a70987899b9a677d7a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2e48512262aede6a10a344b1c102a3b8ef83455775241d6b4f6d812e876af236
MD5 a6809414268d464f04b759c13115328b
BLAKE2b-256 9131cf11f755b841a9a7c0158458a961658ee56f305f18358f577227bafdea65

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b9a6e204e8ff34099dfd60613436605a2c4a3bd84509afbb4a9ac3e38c664840
MD5 1dd2aed94927c712d5367e0ee94ef73d
BLAKE2b-256 e77ab2e9d4c7fb1557279c31b4742d7f76e04b651f586841fc01ae0b3d6d1fdb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 941d55e745c86aee7f61ba06ddbe0728f2f7ba84fb1166e79d0e88f5198894bb
MD5 764931de426d84ca520e388bab60adba
BLAKE2b-256 f69fd967c211dd1fb36c51129626e5a0767debf271033616c33cde8439a65b14

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d6d617bba6badc1b97d5f05ba7b451ab87bb5ec3398f27884e1e76176d04a0d2
MD5 3569f1372f45648bfa29ff1aaec74231
BLAKE2b-256 02333a7a8c8cbf9a26190584e8a3c272fc5aa4fea2593d2aee8d189573442587

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.77.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-1.77.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2da95643e397b3acc5d4f6b3fd5a58382cc5fe3e9019c7cd26776f0a658b0ff8
MD5 825284a377d81fb6821b58aa4df4140c
BLAKE2b-256 76a1a4d1ef6e2d24c6fd6bc9beebdd0e06133cf2205c1b40f6e9c568f29f8fbd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6a4e19964701c16cc63760f203b1efc423a99a77ab39841c7ee8e79dc47fd057
MD5 944ae845961bdafcbe5835c9b2670e38
BLAKE2b-256 5dcacefc6b9072748812f7313e2d499cb09602ac646a0546578611e7159b6712

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1a9e32a8cf497bcd9c2db8b8e0895d0e187335d317cd161ebf462edb9f3d9ade
MD5 2addf9807f3493c1dea70f59dcbf0282
BLAKE2b-256 e972902899172b1a3ed7b6dce6309bdd981b9119d6467da71b88e708c3b4cf60

See more details on using hashes here.

Provenance

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