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

Uploaded CPython 3.13Windows x86-64

openbricks-1.29.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.29.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.29.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.29.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.29.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.29.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.29.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.29.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.29.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.29.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.29.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.29.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.29.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.29.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.29.0.tar.gz.

File metadata

  • Download URL: openbricks-1.29.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.29.0.tar.gz
Algorithm Hash digest
SHA256 e4745205be8d1d06685a140999d4c27ceb255520d6021b82a95cd9ad213fb2a9
MD5 52f45aed0da9e23ddea2f0126b84cf18
BLAKE2b-256 bcf2e310472d0d838bb89e5ccf2d1aa01dcf1df7ca0c90665faaeeb88674bd5b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c048707e5a1808a08aa2b6d581ba71ae17490938ba960c1fa7c00c741e3ac755
MD5 f534df50357757b17b775c26a5d32a2c
BLAKE2b-256 535c55a352410782f216e29708dd1e681db4b26b32383d0e2333f4cfd6934e92

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.29.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.29.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.29.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4f1be90fb285602969de737e09b0fd35fc4ae317ce9dddd2eda7a85d862aa679
MD5 d214da2a1b73f9e2b6cb90a6df02aba1
BLAKE2b-256 061d375ee4db8b5359426cc23ced724b06c392365a52fcc638a7bf08cacb0777

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 2694fc10e1491a59e5b084ab5018e7c19d0b451b16bd010b146b9621f6faa77c
MD5 e03c664cce6613e37361ff42c52e38a2
BLAKE2b-256 ada924efe51d1ac8df7d08b230ef06b436f5cba33d0d2fd9ebb48d6cb4623746

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 64fd46076bf447496df75c6c702280cd66f0286f77e4073e67542c5192594ddd
MD5 bb854623470f3ad34d72635453fc5ab0
BLAKE2b-256 cc74f8391aab7c2aaf1fb8687d29531dac650ae5e5c337145e09d57e69c13ea9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.29.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.29.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.29.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e7257977b92c5807c21af73a2e436d2e7fc1d3012947737ed3be9c156a2f2b02
MD5 3effc47bc735313624388a68f790056f
BLAKE2b-256 bc4e4f35c7bba4eccb194608a02613cd66a41531d6d9b14b6545a7d7ca3b3de1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 42314d9d323617173cba3afe012e4912f2a5348e40a3896fba5ceceee0684e03
MD5 459f1fc6b0c1657ae2a9b5716b769b76
BLAKE2b-256 5c1c0d42a571aeb857a1322b73f31da1b0344b6bb0b3ff09d3682db49bf81dd8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 925ea4c55dac59806e2d16560d87d5c93c412a8779de8de4c057176ec5b82c1b
MD5 c678551edf4e17fdaa6727fe1a31cae3
BLAKE2b-256 ad44affcfe8293ec8fb01b647d933b11b52a5859598d44a6f98b996f14f17643

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.29.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.29.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.29.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1f1f3bd30205b7a0090b503ac9f4c4f1cfdfb1c6a4af46a1f20e29285b7c2743
MD5 fbf3567254457918cb2ec5fd029e6be0
BLAKE2b-256 b75c1280bfe6085f7aaef1e2a9c6e80e73cdd868e845e88af70db866b1e24e6e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2e2100bc7e30348852e6e9ac38c296d8d0a7a79c336c14dd4ed9bb46c6e6625b
MD5 03283f8f5b5095aff2ef93119434f171
BLAKE2b-256 9cbe42e93a64d84a58ac323ac76731344da05386335c4f32cf5fe359a2483b94

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e0b637bc92a18c3007262b994fe587c8f3cb64b8ff0baf8187d0c8e141beb11d
MD5 667ab6c0b68a8dc221d08f83bc84d48b
BLAKE2b-256 802c0a162a5bd2764855cbba533ed867fd73056bec8749e639339f7079336d63

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.29.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.29.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.29.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6f93967dba8a69384345798067560b1a204398e76bfbaaa516a05fce597dfea7
MD5 75d42941f8fb7107c114284e301ea79e
BLAKE2b-256 a14f1e0091cc40cf52dafd2020bc1e283de2f80530a8674d7447458abb62c67d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 67f735a3265e3de8fb6533e4681c91a3de416dca047a1858b13027652a91c76c
MD5 258dfb54ff3428345cb189aec4ced5c4
BLAKE2b-256 48c8a26d84d8b9620de00369b809d8486578bf4e14de65985abb06e20471299b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.29.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.29.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6cff4931b3ca73923e76080cf18f732403acc20ce2522ad1ea9502711c64cfc8
MD5 05f0dc09b18c21b8b75b1a3c3adbc96f
BLAKE2b-256 ab096596215ff2fd10957d4612f2d7badf9e29f539745eb987acf9c0f067c71c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.29.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.29.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.29.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 282ca1066920f9a33ca938b8c35bb5af8eb308445649bc4e77f2584f77e4d138
MD5 e68590110f46f3f69dbb7ce23a220445
BLAKE2b-256 b4b118b4291d5361327a9f7aa2d6092b8a6e902135e3a9212fa190d618e061da

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3e0306731b8a1518329a8b62bbe312870570600088a84997a14f0458be2640f5
MD5 9b10f5b451e85d2f88c440d2bb409123
BLAKE2b-256 e1c9496585e62f4b9bb69d75eb7a554eb853b83d50a67002e59d80c3c01cbb87

See more details on using hashes here.

Provenance

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