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.66.7.tar.gz (3.7 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.66.7-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.66.7-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.7-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.66.7-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.66.7-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.7-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.66.7-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.66.7-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.7-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.66.7-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.66.7-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.7-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.66.7-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.66.7-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.7-cp39-cp39-macosx_10_9_universal2.whl (3.5 MB view details)

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

File details

Details for the file openbricks-1.66.7.tar.gz.

File metadata

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

File hashes

Hashes for openbricks-1.66.7.tar.gz
Algorithm Hash digest
SHA256 3dc2c53b987ad2d92f56281a3c6af78b9a9cf96af482f5d4a95147bb1df90a8d
MD5 15db9b48e926b0968267c5ebdefde2bb
BLAKE2b-256 d9bde8fae43b315c3bc7285a103f0d54bcb5a7af5b256a88fb237fb96ca30d4a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8461d8b03469ea3da3ecb9c37295db3c9690445b3d6d943396772cf4829a57db
MD5 8b951517bc97c4972faf18562fb72f03
BLAKE2b-256 c71ee5c0d8c5f3dd14738943767077dca09fbdf2ae5dd35ab1bacf5942883b97

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.7-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c83a437412b0769e33ccbdeaf98987c189675cc0978ac1babfb8ac44f03ec3ef
MD5 f58dd07f1280e21e7af0f49c5b7ceb1b
BLAKE2b-256 ff3688cc33dfb3afd518339a7adb98772e30c8b02baf6a185f782da7fc3f48da

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.7-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 41bcd2168c8d1b63ed49cee3416aad6345c1f7756ee64134a15b4663c12f1ed1
MD5 843ecb66134519256a1883afe4fa5de3
BLAKE2b-256 b91c3d72e4fb06372777f95061651a479a0d0f138444e4024676182c0d1cda52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f31d573d0f8f694fb5f42e4356053e0b3f07b14c1f688c7516de36047c93c189
MD5 cd50323bf863df43e3647214e80a6df4
BLAKE2b-256 923570bb82df2cfa283068fe677c527daccd57a27b1a881d4d50b908780cd8d4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.7-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 791ebb7738286d72af12634f6dc34f8446ad5c77b6607db6318f7f9cf995b83c
MD5 ee6d772f3af9384ee9a94d8886e0fd93
BLAKE2b-256 df1e397771aa99453221b968c941e28f04cdcea41b07fc5eeb76c44689930d90

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.7-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 ea066b5b5774165c902d174b128953609a87cd02b2f8a9b0ba628bafd549b4e4
MD5 6fb88e295ba0571c029ec21967f9b72b
BLAKE2b-256 b3fceb2fd53a5cfbfa800c996e75d851086f68fe228ae7b87f3d19fd2d3e8dda

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 191bb4b0472107c1563948aace3dbdbfdee398c48304d0eb3c94ac114bd5a3de
MD5 59ee5f093e1b205978787c5a393015f4
BLAKE2b-256 99678a972f2730839c64793566c8a8b2651b0ebe4f7c5c2e6b205cc65b1a7417

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.7-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 cfb3bd2ea9f55ba76fda79b19844ac074660b10092a22849e1bb0a4a082342c0
MD5 1273e3aeff8f152269fefda8176aaff7
BLAKE2b-256 cf35aeaf6c55bc8aa38a37dafceb5b3849648cb70f9ea973ce2e15836fa74e25

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.7-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9eaf5d1beb7feefc49585a4c3b8dcc09c77eb96586ba571258762a617a0c35cb
MD5 005de9915f58f3786bf227fb4b2a87ee
BLAKE2b-256 dcf1ef39981b20ba539095ed11436e0b907e8e528bf526268c0c7fe64b1f07e6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b792f62b944d54b365261c13602e7e9abc32b24a6fb6320338d10c09e6864b84
MD5 40a7259ad4e1d4776f417dad8b06d9ac
BLAKE2b-256 09a2c184c721a659fc0ca18d57f2279941b01735c93bfab78321d56020a17c8e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.7-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 776b067f171522610e040c0a17d38c3699bc48e2560a1d10a66c9d67433b88ca
MD5 71cd0394db7c8f2130fe96b4be0c8844
BLAKE2b-256 5e00d47a0dcefef6f2f503f8730e6600ecc7cd59b8f6fbfe4c6903ef75199242

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.7-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a437326b0372349a9073367a024788e97f1f5ead5eb128539b0ba17ec02fdf42
MD5 2f4d3e55491ada3b3405a33e6c629bfd
BLAKE2b-256 bdf6253511f7c381c3aa5c2c2f9384c43673778cdd0f321bc6fcd3c1cb578020

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.66.7-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.66.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 05f53e127f706094a3ee9aeff0195d1c485896f5308b999c38d5e208f3d76896
MD5 54315f8cff1401ccece2a72dbfc0d4c0
BLAKE2b-256 216d4381a0f14b80ada697c7d316376074342c52e857d13fd44efc7c26c0da5c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.7-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 558edbef64f8d72a66f9f44a9e39868631a57fbca9415d20ced24c7b0a7c83b5
MD5 350cf0015202a8a245f37c6fb618e272
BLAKE2b-256 7dbc39b192b2773f250d9f59cc78a4303e6c13735be53a957278a316c6e563f0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.7-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7c7a0dd85d0402d2c285b0d07c63be254d300d87a4d165d4ae8e4969ea3210df
MD5 f2bf5de771fd9fa2a5998494ff877d05
BLAKE2b-256 bb6467c81412d126c6bac4f6d207ac83cdcf6da8a99ae5da1ce1dd26ab00a672

See more details on using hashes here.

Provenance

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