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.83.1.tar.gz (3.8 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.83.1-cp313-cp313-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.83.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.83.1-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.83.1-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.83.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.83.1-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.83.1-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.83.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.83.1-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.83.1-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.83.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.83.1-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.83.1-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.83.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.83.1-cp39-cp39-macosx_10_9_universal2.whl (3.6 MB view details)

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

File details

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

File metadata

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

File hashes

Hashes for openbricks-1.83.1.tar.gz
Algorithm Hash digest
SHA256 8519d581f786bdee8b0541917777403919025d4bdd991b77b70eb1e679cf5a28
MD5 0490754dac790568ffda35cf6b2fd8e3
BLAKE2b-256 6faf9c8a34b6d6310fa9fea491a84d8a2cbf4c18417318d78cafe3738aa7230f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1320de47d2ce8af613c15e2fb66fca69716cd5762cfcd20a0f5cb8d2e37d2ce9
MD5 8fd4dfb0e8e7d448573e15576fd4a7f4
BLAKE2b-256 56133957d5bf844749267269bf441d3c4a9b846e5ad8a87fd5927af8b63c8179

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.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.83.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.83.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 647e65b3829474f0b5b75ec4fc3c9454ed7010b849ba7900809311e9c8d7b4e5
MD5 0e14555b9604615597765f489fa9d53d
BLAKE2b-256 88e0ecef719273fdb9228d155df99d5af63f44e143530e642e121fdcc2c7445b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 327cc8dc1a6a46f215e2a7e127c6d40b8b0a724d62c228dda3ae758c8c0d900b
MD5 c60c1cd5649f46a6a2dc81da36acb651
BLAKE2b-256 a0f52a50e1ac0b5228ad6c2b032cb92fd9c4bb4b56e5c308f0faae1cbc90badc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1c4113754c3311aca804aec3f37177e30332d6d9a0a878591d5536a931de41dc
MD5 0a4d7821a9115e954a99db7c09bb641e
BLAKE2b-256 c76676600f4a9b99bf86c6a2b3f06da696ba496da004f7b8494e4c805b16b4fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.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.83.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.83.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c7c08c3f8dd1a01b08057d040910704822495c407488660f534a98a4504cd8fe
MD5 908f451280e5160d2878733ced6a7873
BLAKE2b-256 87fce470d45eca2c6ade8bca7d70619e385aa7bd977bf178fa740e8d9b81c118

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 13311dcc9dd242cc104f7b3d61bb82334d1d2b025f0be69f7ec173a6c8024728
MD5 e155dc6897de7435f13c8febf6151a10
BLAKE2b-256 db5bd5678085e68594405c05bfbf44d6dddee2441dc4223485f8b48aa1d70a8b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f2d6a19665215002f0c0b0ee10fe7aecb9720a56367afd219bade6469e6f4288
MD5 e6a6199ccf30c879d60c66ec5641a7db
BLAKE2b-256 fa83c074e0c81eabe58e89c4ddb5267361a793a7f4ca255ded2842ea8476889d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.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.83.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.83.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 34287096885f9be03331dffd0b807ca09963ce8a72fbe2a50d0e79748d7c75f4
MD5 1c559a8140e9205efe361ea4c9e6896b
BLAKE2b-256 ae9b45af88d5cf1524f3d5ee5a1225ce8c3c15ad2e2485212b02f3bc3cc67308

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 fe881782d5a4f5009e194cc8c307a7821fd03039c94846d5db160fde427dffc8
MD5 8ddcc1764f27e007c100adb6625dacbc
BLAKE2b-256 beb20001290e316d24c1472730a9f4effd21e9f98a225f8f23e9df509779a172

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 970dfa99a7762876c89052b35f7b7017df2db51506a621189a6976627b8eef3a
MD5 5780ad7595c1d5d7ae13a20afe259258
BLAKE2b-256 1ed81f7c89c25fd29f8f40fc8678f307d3467c0daa9b95859d8090685551773e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.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.83.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.83.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f03bbba01378fc50b4a00c8fe729ae30a8c456a1ad1b97a9de51a4942249e134
MD5 48d274c4506db52409c26890a8d4c3b6
BLAKE2b-256 1588e602d0421639a3e57e4f7ae6ae57d4d9108394a30edf0371fea06657a694

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 416b716835922aa1d3c23cdcf963f4363e58b552f3b7cd3f31fdc161b172f827
MD5 e8bb049f26e2714d76a1f9787f8a76ab
BLAKE2b-256 55fef75deb217ef4caba54f0231968e4de034392d2301e00877055c84568b559

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.83.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.6 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.83.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7c9ad079455daa5a548ea9c566ea4d0111c0897c7fb5d902299dd010c033885c
MD5 e9c1a9df2a80e7483dd4586b20d4854d
BLAKE2b-256 cf911e2682c6e93bb5999b66bffadc9a186b81018a67c03554e6763481b97ff9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.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.83.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.83.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4fb3283fbff3f24a38a26734796f2a95f28e1be9e5811ffe621786d8f01afdde
MD5 72bc6ba5a8e7062bd7341839311e441f
BLAKE2b-256 bcee345e48ed97664a31d780d0a41699e08717802bd46785e21b7e5bce3bb560

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 16a86eff81a9720d459a658038f5047100377024273400dadd5e7f772287bb90
MD5 69b0ef000b478b4d7a50f44fd3e3a730
BLAKE2b-256 ca0bd4aeeb3d8b3e2cff74eb9aee8ce2d38b88ae5d75df7d9bdb75e305cdb044

See more details on using hashes here.

Provenance

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