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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.43.1-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.43.1-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.43.1.tar.gz.

File metadata

  • Download URL: openbricks-1.43.1.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.43.1.tar.gz
Algorithm Hash digest
SHA256 14a981ed831e7590b5528ee6f8aa3201639b5f9021994fac106044e2791a5929
MD5 f8642abac612510a4c0590c4f8027118
BLAKE2b-256 d9c4117f9604e802bb3e52f0a8c3c5c804d98597653dac058b4f139df5088b36

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8e0fcd99ccc41be0b0ffe24e7e70590b33daff061df8750332e7247249239c27
MD5 79a51c60b75e033f0061ae78614b2293
BLAKE2b-256 048d767b048b7f4f611ad6b7a41fbd3aeda34e320e56e8e61f9858eec4b45a64

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 78c2ea451b424ec147e41324aba8a145f9d2f38c298a2c3a7df581acf86fc27c
MD5 4002688d605f7bfcc8d55ad2daae01d0
BLAKE2b-256 df11d7411057cbf5d8e141a2f8477710c6422c8be98fe72f44a9d40197595ff4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 b3d43bcfcfdf0236e52499638fed58537e5b9a40de0d65d158c96344b1fc9726
MD5 3181e446e11121f330ac7982e467549c
BLAKE2b-256 34728944cf2dbcbf508eda8344937b17f6d58e0a03a986050a29d893dfc9b34c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e38c7b6a4e15596e421b8a7c1fd2770716090ce2848f4529a55866c55f05b098
MD5 217b674c5a1f93a7adb1c46333449294
BLAKE2b-256 96dbc09f5ad01a7d5554673a345b00c969c6842446aac1ca8039dc9aa2488d4d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6e8650877130a1f1d5ce38a83edc9f650869fd05cd7210e77f1aa473b9f21e54
MD5 cba9568a086017f0cd65caefb8519ea4
BLAKE2b-256 87ede19d7f911e914e7f5a7a9a8b6b38f80d3630714ade264cc98235d4a79abf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 9d38e7ba922b47b1dd674401f3c64e3c8f646581929274d7786ddf3ed72f99a6
MD5 e5604c62554d4e3bf825c05db42ca7c9
BLAKE2b-256 9c9b72d9068e3d265e6a58653cf4de0c03b0d0de78e97ef5a8852e3a2ade4aa0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f0040d776f80ac879e72e3b4de8f462f61297929b21c3e888bf652dd0095b146
MD5 2eebc5b96aec2edaf374203eadb76b19
BLAKE2b-256 e301423eb1cf04e071061dc492dc7e30ecec1b6b33a5617ab91692b83394a290

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 be8d1171f49470e0f51b05ab43df4ba1773d422acf7cc7e336f670a3a78da0d3
MD5 2de1741de9013f8c3d550c3b8128720b
BLAKE2b-256 24c3f54cc2e60c8cedd622320f29d4cef54cd599b5e132d7f614156e8ffb5068

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cb0d270ad38a238902910dda344529720ab6ee5432f909a40fde2bb22594fa7b
MD5 064751f390cd633043f46cae9d9f5be4
BLAKE2b-256 9381643834d36905646cefcf5f89a9f35bf785b71024c38e0c28acda84f185f8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b14330fc9ceaae1a847447202f78ccb20fae63477e3729502a59dc555e20dc41
MD5 a7ebc72a956fdf6e8b812f382c05f3f3
BLAKE2b-256 f5bd84c30794f29d4897317f2498eb154823b949d7dd4893b1b26941457fc9e8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1d975623bc2002b980395b9b2639178b0aefddff621acc9e6571baab6c84e09c
MD5 a55bec3c852d9aed02632a71aceb7b28
BLAKE2b-256 409cc5bf52487dda13ebc354b0fd31cd74bf05bc90df59eb3ceb3b7b629ed5ae

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7dcd40efc12aa54d1c00c416536c62c984e3e41a3acd6d6b569e85251bcee18b
MD5 70fd5f9399550ecd266037dd2e09fb02
BLAKE2b-256 7686ae99a8009d2e00cbb5be2f1b0a0d45f94acdbce02e573d9c904419f53ace

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.43.1-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.43.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a961869332b231458ca1112d8f125eb680266f955d23c4dd51a6a8d2669e56e3
MD5 f35ff7af6182e94c064c517233cbc91c
BLAKE2b-256 f84f21ed54c4e85e39aca6f0793dadad7c3882e96f813677f58811ef249caac8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e6e109ff8eaeb4c49e5af3265d022296ec8ee2a774b25384004a2db093f5b4d4
MD5 f903cbae92636fa03131b68fcdcfbfa3
BLAKE2b-256 5dcb295d764855123f3601eaf5f19334e92cd3aed233c7910d11a933d9343ef4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2c0500a3c651b632c04f0615d4b96514d83abe6d96d5690472b92181e858fff8
MD5 82998cf4dcb1090d04ae9631c1316b0c
BLAKE2b-256 ab11aa6715164b68319ea75bb0bc28bacad3c57dcfefbd5bfa67d1a7ffd049ba

See more details on using hashes here.

Provenance

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