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.57.0.tar.gz (3.4 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.57.0-cp313-cp313-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.57.0-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.57.0-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.57.0.tar.gz.

File metadata

  • Download URL: openbricks-1.57.0.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.57.0.tar.gz
Algorithm Hash digest
SHA256 0fda60d6e4f795f3e9cd23f1ee0ce0f7b96a1578fcaa698219c6bf110e550158
MD5 06e5366a942cb24a057638584365dcb2
BLAKE2b-256 38e9531c50f9556c31f0604729535927a409cb40d140ea6a6f8ace8ca4d4f5ee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9e1fd133e91302f16c07042718613ea80be0efe4a5bbee0b990a0dc4053b68f5
MD5 c3f0ea13e1ad65462c2d3fe0d9274262
BLAKE2b-256 3eec371b6f8ce0a7f48ff6f81bd4beb2f94701731bb93cf3033792aa9cb823f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.57.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.57.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.57.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c23ddcc368b48c7832465df4452645ca1189347aa5e04b37c00719960c97ea5c
MD5 67dad27cade832de842fb6478a00a7f2
BLAKE2b-256 086eb1b6b18f729fc983240ec8ce154304373def6282c88edaee9acd543920e8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e3365f764cdf91442c4da0cd949eca6af11599d47ef1946c1a9429db5796511c
MD5 b2710043c3020ac2f60de7c51985cd90
BLAKE2b-256 264f69b89c9f2b6f340a74a1c93134bd2d2b64ae5e4d2420bdc259f303b0ca84

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 729d7fcd0cdf6a4496c402af9ea04d87332f9ef8e3b6574332c78e27b28e3486
MD5 d45ad3736faa9080b5042818450ae839
BLAKE2b-256 5819a563eece5d82bbf3b945be4dd6c7586b901b0263e2ea7062961d0849b80d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.57.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.57.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.57.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 75eb0e04c2855d8d17658d3b59fa676f0005f62ece9d8350b829121a85b11d43
MD5 d498b1e9df87f7cbd32623b6cf198a3f
BLAKE2b-256 b5fe3838a61c509c86ecb913220a44bff25a39fe27cbfe705172c56ef2594906

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 735dc9427ba7fdd0144cda2bbbcdd640a71e86613cc261a1e3f19a090c9dd755
MD5 ee31449a0e7e8fdc26cbf387349d19f9
BLAKE2b-256 ce4e0a9b832c78bc9c540adda2dc8886033a763a84cc97607a5cb744f1562b76

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9ab250b746879317e2ba221e50de5d1b257485110e22821f82b35fc481f480be
MD5 df0737612f724d1f2bfc7149a7b66cd5
BLAKE2b-256 eee13a54039f50f40113eb5a91b7da08f1d215db249a655c8a542607b10f1053

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.57.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.57.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.57.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c1052592c49c8aebefbc6b28aa7ad3648edceb9a46ecb66c362cbe53915f3bb6
MD5 564ed716ac180afb01bbdd362c5b1835
BLAKE2b-256 eb69c24686f164a4195a46060f9c78e05a96409139ff13b4358727f0f0d81cb1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 721019dbbf6787a2f9164df50a614e2da64320a7eb6a45d14258cf91c09624fe
MD5 0048d22e826242b2d8d27c3c57b6da44
BLAKE2b-256 7c50b68fd9853329cc94298446ffa123d12d4471102ca191450881394ca32735

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8ed5322d9b4c5336cf85ba89ff9636c4885159b877fe24ce715fc4654136dd47
MD5 a0dc53e622aacccc8e882f9696d9bdfc
BLAKE2b-256 f88cb9e506a3801d738b90e9eac15b2d834ea84e98925dfedc2f4b02e833d5f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.57.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.57.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.57.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a9076b02e0de9e1af3653f4fdc7d1ace12bb43daec0d2827d974a538d92fb094
MD5 4e66c6876356cb06852c55365b60f1b4
BLAKE2b-256 217ad1161a98d781f0c2df929eb9d30191f6414f7e86b61420f89dcf3fdf241b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8cab8bcf5b078f9da6f445b810b01f87cce744f0e9ebbecc38a1944450e458a9
MD5 d851244fde8fd7d7b722ab0f3119b4b3
BLAKE2b-256 00f47ddfb50319a9f4643e95a2da799cb7ba743dd13401d07368461c774dc11b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.57.0-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.57.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 138235314f0760e62524073047cb1fa3e02ae6d6733bcefc416b8d14bfd33dbd
MD5 4430509cb327b8bb13b9aacf4c68dce3
BLAKE2b-256 d350481a6ea86f64dc4bcdfd1283660199b6b6733758d96da87e993fbfaf52e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.57.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.57.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.57.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c433e24a1e8c279149fad4fba5cf4ed46306aaa2aacfa920965a1b0e76557164
MD5 a558a292dd994a03f5d8000c5d9a2694
BLAKE2b-256 56bb2380e1c61e57c8bb0161654595b088ac07291c0995505745e078f18e0f0d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 663e558bd3b9c8e0ce51e36062daded3b7f7a7fac0fe5bb834e9b02cea2dfdca
MD5 9c227332d7492300b1321c0111c2faa2
BLAKE2b-256 03f30da9974d3246895d086d67400eecaf8813c98ede2c03e8316ee0a0218e4d

See more details on using hashes here.

Provenance

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