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

Uploaded CPython 3.13Windows x86-64

openbricks-1.84.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.84.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.84.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.84.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.84.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.84.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.84.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.84.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.84.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.84.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.84.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.84.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.84.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.84.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.84.0.tar.gz.

File metadata

  • Download URL: openbricks-1.84.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.84.0.tar.gz
Algorithm Hash digest
SHA256 3d8cbbe608832fc6113a623b0b6d1b85a61502183fefbe99d6d35219bbebd3af
MD5 75d56b4a246feb654b2e898fed3ae210
BLAKE2b-256 f36576621e87087dc990d1fb7678378e2f19ee750b8da7835d0b83fb9e6dda72

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 be48468ee135541c7e92816d4fd770d5aa5bdadc6984c6a5bbc8f769b77ae96d
MD5 b2237a0f662638c27c2eea761e36b7af
BLAKE2b-256 3deaf33124a2aa4e2cdc5a73cc2f4837314b4079a154496ad683190800dcdd09

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.84.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.84.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.84.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a0aa6a9281bfd4d2664a1039983439727c94ded8e1c27e43c9fe63d3d0db8d30
MD5 614abb5b42813959dc9a77023a85975a
BLAKE2b-256 7c733f3cbb3865a2aae5df675f6fe6087c0b03aa0607dda76cd7df996fd7ce36

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 03fa9e000f8fd3f8e1529fa375e2becda050ddcfdf72c0851e50197007140603
MD5 1e135bbabf2e824b85f84679a7699830
BLAKE2b-256 15fb5de3a579e29ad2f2785d59d69ecbbe2e7eed7e5520e20156bd8f5664a1b0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1dd968310b59a979d905c2f2a60049951ee7d35b5bede8ce5abf97ee339329fd
MD5 c733fb5438ab8b31fdbc37ef56448739
BLAKE2b-256 b4f7fc282f516977ce5107e3c4679b3dfd8d38c46a5272637f1c34a63b2d1dcf

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.84.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.84.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.84.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a754cd53a0b14e5c039140d7458196dee03f45876deb97ac10d3473f628756c0
MD5 3d16e0c191e0fb4bf28903d70f277f55
BLAKE2b-256 71c2c48c01da1eed8111a6b0c84cce4c146e6ac2eaa5249c3e72a8106230eeb5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 2f0f325e946f5b0d0192de1b2913cacb8cad8448a021e0483262bb80146cd8d9
MD5 45e1394e42f1f22d855a2b103d7b4c45
BLAKE2b-256 3c602523e0c2ac825aabcff2b795121dd8ef353281dfdbde023640d17d43ec89

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4a17370f2fc8ce0d14ba1cafdf30872b2ce5ba3da8de697428d3f53855e3d842
MD5 e6213bbf4023b6bf2e16bba234f5ea10
BLAKE2b-256 fad7c8ed90e698971c0ddbb88570b7ea2c47da0e321f07e0d1de22b30eee72eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.84.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.84.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.84.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b4d65a55eaa1ba91fec2fe99040d4a04327ec3f5bc067ed44dd4816ad6643d6d
MD5 0c38da94833ba0e691e1b60e16c7bc60
BLAKE2b-256 ad226b18b72df0b5d1e42d973f69b5f2b62ffba1a156a54f94c8cef6ebc0bc71

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8660ebe33df88d200dd940b7cbf4ad5507cf313f039bee13123525215a50076a
MD5 218df60d3151310709d0f845f658d3fe
BLAKE2b-256 917fc818274c87f4a7002f5b769a037363e137ad518dfaa60973f06073821b30

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f4642c8108d2033e5293c0174af8ecd2be499af2cb9368acf38e449362975822
MD5 9d389a45fdbde4c5693b65bae2091ea1
BLAKE2b-256 4f7d3a3f0321c51a21037b7b9ef508ac0ab1972fd79f56a03ada16a92dbc4db3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.84.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.84.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.84.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e91ce6c0c68576d78c81cb688c32ed80b8b75d10d8c36b05956bf3b79f50f905
MD5 4c82c5466db11f9adb7210e0e0336e1b
BLAKE2b-256 996c6eeb37d8c71f161025284bddb196aba15f16852681bd82b5819b187a32d8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d112dd63559207a1f00fa1ee7345a2c36ff71a376fcaefd6b3b6b2fa7fc5d23c
MD5 4c506a3cdcf401584baa5a0784a20c77
BLAKE2b-256 af4e77e2fedbe96eb2b12c2e85abb373b072b6394ac77152c5580a768f00ff2a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.84.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.84.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 605e32a5c25a27ba902c12e2f03aa34df3e8711ce3fb174ea5b79437d37cada3
MD5 2cc1174e6aa9663afe915b62810d69d0
BLAKE2b-256 98e100208d47a57df57feec1397d2fb74ef5bcc0e557cc16ccb462927a0094b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.84.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.84.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.84.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4777493e1efe4def934e4d6cbf2d65b1d4a5ef31e6a49a2fe10f7d467e1ccc52
MD5 d64d5f701aa26e06c25b5e4a9496c65a
BLAKE2b-256 7870455747dc41bb761f2f0badf77573f1024ddb1ca88915a7f007892f14237f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4c3e40e209570b3c6c23673c179730f06779a2f3978b88dd6ed1a175d8a787d7
MD5 3ed0e5373deb41db5fac90f5452bd405
BLAKE2b-256 aabac52b3d6537950637d3e325ea6d636248af74d2b8c71158b2b43acdc36538

See more details on using hashes here.

Provenance

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