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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.61.2-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.61.2-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.61.2.tar.gz.

File metadata

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

File hashes

Hashes for openbricks-1.61.2.tar.gz
Algorithm Hash digest
SHA256 bbeb816269a332c8d0ecf5956756c79271b666eb43c63aa8124399090f6618f5
MD5 7539aa85118d806f8c7713c93309be00
BLAKE2b-256 44c4d407bd197c039ac3b0d49489f716a3619c707dfcf627f73d51c4e720a7c0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c3f161296f4d035e81037841fb461c3391ff3ec8e3a6eda168bb216d3cd5297a
MD5 70378ffd8c034d830ff6340b9c55bd9d
BLAKE2b-256 3243e3beffce097193abecc741cb54d42566a4311527ee7d5f1a85d36eafe579

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.61.2-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.61.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.61.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 809e160b60835cf3d30c4f8cfbed63f29bb92f00c664ba9addb4810e7c062ab2
MD5 2f8b5aa83ad7450bd126c63fdcfff3e7
BLAKE2b-256 7901fa7ce711edbec3069cfb07a35437aa03c59aba98df4312be8319b3d1a4b8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 0e9e7adf642ffdd893416d5b15425b2eaa5b4f57c14eac7193a4d8bb29be6959
MD5 562026672ce66b5918b857e74cbb00ac
BLAKE2b-256 0637d6faf9a933d13db31b08d75a52d88658d62752e2b6319791a29ce4321089

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2b7a153459db77c16b4a52abce5bea1618129b48a16cc87a6e25cd21551ad4f9
MD5 5b1dfbb3d2e7272a708d062a83c6236f
BLAKE2b-256 9d21573fa87c78ae24b95446af7c13e99909c938aec6da2de6f0b86276cf4f2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.61.2-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.61.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.61.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4a58c37045ba3d92bee18731c2b486359a5e7966e27b4130cba4a570f7ff3a4a
MD5 bf4c7b2068c72836c0e626fc11ce5e4c
BLAKE2b-256 8c3b729a1443989ad691f6f4f6b76b85ae4be1080b191c5a7ef0b8824cc89614

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 58781f2c532c080d3e9ec41d41c5e7f7855dc4d27f7025cf1d6b556c97ad33dd
MD5 f8fbb90ad0279eaa749c54741fc1a0dd
BLAKE2b-256 6539ee8929c5e7a7b83e82088035b44a604bda474285dfa80276eca40c0c7260

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 db1a8ecd438bb02a6fbf94120329a2c7574b8a8ece43f45d933509fec924769d
MD5 b4f447715b6d5c93ec3472086b5224b0
BLAKE2b-256 9d0d4a0c3bf053d69fbce296d543b7ae3af60d27ed3bb3a99d84322b34c6ea00

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.61.2-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.61.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.61.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d85ef82a1dffcc2ef82ee1c771d45a6f8d4a767850eaffa30cb7e76360a4035e
MD5 8620a2b02e2c35ac78ac2c349bbe546d
BLAKE2b-256 c47ba8b441e9cfaece400f0b1033b0846adf757fb46694d2d0e308025f0365f3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ca0359dcb868577cbfde26fda167036a00ff2af5e4e0166bcda08e47ff2a23f9
MD5 461468d4d7e1be8ad8aadbab57e2663e
BLAKE2b-256 53db77f0c8403dbfc1e0b7541a1d737f50969099fa3988830a5c7c380ec27888

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 61208cb2ee519b9669a645fb56c9e991fa99d28c65e9c72e0491d7520a2bc944
MD5 59ef4e463e5e053457cb6bbfa77c7d44
BLAKE2b-256 2fc1a211d836520a60df2d65af7ff5f0f59083280f1a061e4ab289484e04f02a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.61.2-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.61.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.61.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5db544d6424708ee6aa5ffe14a2ef04bf8f976aa481fa78bc61a34a38f22ce6c
MD5 94b3c85ada56074a4b77bf9abf757d92
BLAKE2b-256 70d88efe3dffd65c3bc488c0e2ab5c680bd96780407f1525575afcc8d911b3aa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 aeea996bc7f135d85fedf9fddaf54e8889354e6a35beac40d611b52ba7826a3c
MD5 2c1347f6bce1e9d7034d302c9b6afb5e
BLAKE2b-256 fe5d4dbf0d6b3f21781ff0aa37dfdb6c7bcf59060fd9d3b99192fc98153ffd60

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.61.2-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.61.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 801eca3e430898ce5e493f2ce481c939b1e8619989a55c36a20b8f7a5b00e43d
MD5 6243f1452e331dbe308602ec4d7d4e12
BLAKE2b-256 d3605611d5b6b46cf22e966e956099ad771ac575a85180099d9d5d8dfdbbf972

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.61.2-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.61.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.61.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f3418b886912a44c3a05022614dc67df280b1c422976e76db476d4035a3f1dce
MD5 d03dab540a8f553bfb54439629aa67cd
BLAKE2b-256 939b08873abc51f02a670aa0206c7ad9c578f1cea5f6087cac45806bc9aa60cd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8a777288220370a28af0cfc94c0844f2006375dc6c5cbb980cbb87972e7acb24
MD5 a76db06463a64251df1d26ffc9f2e250
BLAKE2b-256 e40384a7acec3680959b3d4e83c9405f273fca324637d46f3761152bfba0e7a9

See more details on using hashes here.

Provenance

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