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

Uploaded CPython 3.13Windows x86-64

openbricks-1.51.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.51.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.51.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.51.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.51.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.51.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.51.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.51.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.51.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.51.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.51.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.51.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.51.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.51.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.51.0.tar.gz.

File metadata

  • Download URL: openbricks-1.51.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.51.0.tar.gz
Algorithm Hash digest
SHA256 814df2757585b0748d368512fb7682a13e314e3f82d7ddc0b474b51aae7cbdef
MD5 2e52fe53f22345908fdd58bad4728ced
BLAKE2b-256 1bb6b5ede97d9d61f3fcd55fda92a8c926110683d169e780e0ef7d3b4812e6f9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.51.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 51ef9aeacd69b48cf5e81bef645ab2335e5bdbbdfd1352c99669dbec9bd5f8c1
MD5 c52af9f9bea85998608623df48a46182
BLAKE2b-256 26b918faee2cb3ee078126dc0b47370e0c4f441432d52b40da273639e920b7dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.51.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.51.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.51.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 acaff60f85c637b0483c09640fb6c2f53dd8cf2f01cefec147d622bb6a71251d
MD5 a27965c6bc6a983af4e55bcc276dc91f
BLAKE2b-256 a8a1769efc7504456d62d69df5cd74f1784e5a4778e93e533e00e75c21230901

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.51.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e727a22e6bd96979c17a19f3a01cc51d24ebd5f258c8a3efcfb898507af19be2
MD5 f831179f51d5ce06e1b76d4f54ca3243
BLAKE2b-256 b8b0fb7a944a9d4ba4fd4514c64a150af2ecd0a5854ddb84f7b0511ff200571f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.51.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 85978a9767537095ce29aa6c8d2443e5c836316dcfa82f0cd93757d2ede9c4f3
MD5 6417b5e5c194726b1a95b1d5daea6f33
BLAKE2b-256 b44a5685263104e748003ed93d5835648686b2f70e0b8195cf6c1a74e34c7c42

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.51.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.51.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.51.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b1a44207f11f605fcacc8cdf7c163812fb96e0b28505bc1ad8228660f7a07c2c
MD5 03d3cb222d05bf3a1d3418b6ac74f589
BLAKE2b-256 306c8732e7d798629a1cb313d470c592c1fc169e7502fee542a2ac884e882443

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.51.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 70738a35f9f506b3c180f12de493281d1eab558bb92921a4da22e61b3ef2ca71
MD5 6d3f105163d77834a956e0dd512b8626
BLAKE2b-256 a32f188fe9b3a7b38b510cb00e5a59f234c6e4c8a93970c6f7570010f62374ad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.51.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 aa2574cc8e1458de0028aa84a1211318a5c804e32931e607f755f7788533cbb6
MD5 b8e44c24d3e324ce20761bbd40173508
BLAKE2b-256 350aeae6a324eb8bd17782978664bf97a950cc497ec878061f29799c7b4f31f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.51.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.51.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.51.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ddcc0380744e20c7609f53fd3aa2713d8f031fc2f08cdf1fb637cf9c036c9a02
MD5 23bd1e3b745de8f996d13fafadfa8486
BLAKE2b-256 16d14bb218f669ca04c8b8ee9a805846380b4a0323c5087f19c16c70b7b80920

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.51.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4da25fdbf145adb59b86b28e3a2e49862642b27d0f2350301989e170889b73dc
MD5 a0a53ba958855d844733e5a99b79b6c7
BLAKE2b-256 77f87e4fbd91492776e37076957bfbf7ed3674606018753f9fad56e6c36ff195

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.51.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 815d2b984e53784cad4df73c2e5664aee84096265723557bcdba694914410c70
MD5 ec4580f7cd0a4597745d91fba7a01602
BLAKE2b-256 0135997d31c2fbd864e3a75beb1ad21b02a3a80da4a0a74b2e33f0ebbc3a44c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.51.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.51.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.51.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5c4b36249457fe76988b494c70ab8ec39bf3a6230757fb2f515ee69a0cdc6abf
MD5 2e4542199f9161c54809bc55984ca538
BLAKE2b-256 6f0650609e9371bdf7c4c7e938b870e41c5ad14aca5182769c506abc46303524

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.51.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a3ce301dd9fc796e7cfa29a9629b1a2faf70e69d1bfaadf8e2a57f42a8fd51cd
MD5 1c79c1ab4bab1537836c8f9608d090c4
BLAKE2b-256 2da00af13ef5c07c01e05ff20a232e59b1627e60d122ec8a4e8fe26f8fe46b55

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.51.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.51.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6af34e334b073672b8fa2f56434579c7ef63fdfd54caf20780846e3a7efbea43
MD5 7aa592f63008131452d812f44885d590
BLAKE2b-256 5ae9df5cb2fd12f6a219373d315391aae9455a2c6fd3c3466de445b77e0dfcb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.51.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.51.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.51.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ad5758385103c57adf16eb7bc3ace2ca1ec18bd7e960c2dac4cc94d3e6e65128
MD5 592184ab5e412570cb536ad2de857b11
BLAKE2b-256 cee56782970a0fac2065f733edd84323e0b7a19fcd7b3f405ea3d52f1077e8fa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.51.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3717e77112080aaac51819d9bdb4b5eee8bed9f5633abf7b6208341a19184f4a
MD5 c5d927bcef9fe8c4fa8cec327994b57a
BLAKE2b-256 05ffbec61632a9868bce808d7838212b2703fbddf7a02d9e1422ce4c9b662784

See more details on using hashes here.

Provenance

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