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

Uploaded CPython 3.13Windows x86-64

openbricks-1.75.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.75.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.75.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.75.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.75.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.75.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.75.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.75.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.75.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.75.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.75.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.75.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.75.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.75.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.75.0.tar.gz.

File metadata

  • Download URL: openbricks-1.75.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.75.0.tar.gz
Algorithm Hash digest
SHA256 b304cbd9e957d6b27e187c3b9c0456823f610e0563cc0dcadb229297e7633368
MD5 223f04241dc787d472986e3c41e8c879
BLAKE2b-256 699179bd0bb4f91184c5a78b8d66e1de5ed4733c6c1c4fa7650c257c73c86fef

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.75.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 80b4c0b6416aa8389932fb81bd2eeebbe645637caf13a679774fa565dd2f0780
MD5 05c0343c04dad5385ba69f906f87987b
BLAKE2b-256 c4bcab8678e7eb333f990e27fa768f5141312f32c717a17f5744c6deeb0624b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.75.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.75.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.75.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3c015f81b6ac1d42ffaba09b57191a89ecaab56ca6ac169ffd01098e544db1e6
MD5 475a40f559d1c0c8063ebac4e907de57
BLAKE2b-256 e29472382975b0e5e4caa4186414291a6a11fbf84bdc0e8dc966550e47ea4cf7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.75.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 67575bb86799f0c2fd9749f5f4c0e946585137c36127e1f44b958b49768416e9
MD5 b6bbd3c39a759452f82d4390a36d2827
BLAKE2b-256 4f2b51d42a8200510563802ceafc7ed924280cbfa898eced1795e3902750cf59

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.75.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2e6cfc7aa6e9c657d0b3d5eebb274b9eb8351c5583c3c4c73d67d11dd7a116a2
MD5 fe72091fef6f253f38ac0920d5397324
BLAKE2b-256 720db368144ae383c3f36341183f2b7585f8950562006388afb5f7e8cb3c140b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.75.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.75.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.75.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f564a60b7885bf15e27b5b213f3c4d1760962632d8f9565a647f4eb5a337d327
MD5 45e0aeda3b96a62ed45bd2634c3f142a
BLAKE2b-256 e5af0d37477f6ac2f8009c6c226f297b88c8b19131e9a316e5d99562f3487f30

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.75.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 cafeaa9f2077e60a13e2a7ef044eb3e078c2119d418d390a0036084e7fd9c737
MD5 44326eb380a48a2aa59a35db2ba4f258
BLAKE2b-256 99432ebbe9ea64c3dc925c539af1ffbecd3f71f5fbbdb22a6954be416e1b4e89

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.75.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e0b92ac54c3e7f0e2f735f3a3ab002216fd792e681cadc26a267a3832647c6ae
MD5 4ebf7cae191680aadb73d2a5f68c1e59
BLAKE2b-256 ef8068036260b9f1b369328fc4e22d1147448b34254d2b064de3e4cfd2d95ad3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.75.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.75.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.75.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f594c2935f5caa24c6a8ac78ab6d3b18044739aeaadeaca135ce7063f8984203
MD5 f27453fbd322fce1fc97538200a1df24
BLAKE2b-256 32092dce9562fb7590e7c2b4156bfa6c1a92ef733f658cab5d26ed7f87dfb096

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.75.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 081cd3a462aceaaeeddd7c1b1faa0b9b7f581d435a9565e3ee1fa6aab42bf915
MD5 9241fa764c4004c10f82037c932b2d51
BLAKE2b-256 1a8cef9c7d63fc367de8635de1abb7ae7e683c73a117bd3b5bcfb4dc6aec24f8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.75.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 94d494032cdc679f9086982ecaa79e7267fc4a61c8eeb1dc358f6267fd7e6287
MD5 54ca010b5977d9e2274099e1ea1acf82
BLAKE2b-256 cb3ed07c6458d0371178bbe9738f228dc21c25f221dacb26310709e5aa4a3e21

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.75.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.75.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.75.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d2831a26e0f4d487f8a1649481e5d661374405fd3e115dca977293163ff17f9b
MD5 6b2d232f0bc25f9880d2889b6c1fd49d
BLAKE2b-256 8ffc41a625e5eb81228f5df73f05bc1affa85a04a29666c1a2b2ba7bfc959c46

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.75.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 20422da504ea0ab71ccf0558db48130e9866d2fbbfbb222fda4c81a304897979
MD5 520d4f8b0aa66a99c928c5b0e31cedea
BLAKE2b-256 bfdfa110b0d4bd2d9a6daea3d6fc6037a2d885b5bff991ecc9d7aa457dd7a8b5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.75.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.75.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 fd7d0bb9cab834e3be32401c0fb48b6b3a6d147074f1f90f7f9c4bb23d9ee7f9
MD5 7a18c0d4f4b2f43dedce85cae132856c
BLAKE2b-256 fea2b7a1395d7b93ff236337c0ab45f48627abce3563ab22a54f411bacd612c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.75.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.75.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.75.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6a31204121e7c65d43d06c07a5a00860dd44c40d4fa2f38086eafc180db90942
MD5 9407abefb3949cbf50d75aa6aa62fdd2
BLAKE2b-256 cdf9379de8cf035fc7881407e899f7cc9b0518f31e28144685fe40b127fe5d19

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.75.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 723b2a75617de6fb0ddbaad44995ce4d8cd37c46d0b76f64146f623d99190ce3
MD5 c1b223eede65defa8e35f9529d817f70
BLAKE2b-256 8567cd9ea1dbc5597740145bc5b4906fbeb98ba400aa473e5b35598b458a670f

See more details on using hashes here.

Provenance

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