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

Uploaded CPython 3.13Windows x86-64

openbricks-1.93.0-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.93.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.93.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.93.0-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.93.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.93.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.93.0-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.93.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.93.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.93.0-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.93.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.93.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.93.0-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.93.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.93.0.tar.gz.

File metadata

  • Download URL: openbricks-1.93.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.93.0.tar.gz
Algorithm Hash digest
SHA256 0de94493bf12f7a37af4a005a06955ac9371ccf40e53e0bbb44f6bf08d1bb5ed
MD5 3e56ddde2b5c512af86c78220e3a4eab
BLAKE2b-256 e7dc838f13bc19e5149dd0b353c38786c5bde23277d80913fbe2841204c65114

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.93.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 72284973c73d99cea649d48fcaff312454b58a8a3f118a4126d22088bcde08cf
MD5 8d6d9a637481c0e6e8d256e0ab8c3044
BLAKE2b-256 ecd6085bc07397b69cf0fe08dabf6d59dfe2ae7e847ceb49355b426f4eb33f61

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.93.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.93.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.93.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 58a37285206f64c1498260ac705bf1fb1038450dc8267d90c4a55f1a18c6db2e
MD5 8f38403a53c7e663ee9701761db5c43a
BLAKE2b-256 f00e187ff751eb595bcd84dca011927cf83b5aec81cd5e93d1785559e50fc68b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.93.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 fdcc586fbb0bb48c056b04623107413ab05f942eba38a7c6664ae76ee0e9124c
MD5 961fec49e0def9d07a9729859173dec2
BLAKE2b-256 377c8aa84c69730d5349a6d59c2ad9af6e4e04f5833b37421287a85362bfd587

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.93.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1b577f4f62833d399234dfdd9ebff27610f0207963cd3f0d644de226db75f78b
MD5 ec13e11d0d974cce515617fc2cb096c8
BLAKE2b-256 c40e7a257485508631dfb4b9bac764640bbcd6cda47afbd33ca7b0e7dc12c03a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.93.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.93.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.93.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 82b29b2e4a88c77310037f3b92067d445104178b28fe66df4f6500311f393aeb
MD5 e590d84b3f91f86e5aeed44c51bc5cc2
BLAKE2b-256 269a2013a5ce8cfa0229b5d7a3da3b788c390bc4fc189cedf577813c233d1599

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.93.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8acb4e3671f6403460165aa198ccb3824335ae07a860a8ba206bf2ea09bab37f
MD5 4663cbbd248a9530859e9273f659198b
BLAKE2b-256 d99f000bf6eb648f23dbd87bf168a2e8e0eae4f2419ec9ea0526d44fb507bdb0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.93.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0d2c24999d4934287514fb1014e92f316f144655445871a0d6ddd504f74bf5f8
MD5 413017276ddf2dcd0188e59f416c6a98
BLAKE2b-256 4ae1c6335d3723dfbec2607509a996930a41dc7670fa3250b9bc2b3695dbcc38

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.93.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.93.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.93.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 585ef9347b1372ad264b99a83d12c5895c641f5d8197a29b06c52eed19abff19
MD5 47228ba1647cc5a2112e521f71dc728e
BLAKE2b-256 74e1d861da46e56b0ecaf764b993a947e61e8a3a386cb12df59d3ddaadd3de2d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.93.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5476d237b5c288b7d12671cd0d9551fd1b09f1e3c236e9a6087aeba3b9643675
MD5 810305a0abd676543e826e760985ed20
BLAKE2b-256 722d758c6c235895d343066223331e0504790092b29a639136a3e9d5d9d94a33

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.93.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 202cd3e582f8f8483af0bdd3fff6be4fc52b015a6931f6a9692f7fd0fa28ca96
MD5 0bfb1cbea5011a5fdf902e97c98c08e0
BLAKE2b-256 6c745fc4a842fc0864e44c30dbced09c3818a21aba468b530e2c2e05e4571d87

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.93.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.93.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.93.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 58d114ad6732556e33beea46ac0ebe714a66b26ab3e36e18c1f921b130290f11
MD5 172ddd9de3190a1a850a42a261f90cf4
BLAKE2b-256 f8c3aea13997127a17844b42f327c1d1d4b30acd7117acf9cc6958cc608b9406

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.93.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e10b859f9fba36852efe6e0244bb51f4f3f0b385702fa2cb4a494fdf518fb730
MD5 1095c858c40372e1a895d46d440a5c49
BLAKE2b-256 099b81fcb2b1dc69263f2ba741381c906e55f4a118218ac48730bc0f81fcc8e5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.93.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.93.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 da996a47b6a9f2dbd1962d9e34b658bff7ab6d2bec165adb722ee2f2b182376d
MD5 7e4fdf959dd0403e0c16dbbda6f4d9a9
BLAKE2b-256 958410503ec6317d2f34210a36b005529712338d623cd4cb7f1422eabd09eb0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.93.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.93.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.93.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ee78bf781c71c29d2ef61396cb32ff56be33afdfff554b20f43a7279b91078a7
MD5 05d7641912b3ac2d89fc480256fd7c36
BLAKE2b-256 7bf7364bee707cafdf58d5e70a0130bf09c92e664903d21e93577275b52bfbb5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.93.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 eefce417342b833c45da896bae19f799178124545d4a79cd14e49e5d817816c4
MD5 36fbb8322c76018170516cd43f7263ee
BLAKE2b-256 5e35fd7a92655ac4de55c10ee6c0ea787adbb6ae02acb8c41ebf67a80e0a7ae1

See more details on using hashes here.

Provenance

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