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

Uploaded CPython 3.13Windows x86-64

openbricks-1.36.0-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.36.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.36.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.36.0-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.36.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.36.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.36.0-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.36.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.36.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.36.0-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.36.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.36.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.36.0-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.36.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.36.0.tar.gz.

File metadata

  • Download URL: openbricks-1.36.0.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.36.0.tar.gz
Algorithm Hash digest
SHA256 710c796c57a4f03c888f8a75dba03861aa006364e0d96399dfbd38c4e3998a2a
MD5 1e751b97e386a7c488c47ffe8f189ef5
BLAKE2b-256 2b64c027bfa59af47c21c74bc7e689b63fd6e732184999047c2d0b0bf70ab402

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8f1b5f603981a29827ba59f6602e9464381cffd69be0c0c60c5b9094287043a8
MD5 b7c9e318daf499d4f884115a0eec85cf
BLAKE2b-256 36e66f0ccc8b0eb4b97862030142c74003f5f28c51ac4f32942814d3465cb248

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.36.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.36.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.36.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 46df58c164192c7d5b8b26da5642aa29e64a7870f81694c5bcdb2a8059b12de7
MD5 d372266008856de2e236367ef0bf19b8
BLAKE2b-256 3c263ce50eeae987de2a8bc8d475685bc2192f9e96e08da252e68dccfb3a085e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 717739ef5331bb4e9b56ea803b60f41f6a12ba8fe4478d775cc447a9fdbd1218
MD5 ce5446cb5dc141d7763923966f9af3a9
BLAKE2b-256 bed58e2f1d3d4fdaa2bacaa3e018c336fa9e1a9a75de93a4b098f6379b5d9e81

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a3e85cd4c9139ef9c17546b0154c7a948859fa34e19530315ba2e9bb03204f4d
MD5 4e0dabfde115473d06c62f64ce8175d9
BLAKE2b-256 abbe79c36cec36756a847ba2c6b3c8b3094f621a7fbf4b4af89442b1cdea7624

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.36.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.36.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.36.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 966ff5dc5c91e223dcd1de0a92c57d81cfe12d488f7e22e4063e57acc9f9349b
MD5 fc55e1d3305f3865fe4c6e46d1710715
BLAKE2b-256 790bb5799a76e97ff6054eef65bc699e6374f60f54421b3b5814c28ba0e43ed2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 21bce8c9397f062a3c6aaa49ead4983bbbc438473432f4ffdfe28c0ae6b669d3
MD5 03ca51c8f9ca5d3863c550c455fd8e8a
BLAKE2b-256 d79ba967753e1d3a14aa23c90d73f735dde49e631ca0137bebd3d535ef89907e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 66e23f940fa4cd2f5099190dea2396de18d8e4047739cae17b7e50cebd3a34a7
MD5 e661edbda1177c8d207d807a891ca895
BLAKE2b-256 aef73d7f7123b4288e588983ef8ab8af202d5bbbf2b4c9d1189439bc85469b33

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.36.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.36.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.36.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7e9db3f5667398937644f4d7ba2f995007b62ccee779a13987ce62ae45c875c4
MD5 432a9d3fd429b78054c788b9ed946b92
BLAKE2b-256 41cffb4edbd7794ef645cdf460c6a3786065268419d238fddadb0fee135dace1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2d3d3f253cd6debc0fc6f4fd7ce4eff431e73fcfd2902caad07c2ed5e6a5ad41
MD5 b7a8f973eca1a7f2f84a58ffceee09d2
BLAKE2b-256 223e0ddad5171c586eb6f4311afdad0c6cfeefed7d47a4a66a8c941fafe868d6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e843c32f3ace9954f373d3ac3bf8d83eaded3e93a2ef5f4491f46d9a40cb74d6
MD5 986ab76ca0cbe43203437804381698ea
BLAKE2b-256 34df72fc71da20bf966d5c33b1caf474ba3b68aef1b25b43d02b6297f53df2bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.36.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.36.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.36.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d5ac91b08db51647cdf3c645861fef7eda250060d1545fd1fc0750cb7c451813
MD5 71007e39a7798e0dcdeb0a8dc008649c
BLAKE2b-256 87f74144cf2dd242f318cabe3e502f18e4bba576004208ebe0eff7241bcdc374

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d22d8eb4ba2efc90026234dd7b1e675ea2ddc672c83e958c8d8dfcfaa60a0ff9
MD5 236517731fcc7176d08a865db376bc01
BLAKE2b-256 41ae8ad67d7e76305f1429f600aa7ad77db12ce06a5a5c833891f77c0cd4b695

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.36.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.36.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f55659d35ddca4435988426087b20ffe8e3205053fcbfa77704b90ac73eba3fa
MD5 4c3d0807e0c31be1b460e5be6ada7be1
BLAKE2b-256 d98e7620a84cce36920fa510f2da04f0d14fdc88d73714765c015d35011cb904

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.36.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.36.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.36.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f3abe34b22d20b8ae10f222c6d563a3b3c9f4d50b46fcf6e32656d7665909e4a
MD5 ccb92d4b45542984ed7bafd655cd07bb
BLAKE2b-256 cb64e83b6d0b51b62f6c7310359a0879607bca951b2865671c7403719ddfb9a9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e8b9c3b2b3f7131518fc7a9330eab3a58ed6a6804a7f50bbb7e9bc0489628748
MD5 38e10b37edd5df55fb5b90a3cb5bb11b
BLAKE2b-256 cb069c226bc29f2f02e5038b5d494eccc1a525d40bfb354edd8d9952593c672d

See more details on using hashes here.

Provenance

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