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.69.1.tar.gz (3.7 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.69.1-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.69.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.69.1-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.69.1-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.69.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.69.1-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.69.1-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.69.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.69.1-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.69.1-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.69.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.69.1-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.69.1-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.69.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.69.1-cp39-cp39-macosx_10_9_universal2.whl (3.5 MB view details)

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

File details

Details for the file openbricks-1.69.1.tar.gz.

File metadata

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

File hashes

Hashes for openbricks-1.69.1.tar.gz
Algorithm Hash digest
SHA256 a3f64b5e5a790b054aed765b61687a7323983c20e75a9dacfbdb55b87e25e176
MD5 375cc161688330ef8d362aeb7efba996
BLAKE2b-256 26a7fa939506f9931f44eada611423f9b75d9eaa7c980173959b1c6eda6e3785

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f5a021e817460f3b30b225d9e6c3e66dd5f80ca341f1b59140fffd9e11e886ae
MD5 b9d9b139c1063ab76f1b742aeee0e9ab
BLAKE2b-256 73eb6c7734ebff3f78ca30e8136a88f7ab6c23a709ae340f2ca87a70bf50b1f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.69.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.69.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.69.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ef93cdf8302f2bec638822a72bdfb4844c30d4cb3fb1f64f770cad464c8225a7
MD5 95ae5d9da5d262964cc15fe5461d34fb
BLAKE2b-256 08944745992e57b7401fe5619e5023d2fc0c1621776cf57fe20732d380a37379

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5be615ddfb01be190d0c2acb130500b54918f0a1acb67c83c7394b77e8b05302
MD5 5f9a81081f3cfcd7e01471b77ffbc684
BLAKE2b-256 0673b3339fd0b76b202664be5b6bf4edfc28c85fadc5b864ce0817ce43226a03

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 edebaf680a8fafc131b1ff7c90ccf6192642907b7c55a7969760bb40ee414c92
MD5 12ccef6ff8b97875cc3a7c0d038f1f76
BLAKE2b-256 102a9b43dbab83c2af9d50c949b33e799ab2a5a11a62acd10541496d6e77609f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.69.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.69.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.69.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 181f86020e826776e406b8c4704139d519a7bff070262718849d57d79800069a
MD5 26414f3c8c29a37ba4cceebe494cf457
BLAKE2b-256 8926e245236eb65383d8d4fd594511ddc9e37ca02ce497acd4bfff248b16d6e3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8ec9c72f81df3aa5ac80e14a6e555e24be056b43783583c010d5cb1a097e086e
MD5 2870483d7ab327ffd0617d7c278c881f
BLAKE2b-256 b4d17982e178e853e3f32dbae511e7a786f31da0e7acdda1c6333d746081c181

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f514e97e6be13d652803b119c293a65f9a244cf2a0ee629f51397d216b7d1077
MD5 ac349056ce2115aae95e965f190a9510
BLAKE2b-256 5d00fef10f9b285056358437db25b6259477e8f1436d8246d49c8c57239fd286

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.69.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.69.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.69.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1b5af6ac5e4ba2278d6eb57ab4a6da8be5527a8538cd16ed8262e0ff257e91aa
MD5 badeb14abbaa263f4e863e64835f3dc8
BLAKE2b-256 fa16afcd867b203c2d21ebdecc85d362203157eeb590d3926318f87ddc665b13

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 889778ff2335272f534831d7973c2972ae2692d1c3ce9a924cc01dc232a6ba26
MD5 e5a5fcbb3cd3ff5b51d0b1fd7149e2eb
BLAKE2b-256 f676d21ac4421c9f31ada883826ffe880d3371684562d5f8edfb25c0f54a23b9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a72cda1036d7fcee4b684dd636867e257dfa2c4e244860d263bfe07c4406350b
MD5 f5772af78845f70ec41b1da5f2371b70
BLAKE2b-256 1e63623b0580e0ab88f62014d6880c818e260ec71e01845ec6a84e9ae9f27bae

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.69.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.69.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.69.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9b0120795bb30a431c16e62165d36180db02e0a2966fc352372187f78d56a2a3
MD5 f11bcabacb4486ec7d8fbeb42e34cc21
BLAKE2b-256 052ca87cdbe29d846043592f012385696f1fa88aaaa56c41aa1aa9a71aa8d431

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d76d3bb8692bc47f24916f884a3da7fe424c4b9608c88ae72b1c0ba38e0b5ec3
MD5 1c8c27c66616c133406f7c2f05627791
BLAKE2b-256 2d8baf11c97e20d7fc28019360f4acfbb100959577bfb5512bc025363098fa87

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.69.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.69.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 44126a3a3987d8757c0a38cbca8e90c564baa07189a78b722e76eb3121ed6ec7
MD5 a9a0d84bf891d5ba38948274ebeb0c97
BLAKE2b-256 a20090c19899880cae361bfb56d7d2b3949659aaac4744622a3002650ac5f636

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.69.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.69.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.69.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 06f4647cd60a5c05ec4fa74d45e9b753218eb82c3ad100a01c562ba5fbdeb397
MD5 d65c78cea9ecf101707356d71a4114d5
BLAKE2b-256 7a50c6e9f69ea9ebac7c58741abe1de8f86a550c364c1761af6558b0b2b9db83

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4204fe8b09f97a8734fab014650faad7c483790a734ea62c561e393d91f6157a
MD5 af1e6acd9b2b631c8e3d06e1248763e0
BLAKE2b-256 c44579973633b4351df76ca6e4f30d9d9ce915683735daa932780430f79c8d7b

See more details on using hashes here.

Provenance

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