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

Uploaded CPython 3.13Windows x86-64

openbricks-1.47.0-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.47.0-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.47.0-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.47.0-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.47.0-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.47.0-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.47.0-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.47.0-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.47.0-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.47.0-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.47.0.tar.gz.

File metadata

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

File hashes

Hashes for openbricks-1.47.0.tar.gz
Algorithm Hash digest
SHA256 c54a8f93d1a1f4a06e873a9d4bd208b69d4d21bdc74c584ad53bd879114de415
MD5 900a2049713b1041360f47cd3a6326a0
BLAKE2b-256 0e6cb6d77755d4bc70dbf05a72acc22dad888ee9d00f4416a627ce03024f8248

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b068e7f557b54b489885804119051be7b329aef5a7119bce553fa6c60a01393a
MD5 e418e1a6a6592346385098655f340b7a
BLAKE2b-256 9fcd205e05a9fe2df81f3b814b7253afdb1a02eff3d52f6616c59fffd454f9f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.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.47.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.47.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 32b92ff0bc0c7b511a50f012c1cfddcf2af64ea633f63984bb74839c26034705
MD5 ef9677b0c121a4275865f6fd8ea204fe
BLAKE2b-256 d580d9430c3f6c6d559e6ebc1d5a4a718310a9030d612212f15d0177aaec451c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 6cf25abc734dd49947fe79a051d812592a00d1549bd933b8464dd025ff718a08
MD5 edd04903d2f9131349ab41137f453209
BLAKE2b-256 a1db070bbcec975a82d0c22c552cd6c013ac19f34b0627f3671f6d2c6d14f7dd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 94360664e384a0b12ab83a6dbf391555f9a9bed059de22af7d34a4797a9bed9b
MD5 03053f5b71e5fd2c26b9132b314a8195
BLAKE2b-256 0366e3a22af90a4885831b9a1303396b34cde4c6b47b908bd37ef2c84d59086b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.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.47.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.47.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4d964e276fa51f6f5048ba41c37ae4521138d51541f362523cff4e0b46be36d2
MD5 9502a365fc699a179b72d6dd728affc8
BLAKE2b-256 adf633d169d64899a74de55d21c1c70e6da2ff93bff8f9e894b2307e9004b9ff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e0fd5edd002fb8740a6ba4197c2f227dfd43d4837e6191a90dd9849a4f7de34f
MD5 999aa2a62256024c13584abe4bcaf48e
BLAKE2b-256 8a3d08ea0875ad46a37d75dc19ac6710a5ac7176a559ba41e54b31d034cf9334

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8f3c53bd5bcf8906bd96659c8b5ab41ac90fd0fb04e24004518596f524483163
MD5 6cd8cccd3042a0305df11a00b5b45ce8
BLAKE2b-256 97337036bdc7c71c9a46cf632dc23ba8b47a0ae35e4efee2ce6004044735a28d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.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.47.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.47.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 114d26383f4c2944a789d62ceb631a4e6035d733468e9e965305741a7a255a21
MD5 f7bec31d50da05a65c1846bff64c2f81
BLAKE2b-256 afa814e20df338e24ab5fd60e78f0c86bda6f976dc175412e72703ed8f0de7dc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 550469cae451a4af71f785084c88a1f23e0075f58750a0e7797409b96bebe2ef
MD5 06202f6e5c68b1c6b430e8fbedf5c0df
BLAKE2b-256 eefe511e7bed66c728b916c5fd816a027fcad1480967a933597796ce30fa4973

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4838eb945afae701b9331d05af2061f87e313db572e7c62c4bb287ae3d4e1fdd
MD5 c16b8830a90ff2e456b493b866ebbcfa
BLAKE2b-256 3a67fd01df313da462929b9d2daa123b599fb0f4d235d69ac8f479fcf59eebc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.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.47.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.47.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b0f58b339a91a9616eb04e7ad1f6c358aa15e7783465c4b517d613495a37a3ed
MD5 c87108c6be010d9fca20c74baa1c3541
BLAKE2b-256 25e7d2698314fc88bef49ffc6aa3ce71ffbd563c4d6c31273e13c58a996d29db

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3b9faa051d67bd766c108073aa08fe4f3e3bdbd8c1840b59532982c5240d17fd
MD5 9e2c43603492747ff89726280d3ae48c
BLAKE2b-256 d4190f1e4aea548a91d1f038355941c990497c312b0544e2f63bae822ca57062

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.47.0-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.47.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a6a62cbe7720eec2624f851fe8c3cda9c3ab28af2fbf1673065b0d5299fbd61d
MD5 cf746fa4201f26e40372d9197b56fb56
BLAKE2b-256 ac832dd43e0407941628012b19c10cd3b95665edbc0ba2ec2e2c301d511126f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.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.47.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.47.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b20ffa75e6b0180dbd21d06da2b5f6f26f2a157e3d3490ab2a66df2be05a66bd
MD5 06373431efab9a20a4a685ee22a00c1a
BLAKE2b-256 aecb862336c696c05193066960b3f9273b3ec81ea5bef663d31c907f8b55b6e1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3639d760845e0f71218c30cab95f480e20b6f593717b1cd7bb3f5af0660bff2b
MD5 486e2fc566ff83a2433b65d6c0cda957
BLAKE2b-256 03b01ca9459cf78c9f14d1ec87b1c4252bcb03a0bf0fbacd9524a789eb76aecf

See more details on using hashes here.

Provenance

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