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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.92.1-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-1.92.1-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.92.1.tar.gz.

File metadata

  • Download URL: openbricks-1.92.1.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.92.1.tar.gz
Algorithm Hash digest
SHA256 b2e7086039677f41042d5420fe68fe0dcae063dd768a786ec5f24c7ffec17e7e
MD5 541c4e231e0f6c7e3861f668be7ddab7
BLAKE2b-256 8f7216fb09b1365e77ddc0b5e95e5c350efffeffe997225ba4efd79811fd1ba5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2406f8756bf4be769180494d8364d89a655324cf5a65d58d5cb581bd7248af71
MD5 893923a82997b42acf40074f78d127c0
BLAKE2b-256 bd3d9f38731f8346c0d7835594a1fd3bbd511648e576140618c41eb241d8a5ac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 634fe4de68ae6e40eac026d4a10cf1bc8aebfe9f423367854736ce74dd8878a3
MD5 3d892de0a12d7b2a2ac1ff1be6f548a6
BLAKE2b-256 1952cf4735cdf7548ee91a83015e18b11cdea01a9a712bff7b03547dabc4f234

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 aa9d1db3c73d282ff756e4054b9fa0ebde40fd39b6a918ce6c5c8f4d785f2cbb
MD5 f99fb430f306ef0fe963782582121fb7
BLAKE2b-256 6acdd064d2d62636cdf677d542eafed55f7348f70dc5251a7c42800aa976b9b6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 22a46933e665d11c3f4050bfa65cf5342cb99978dd89eb9dcdf61b2cab63988a
MD5 3e22a3ecd35448161b74a39d7289e81b
BLAKE2b-256 9fe284a71c3be3adbef4562208df65ce50b18fc4ad00aa8816a96e36a7c62c04

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1674678236e1f218a2caf2179c5ad4613ece93c310b5da88b628ad75a99e060e
MD5 2111ccd2f47022f8484551548df4de9d
BLAKE2b-256 49aea06e4423eaa5396615217bc823a727c660786829e999bdf0343ce8c95cca

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d6c3ff7e62bed21d553cf50f1e2b4048c990281c05d8a0127caa80e03d4a6075
MD5 c3962a983c5463fda722da17438d966d
BLAKE2b-256 4c3400470b4059194022ce84ef37124a73819319b7f45de1f07bac86d4af00ae

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a6681e0d818467a02b2c2cc2127158e7707d64e8e5f7b83b7776feb45659ca0c
MD5 78a4b697c7f11e99446c6e690c6f1fe9
BLAKE2b-256 e70937cb9961cfdc4f3bbc4383ada9b41d9309de4ba76964bbdddab9a27b9b90

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 284838f2d2bdae5b75e9154bda4ee30ed01b418c69846f620e0c1f491873fc48
MD5 99eafc86dee05d734d5940755c4c2b6b
BLAKE2b-256 0594dd264c798bba1b8cae7265fbe7c1a6e2a468b6ca431f126dea4234242cac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0652becec30f1767c260e7a923b36b85537faa9b5e1dea8888240030acaf623c
MD5 54dd4dc96197ce02bb7a253d6088bdc4
BLAKE2b-256 e98043fbb196a951e1c254ab51a07cbb4cd22c83af8f2fa3cbf496188a0b3c83

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f5e5c4b7c5ca68a69414ce8280e4bb3ef5a6a59b36822a5a997a2070062731aa
MD5 022274f8b0a1f6da53184691b92f8b94
BLAKE2b-256 6d84f603a307f1346a753f3be06729251dad0c70bf99427fd460a2de881bbdca

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 90669b7f1f98544e65816fd0d4cdb76402f2b27ae345961fad6cd02ebade7df8
MD5 e8744047c03099c9f80322af9ce9c6b1
BLAKE2b-256 c5a26dc3a62b0d71db1f4992761f2ec090e60e85ff8c52c8346ddf1ef7492391

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 fea1962937f8b23629d581ce149d2c5b57c121dc60e0368e7f339b78baae664e
MD5 ea15cbcfe6371bab45bea92f9380be34
BLAKE2b-256 3678ba120e684a725139b98488a6f9a0676c26d90ccfde8ae19c04de384a18a5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.92.1-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.92.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cd6af8e79160815788c21414fa708da648c8ead7594b15e3a451f145c34e971e
MD5 263da910bbe0edb56e94c553df67fc94
BLAKE2b-256 ff2516fdd47cd5b6f5cda5e4216437e8e41beb70882b733e2627f76aea94170c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0a5e7f433072e407c3543217481d1883864938ecc131be7780aae8318059ae06
MD5 cbf9a175d55f794a9f96fb015adb5ea2
BLAKE2b-256 60a816a4a2f389d9f1315e505fd2086188b4dde18c21e9899567b586bf16700c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.92.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7fe4a9a74ad5f88c06395d075c3ec606f26510b308137ed6dfe0de7dd53ef402
MD5 9888c4233b45523e76396a039ec390f9
BLAKE2b-256 3221275cd73af24a90c0647f7236dddf17796eacd15e16becb6658404e339f84

See more details on using hashes here.

Provenance

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