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

Uploaded CPython 3.13Windows x86-64

openbricks-1.52.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.52.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.52.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.52.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.52.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.52.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.52.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.52.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.52.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.52.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.52.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.52.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.52.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.52.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.52.0.tar.gz.

File metadata

  • Download URL: openbricks-1.52.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.52.0.tar.gz
Algorithm Hash digest
SHA256 f6976010b9e18730ea81c8acc276bcb851c7a4bfb3d13a8ee55f35e13a3ead90
MD5 8361b738e96ae7cc2d40b4f41fe0d9f5
BLAKE2b-256 6cfd3be9e47d56741ced3a5f240171dd3a9c28a3c2cd6ab476d2eeb2ded4f32f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.52.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7b49f743a4fe7646962aae94570654627271463ceed653e43aea03587f860d75
MD5 b5b9f499b67f83699a9616d73b099c6b
BLAKE2b-256 b5df23a7849998c9b2b1e446747f716915819e391c60ddd365bc3e36a4de0d3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.52.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.52.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.52.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5e7b3436033faa7d4dc69b7f0b18ba75bbc3c2d1980ddfb405533f79592b844d
MD5 175b61779a265cf3a2fc9c9fed6c5d7d
BLAKE2b-256 22bb54e61f0c9f7efc8a4cfebb67811709c5d98a29cf9e4de9367171c51e3d9e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.52.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 0442d6c7810dc24dcab3cf9e97b863dc79fb4a17a7f806af63486fa45524fed6
MD5 b3a1fa7adf2ed8b9ddbbefd1805832d6
BLAKE2b-256 4a35c09f5c395859699283dc0aa5cc0fee8e5f93eef6652b7f8d558f03a802ae

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.52.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 962879cd532efe25b9ecfb604bbe697c7eabbb89e359a7209008d8d1e8e9f017
MD5 c19567d9c204cb37b36ffb8728253c86
BLAKE2b-256 222fb979bf57184adb5d1735458c766a6491b5938eaa0ff0b36730b0a9bd6366

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.52.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.52.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.52.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4f4a4751e8e0f24a4a76e0618059717d662c8368008d31ab4204d757c7ddcd09
MD5 c240a6e1ca6edb5c22305a0aba2f7fba
BLAKE2b-256 0a332877f0d71710d1e84bd236a124ec26ad7afdccdaf61b7b6b349d14237cdf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.52.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 92f4f465c57d4c087b7e9fa5496bb8f4227be055395758139b880a68721230f9
MD5 fbcb0a8d8982a10194ac3ae2876363f3
BLAKE2b-256 3ca40de72fca92b2986138e887d695b4cfa73ae9e783e7c7cdab82aeb5af3787

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.52.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 24bc06c98bcc5941b1edea9c7ac4cc4c63574676a43d13f3561d8d3f8bc8e3c9
MD5 8a9511db2b705322bd1a8fb2c48688cc
BLAKE2b-256 09af091e5d29ac669aa7354fdd38c8ff046d1cfdf18b82c38f096f3cc27cf579

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.52.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.52.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.52.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9e14a010feebb0d939eee8cd8c26e41848b6cceb32da3f3c9ee10403a75bde79
MD5 d49263f424276f5ff301bd59d0152a18
BLAKE2b-256 42fb5ade746331c5f79d7de2655f13ea5c1f31dfc527ceea0db50f49538dd069

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.52.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3ea6b8552ffe6c0fccc9fbc9df484450b34f8cb2983f69fa72c8117e55eaa744
MD5 3c745a808f0d21c3cfddf95b48e17a26
BLAKE2b-256 9e89cc8002c9f60dbf06800e0327e2978a2559d8a10675553d0c1e15d7104807

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.52.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7d19645d28e2b8173ee87b20202cf6a09e5236d9d08f747610857910163fa4cd
MD5 c6e3db7ed6b379e06cb5fbdd78f8fa91
BLAKE2b-256 6635b72c2f7d8de211a0414da29bac5d93a5655e6a4e5b1accc8d2f7e2fa883b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.52.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.52.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.52.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 175e71bdde94340223d08d108262ad81a1df9fbfb7d61054a5c28e40b1a8f272
MD5 87366a72fc643791d6d6700a78a10879
BLAKE2b-256 d0ce91b3bb46efc6d90f6c2d25af2636c6476150c5ffe5979c7f163f5647b1ec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.52.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 28ac114c22023520a7d017d47dda7a6a19c791a59a6fb57dcc903a76f0e44f89
MD5 9093d60fca9858c19ecab29d596568a4
BLAKE2b-256 689a52a31e080ddf7353bcdaac07cd2fc5c8bf2ec6d711c7b7e7cf6620a02995

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.52.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.52.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ea073f1fc3bf623f76b79a98f40ef4fc02c81af7b8846fd0a204e6d6f547df32
MD5 9da07096aef206f248daef752e935c1c
BLAKE2b-256 ef134124c62e124a4750d4eb05d8ae756d501c5602d65c501e7bfc1418601448

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.52.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.52.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.52.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a4b359c3111b2daa7ca1d862e9c6589271af55667437322303ac0b9d6a221ff2
MD5 bddd3e278461ea40eedb35601058c881
BLAKE2b-256 802b8020cdf0a3badceb0da898c53e46be310b74571235de82ca387e224b6991

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.52.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 064866e260082a33e54bed1d301f35ba835467b584ddfbcffa46bddb37bad9ee
MD5 88808fe4b813a2a8e3aa9fa95642ecd4
BLAKE2b-256 ca2e47be99976b6b804d9f8e0fa4b371d9781ec9715508d565686df9379f1928

See more details on using hashes here.

Provenance

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