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.41.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.41.0-cp313-cp313-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.41.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.41.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.41.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.41.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.41.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.41.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.41.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.41.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.41.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.41.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.41.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.41.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.41.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.41.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.41.0.tar.gz.

File metadata

  • Download URL: openbricks-1.41.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.41.0.tar.gz
Algorithm Hash digest
SHA256 959c0d2910609e9cfdecfb35df63cf9bc3997ec72caa7c6c4386d1fee0ce9b15
MD5 70348a19a08e308d68016d76c1805af4
BLAKE2b-256 1326775194003772645b94e176b829c352e47a27ef9089d55d3aa4edec5475f6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.41.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 94d67aa28c3e35481ec02654391973ef0141a37dd823277801b79c6079e9d5f4
MD5 80fb1a34250953c20b6db8f7b698a9ee
BLAKE2b-256 fe26193fd11322bafada11e7fbfeb35c6fc0968a742b1af856ca1c896f333c77

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.41.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.41.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.41.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8c48b08fa43d844dfc78e03d1dc9ad6b9aa798f9264f740e858799b7ff1866fb
MD5 2849bb907dbfc84d520f21873bd7fff7
BLAKE2b-256 203f054b38738842ea9332bec48f291fd2481a15ba32427184f721878e366049

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.41.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 905172680c25696cf3841e5e5f161b398f3081513ecaa0db5af904c91cd43f80
MD5 3c87ff097f4920da5fe144e8a0202d97
BLAKE2b-256 6e44d0b5db76ce6fcb664008e97ad809a29fd78b78a27a9bea3864fb38b5194d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.41.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3460784755215911733b088225dbfb9cfaa0a8a307cd3dec32af7cd089032937
MD5 15314b9ec8f551cb32e9f8020855c2d2
BLAKE2b-256 80b731a3294069c19e9821eeb9a0b46fba41b28e8097792322807bfc60a49b46

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.41.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.41.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.41.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6e2ed9a6623ca98b6ef335a01f12d280060b8dfe9bf55f844e41fcf2ff0f5c9c
MD5 ca85054b742d5fb397a3a1eb1c960e2f
BLAKE2b-256 baf0ec7ab00b07549ab51766cfb6693b79e7107a08b558238d30a89a1538080b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.41.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 706e813e641a0d1840ca6489815fb8a031101dc7071febf772c81ad0730fa84d
MD5 c211fc25b01281365d01dadb08569dc5
BLAKE2b-256 229380424f18dac9141ea2e84552a1cbf7b2c9c125ba750093cfdc4acac97ec8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.41.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 964e66c6456ba93310015bb09bbaf5a821fe68bfceb298c64dfc601d3a4be24b
MD5 5959e18ec53d34f64ba871bd9421acbd
BLAKE2b-256 7e98c2c7376b38cb1ed08351eff991611c7c82491a7404d69b863298585f19d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.41.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.41.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.41.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 26e508a9f7ddbc492f015fbae5d3e225db7d0b89e339c97916b21d45eee19532
MD5 c99306ee6bc987c0cbe10a1fdc3c2fce
BLAKE2b-256 75f1808cb8fdc9ad1b51eee27981e94709e690e6c61a4ca8c5e9bd224843728f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.41.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b8b26ed95ed65a89b958d5b15457c6866fdfc392e8fe41d68a7a99f14f4d08a4
MD5 81473dada4e109dfaacd9c10b1ab2bb7
BLAKE2b-256 4513967f0234873db75ad2b9d53652ddfae2bf0a0a41b0ff3e5d254c6098aa7a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.41.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 490bf8192ccb281d01ce2696d5556cb4f5dda85ac0a70e5138cb1846bcd30eb1
MD5 5f1ce0cb874d79b248550cd84aa57e16
BLAKE2b-256 3963210118b73231cc8c006add28a085fc643bd44d5e5e2fba20f3192d2d1827

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.41.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.41.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.41.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 40b275903e438d55d6c7e64d3697f5d806c252d7da415e47cae3eb54209c68a9
MD5 1c5b1b64d161bb1fd5dc40645048383d
BLAKE2b-256 0acfb36e1dfc8aee2eec0b460ad06f51d238802adab45aaba2d5f966c1b3f2ec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.41.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 dffc59e38b516fbf130dc5069c011ca56c1cbd1b5a5bc78322ddc3142e2ca88d
MD5 9918e23213b77f3145181c21afa43292
BLAKE2b-256 6daecae1a9794c92157a22342fa66ccf5cd42afebecc1377eda4980593aeb788

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.41.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.41.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4e841d73e5f87e92c23c83ee2961689237456adcd02ee59823aa230bbdbd9f79
MD5 2a32dfeeff5caca3a047dbf0fb41245a
BLAKE2b-256 5f764114877ba7eeaf062f529e944985c0e39f08eb2f5d8e0bca016b64e9330e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.41.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.41.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.41.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6149398d03d0536cbc3a232a6a3d4662f1e7fb653b937a8d2588ecc82d36082c
MD5 86f82c60d6c87582feac693a22ce7d99
BLAKE2b-256 98545ea64ad0915e71dc117d8b490b2b217f579ff31dfe14328f14b5cf68e25b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.41.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3ec2d50663ef71ab4dd0ba7dceab1bb59e3c3c071d0a5013a0d5355189a9be86
MD5 be32c86ad93df26b751efa46ccc92c6a
BLAKE2b-256 978b2eb1e1e9f07eca1c3866848b9f4bdea86c09aeaf22e0cf39699d6a7300b3

See more details on using hashes here.

Provenance

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