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.57.2.tar.gz (3.4 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.57.2-cp313-cp313-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.57.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.57.2-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.57.2-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.57.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.57.2-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.57.2-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.57.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.57.2-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.57.2-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.57.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.57.2-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.57.2-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.57.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.57.2-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.57.2.tar.gz.

File metadata

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

File hashes

Hashes for openbricks-1.57.2.tar.gz
Algorithm Hash digest
SHA256 9dd2e573a41e1cdbfff5d30a9b6a4492147250e619b52416f6e732664b280f3f
MD5 dd461bb12ae1864ddb3fcb878f91ec65
BLAKE2b-256 12b1d31e795d0b2f2d19b9900d6d5b7de3466609ea12c37a2fbc23c9cfefe81e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7b5ea746dbdffcdffd5937a6c4ff22d5943e0ef217772c23be8f87c1891734c4
MD5 b075e420782707356e479a49c606a987
BLAKE2b-256 507ba58dcf7e061307e259e63f3b58e422ad5e0c0eb071a3cbecd7ad9b2af2fe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8cf7a41e80dbb7f9c8fc42990561f2086cceff8e43acf23125f0983913564b6d
MD5 47ff901b16bb8572a7b35099f379c5d6
BLAKE2b-256 d4b7310d5ffc3f0e237ea6c86073c1f24cbbc686ad9dc03a1179e27593befd32

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d65a99798b9c788a8e729ec39871f0ee425af48f8a9762b2455d1b83a23d2d27
MD5 6f0f301a88638345501dbf734733f7af
BLAKE2b-256 91b5eb5c904247a7ccfb555f42b2c358931ee78e70463eb7611c7c64730bf072

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c7346559a08ea25b21f25b493ec111748cb68decd2a9b5385cccdf778e4ac8ab
MD5 5a4b256a3eae3cfdd30ec78e37a5fc67
BLAKE2b-256 7c43f1967ec22c074e987ea62dd65284cc2219587569c0d605e943e5d1052227

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ceaaa0f6a7232c5c88cb8543e16861ec86e110c09005f4714c64d34c4309ae9c
MD5 ce3c250d53a937b04d2c0d539d5dd368
BLAKE2b-256 0dbbaf35e417ea96ac695fc8bbdfbb4a6ee58302589fe45a837d95362ee12778

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 cdc04f5f08b15415e8b3415c6fd673c22dca3410b5800d5ae5e9639390ebdf8c
MD5 a7a51d4584fbab203c9b2618d7da549a
BLAKE2b-256 a547e497ddfe972178ad32be1867a668576c59548a0475028cbdc0bec53f261c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 bcbf10bc0a784ae54b95c26afcb00ff1ebc19388bc04a47e5fabbc3a6f812f5f
MD5 5fe79a6404a1aaae050ce849bb53be5f
BLAKE2b-256 89ab958b2f2b9e2bcdc127bdc7d6169a49e9fedd109eb0cb339b03c0e009dbb0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 39211248d8b44d380d8da3c079391af41c8e1a069ef0534e9bf3ce5fe0d6ed29
MD5 dc74a9705adb66e6d3775346980f7fd5
BLAKE2b-256 7f636271292973d0bb34727b7fa8ee72ad3d0f0a87c6365ea5b520a8eec0b63f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f8c5f2799b820e413e6b351ad02b9ff33cb16ee2170c58adee09ced63780bd93
MD5 c92950135d8c7235097dac812a761e72
BLAKE2b-256 27dd2a37707f5de38a7e4b90baae8a7f1c68ae965127a1f6e906499da53ad6fa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 272e0d71d1847ce9ecde492cb6c28dd2f1ab75969d5ea2df26f249d7245f7306
MD5 bdaea614f5eb5bafed5cee95ecdc7484
BLAKE2b-256 155df5a12fb3a475f513d72cc8a5a5f0aa0bba8bb7cc431042935eadc6187eb2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b87669af5eee533151ca56a2a33c046945090ae604c587f6065ef53d62c0e6be
MD5 6847970930f7de21cbd16f84cfb2eb24
BLAKE2b-256 47e1131b2eea6fbae2f80976486ddb9da2e51408538b5f97d17f13988f72aae8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 abdcfe33266940039d621de40bce873379e72371ee94e40994f590d22948ef68
MD5 2f79ee5ab93efbac4bc824f03bad6bc7
BLAKE2b-256 ea385b1a5eeef4ebe0aaea6d2b02b62e547e07dcc8dfbf0f73b17c891622029c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.57.2-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.57.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b5cff8f007444339968031753267a60e7ad9a9521a032f550a053d64505bc45f
MD5 c006c95f14be7dc5da026fa6b4be5d7d
BLAKE2b-256 4d668c524875595a46f6f75c569f3c395ff913455c343b28eec54829c81586e1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bb9f27781577a526bf03b676036a86340eeca570e3b2b82ee803970cbffb4930
MD5 4421b5057e5fb4cbbc2812a01ae9cdda
BLAKE2b-256 8732567cb773d728fb92e698b68fdedb51221af53e8e0ef7b63d9dc0a73d6ea7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 59d1a9ffc63bafcfa9105f3c2b04b43042fddd013507d93579530c2c85ce97d7
MD5 2c34bebdce20291dbabdf3d5593cf2cd
BLAKE2b-256 12235fc23ab371ddb99604712e16866d61792e4ce099340493e8bcd7c8dba480

See more details on using hashes here.

Provenance

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