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.64.0.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.64.0-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.64.0-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.64.0-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.64.0-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.64.0-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.64.0-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.64.0-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.64.0-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.64.0-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.64.0-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.64.0-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.64.0.tar.gz.

File metadata

  • Download URL: openbricks-1.64.0.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.64.0.tar.gz
Algorithm Hash digest
SHA256 f619618b9f111dbdcfb03495adcaa7a2a1a35c071e13b3b4b10106833dd3801f
MD5 f43b451ba3cddd312909e0774fe943e8
BLAKE2b-256 8357d4e3f9e7f63e4abe28af9ad0c27fcca22e84a84c8cb4ef6e1a9966ffeb73

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9814ddefc430b2b302ac75cea4385786098b2773ceb4f188cd477228e173de58
MD5 22f22e7c8e763dba645d17f8c9463cd7
BLAKE2b-256 0025ab9e20d80f6cd1338599b5ba74904ea5cfa3e747ed1cd3f612e1058b7394

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.64.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.64.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.64.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1091e58fcd1b0fea227678310e931a44f48f487dfeb01cd1044307bd5ee013bf
MD5 1628a5964acb8e9b8b5e2a235d9960a4
BLAKE2b-256 d9285383a058f1f820fc19778722e50f70f2d84b04761e7ca4f6995ced806567

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 3b8b5456e702e450125fed24618b6bd3405af70ba34a2c32e28dff7f40a47ecd
MD5 571803029d9bc7321f5436a6720cb679
BLAKE2b-256 c821daaae247d03e9fd76085b4a9b83d86c1b40281bdd86ab55b0f3c45b3b9a6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d0c3a07890c4f3be0505e29402f2504a8fbdb8b09e40420fc28c0d895c39f182
MD5 8109918876c021d8d012ae1ebfde529a
BLAKE2b-256 8928d0f98819944cffa140073f8fd26424e773ff86ba68916f0a628d65262721

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.64.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.64.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.64.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 38e028b408835b795b251a3d9edfdd110a748c3091f42d21d7cb7f2bcd1bad3d
MD5 fc48bae36b3f82076065afd638ffb810
BLAKE2b-256 7e903fa0c1eaadccc5e127987ea9aab771af08ca884fbf76dfa8400bca92c7a9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 de3dc5d3fa786fc66fec73da0a12ecb274b19fd7cdddce466b0b5084b3fb84c4
MD5 1da5396322dcbaf7a3664eb06a85c354
BLAKE2b-256 7ba405ec92ff996f55076d8d5f0b647df27f6b12a8e13774f368aec4b8555e82

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3749c736186626d43ae675f687291b869977c06efaa11f46df5cef28d40f81d7
MD5 57c566a3dad8b513e3b4ab11a45a5bca
BLAKE2b-256 33284497c0332fed40f6204c13789f02f313e40e391928eb458c2df022fd2ecc

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.64.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.64.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.64.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4f67eedaf4d040b020722a6d7b64b817fb6a3a5084fe3cb57f720ba2e555b0a9
MD5 99a6e788c6b3d68b02f6b277c41963e3
BLAKE2b-256 b6d160643aad82ef25fb040b9e9d808a27695f2e88a2836d9486922db3e3ecc4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ddb25ae197817f0e6e1afd18d4a33ee9a45fe3b5df62e1c0a83a3cc338e51e83
MD5 067869fb471263a2b369e8c2b34932b5
BLAKE2b-256 e74b7d8fd44979740f444f25243fa782639708be1d9f1a4f1330bf87afd181fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ac4067e2bc1cdb66baf7b80af34266dda468f12ab93ad1e7c537d6e56019f7b4
MD5 c1c1ff0438cc520f05188c9d12231f3b
BLAKE2b-256 a0ea2681d17e47147b168458e90e68d073796c28e9756224585dd74ef9f885a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.64.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.64.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.64.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c93dd5b7cd9d1f37732f8e91abb7a83f9f3c1ee725ef9c9a3549e0fec5147c79
MD5 08469209fb1bd684899dacb36a6f75e2
BLAKE2b-256 a902f540479f964c4ac87ba87a7adb2e3a35998b524976647a8a7664870cfb42

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 226d0dddec29ffd84be0349762c4b7ae0626c92fc1a7d9a7421450f93f5672ec
MD5 ad07229e7ba07626e8eeb5f2b0628458
BLAKE2b-256 e3744e56a3d99dfea129857e872a111fffca910f1523e5a62712ae09b7802bba

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.64.0-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.64.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 890a0573fd8d2adf2dccca3376947644f684923c0bfa33786bb21211c5f9e76e
MD5 59026be99adbc9497a0498444cb5f750
BLAKE2b-256 2f80c00a68670f40df5314dd86849fe335be57f660af4276473a6c9653aa1f8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.64.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.64.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.64.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d46d70ee5333c3d405fb3e64d011c3159c0bc24e84d8b89f9da66a242d423153
MD5 0a9eee0fc8a5651d0e790f1a75cccb85
BLAKE2b-256 0ec68b47def9456b2eaa9953e55aacbe2e5b240fba4d37f28612bc0eaa4e664f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cdc423dbb328684a1c7716a26655fd8c12b77dc124371588432eca5eb71a1131
MD5 cc7faf2b70675d875fbb196f8011d3d5
BLAKE2b-256 b25701470b8bce3bf61af4807d1b34d0893421cf1720352a045a483e2d49df19

See more details on using hashes here.

Provenance

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