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

Uploaded CPython 3.13Windows x86-64

openbricks-1.49.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.49.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.49.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.49.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.49.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.49.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.49.1.tar.gz.

File metadata

  • Download URL: openbricks-1.49.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.49.1.tar.gz
Algorithm Hash digest
SHA256 7c283248f8eb1190ccdc237f9ce3052cb69de0334eeab36639cfb0d676fce0d9
MD5 abf4d665f8ae0f56b5a9a59a80cb1110
BLAKE2b-256 a207ae7a65e110185f451dc3f0c8c9fb26649abe33d088ba89cbf157a7c44578

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c149417e8a6711286429cc61a0e4738029ec332001155ecce97951af78f8fe64
MD5 eda847413f6eef44371551597a9cba55
BLAKE2b-256 283b6594b240a22539826f2f5573ae7c948b1abf3363c99b99fdddac40e40d8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.49.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.49.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.49.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 70e433d80ecf98b9d4052a2a5be051b04e74454d3a97e500720b6d681dcd3380
MD5 d540722ce0df47c1eb7ef2c389909168
BLAKE2b-256 c606a6fc109c8c72f20c55eeb00f6ad05ad1f1b636446e645652e774abffb995

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 38e36b8f282af6c112cf44f7c2939350cac1e8eea8769cb53d8815b85366c5f7
MD5 bb0a39ba218633a613ee13375eda792a
BLAKE2b-256 4e3e7fe12bfc99661832e02d60ba8585f86b05b1a094064cac766eaacbc4e459

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 90d395cc192611d62c166010abaa1afe26844fb679c3ec41b23ccb5df5ff3a39
MD5 f740a733bee7d853aade51832918f6ab
BLAKE2b-256 21f2343909289f7e46877a4c769ec56a85a94254be2557e4de246fb3821267b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.49.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.49.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.49.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f3ad405ae6686cfa7ab7c958dc73fa9d62adc04c4d788605015533c279645cb8
MD5 96a2107e127b0a25981e2946d9cb1217
BLAKE2b-256 b1a9a5be0707e7627e3d059d983f18bec1dd21b2dbdcc1cfbc3aad200ad1879b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 1d31e1172b3019402b803390dc6ba731b845aef56cc3756d1a79a61bf34d01aa
MD5 64b47d7da0fbd865055e217fc8fe1373
BLAKE2b-256 cbbddffdcf250f417b40e5a1a25892ef368ad80ecf5ee41022b3a4c3bfef383f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 606776288d01f3f39a4864eb056d93288be9e38533b350d09d247e584486ee95
MD5 d4b1e5dd196f6d3288709c1ef916efe8
BLAKE2b-256 46706d6ab995c8826467fbd0db4249a2170bf36c9740b35e519d66f471967c4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.49.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.49.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.49.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 531572e5cbe5053129fe8af23ec9173953bfb23da972a4f82f5177a06d457706
MD5 9b96b4c32db3fdce3d95fa41645af7de
BLAKE2b-256 3d250e1a56ff37b05d0ecf9d461c3a486a5661bd95ab02826ef4fbeabb3932a1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 31ba3d0b03a65997447844de85526f89edfeaabf29473edff9407c4b238da6fc
MD5 c6f6e452889b3faa078e5ac986e1b087
BLAKE2b-256 d5979df8b655a072611d5dd9adf8bf740de6bcd9753f5a787ba5586acb438ca5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 03d6a2056707fc0934149a98b38980ab291f9273c7b4ed75e144377652ab972b
MD5 3c53e50fb182344307167c03229b723c
BLAKE2b-256 80c13dbc63e7f29bc2dd71ec34eab3ce015741b8564c426fcbe0ce3bcce2203a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.49.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.49.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.49.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 17e1e082a56035511110ae28514eff38964b9c8d55aafa05c345d73f2e9de00d
MD5 dda536b6b7e2a26a1bbff7902a4a9a4e
BLAKE2b-256 4ce23f186ccd75a11e05fda52019ce880be7538cb7d420d5997b6e96bd6ad9d0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2407362545636b237b8863422ea0aa76cd9b00a6f0c494913e395026f3f9ba2b
MD5 eb2bea33659a27a17bc9fa5a04963938
BLAKE2b-256 6e14cfcc53448c164eb43da27004e1126af1a100f8be9b94f319317e1ba95f21

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.49.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.49.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 12273311d3f484b489769c4be90d5c3cd9e987aab07278f4a39a1ca6bb4c5df4
MD5 99acce85f3d1f92e341dd26588ba6938
BLAKE2b-256 1c623fce1afec1bc30a98aa6bff16e7a7895ce1d3d400e998b98b0133302ee01

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.49.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.49.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.49.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4f4b575bddc596fd031cc043ab5bd1fd573b0f53c14dd9bfb842b5a8da110bd7
MD5 fd7f163cbac90255e459ccd65238a5d1
BLAKE2b-256 1a5d4b3241d82008358bae7d0c67fb5db373f1241c1cbd743c23020c3f81ae29

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.49.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b53c1b499b53749637c29ad170b4a49eb27a6e333953d4b3eb9c1d50097ed7f3
MD5 db95b83cc7ca0758d3cef7e7a832a511
BLAKE2b-256 410f1834c3052279a15e617dd637b86b73f96ca9743df4427ddef67057f7e5f0

See more details on using hashes here.

Provenance

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