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

Uploaded CPython 3.13Windows x86-64

openbricks-1.83.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.83.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.83.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.83.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.83.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.83.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.83.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.83.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.83.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.83.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.83.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.83.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.83.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.83.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.83.0.tar.gz.

File metadata

  • Download URL: openbricks-1.83.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.83.0.tar.gz
Algorithm Hash digest
SHA256 36f018a320267bb22d01a01710c448bcda1f7acb940b62746504391a8d69f485
MD5 1411b9b7f12ee93f751901666656e816
BLAKE2b-256 845983420cfca870ca95388fb1dc4bd142e06a54e4555d0e9dfb5ec27750e488

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ec7d6641cf7c1f729ecdd8c7a93b334622beea61d489f2e882f8d0defa560d8b
MD5 20435235c1b3d69232fcc2f31b023a90
BLAKE2b-256 18ad7b8f5e6273851c53a4cce97f8486abf28a66e595af0c38bb805d1c6a8948

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.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.83.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.83.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 51b7b7e25f0fece2c0585b0c48f1bc7e86e37da45dea654ffeddafbf86cd7bdd
MD5 14f64a01234637d9877d7faeb6ec9e2d
BLAKE2b-256 7c8a1d221f0beae68653d260f2de049496efa545611c61e757fa54db72f17609

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 72ecf38efaf1c09340e2c4a51b670bd16f87fa373a5f5abceb82f807f32ac1f2
MD5 27e571fe186e61570aa70a27c36fa022
BLAKE2b-256 9eccdf4428e5591d8b89697f4261244685cc747936f5a5ec6e63497beb994343

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2fa3d82603b0740d79725568ee2bcd2cbd558043ba482a96d79dc0b802059d08
MD5 0e11d0297afa1207d773cd9f031ba8c8
BLAKE2b-256 9fb52e3b4fd492cbdfb028a2d1812cd4d444c30f9d3bee78104d225cfeb9774c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.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.83.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.83.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2fd5f9839e3a3502433b8c9780e81420f531fc993ed0334e6ffa4f1ab4fa6cd1
MD5 bf0011e1dc267e83f6160665e815d8bc
BLAKE2b-256 2e80e540451c6f8e22e90da86b1f0944266ad7ca7380c2ebced7a93fa9a12435

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 ae92c7cf54dd156576b8bed60fa58de475282b2dd1eb8584de3468866430af66
MD5 f195490fea5c74415afc8586a8d63458
BLAKE2b-256 7b37f3303e7b988eead68cc8a6b49edcbb22eba0ef6e90d2a54c43da91ce13d9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 05c38d1fa728a8463eea3bd12970ab5c8dda940ae260275a4b29353e2235bf6b
MD5 061e03164b28639b34e77f508005277c
BLAKE2b-256 b9415b3e4abd9d3144ada97b7254299c84f712e43d0776303e5fddaab62efe31

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.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.83.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.83.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4e1cc1be7ef3fb12173078edb37dba6b52874daa66396a18644da6aa92b6afdc
MD5 d55831155c2f75613c965f46e288b7f6
BLAKE2b-256 8f4c05bb38ee4143cda26d2ca71b6292a3419b3e6317e62d6ba787ea50c16b10

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a46518328c24e1badc117e4db5b5df1585f79a009a6f02e50f37769dd68b6a9e
MD5 9ec4b0647f3d19a825f485cb602e66ad
BLAKE2b-256 c99195113c8c8416255c009acbb62808481f2880f02218f1f42839548cdd2062

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0a4e96c39a85202b76ac5c76954bc504848bb8366adf74a07fadc4ea5a2bda1c
MD5 d3a9f523b6aafd33792fcb4c17e06ab0
BLAKE2b-256 eb3091d4802f772b128f8b3aa8e7d4c82e781c4f2774e4820606af6b9f25eeec

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.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.83.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.83.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 602f230a64fff1ab38c1a3fe491739e4f7ebb05aba304728f207ea3724a37977
MD5 aba638476f089e09790d8061e2accf43
BLAKE2b-256 d5993aebdd4c841d4f25ae7fdb10a5086e214f765b721100e7534dbc2bee6487

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d651338668a439a15d8ca05bc696c2333ab5749ef50853569ac6778b4973a8c7
MD5 60385ff2a12ff3e927cf766e40ed110c
BLAKE2b-256 25230d0db41db784327266ac0a1e6a14bfbbcbf8b07983090ff64a7e8967de63

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.83.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.83.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2157b00dc532c726ee27c2b176dbad37d79c19b0667be1f5bd1b9dd729e15503
MD5 021c6b4c50638b009402a8005e2c6c53
BLAKE2b-256 e362a2a635ae0cef1c4922892322e0e0aa217c44af8bc7d1b4e5dab1aa38bb76

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.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.83.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.83.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2104d867c9eb7e02ef6a15aad7fcfdc1ff3beb409165c01681fed50e952a55a4
MD5 31b50c35cadbb1451fee187c571240f1
BLAKE2b-256 75d91b8fd45491ef4dda50109b0784d041b2f0e7780f04cfdd967862037ed99e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ded1981784c35117a508739b555c16fa5ce3f4deee891e12ec36b47707ecfd3e
MD5 adc1ba038811a26b187228fbfae0ea07
BLAKE2b-256 4edea5482554f427de9b29055d4d5353210918183937582ba6cf91e95a82a5eb

See more details on using hashes here.

Provenance

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