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

Uploaded CPython 3.13Windows x86-64

openbricks-1.83.4-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.4-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.4-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.83.4-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.4-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.4-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.83.4-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.4-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.4-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.83.4-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.4-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.4-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.83.4-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.4-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.4.tar.gz.

File metadata

  • Download URL: openbricks-1.83.4.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.4.tar.gz
Algorithm Hash digest
SHA256 ef7ca4dbbd483130692bab6751416b7cfdb198e55ba3273c26b5ad069726b425
MD5 4250f8a554888a2a4041e37ffe46237f
BLAKE2b-256 a74c3148c341654165cacd1cc73d20f46405ed22fdfcba8023d07f09af2745cb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 32ebea3948c7c8329d038f8214cfbf3cb445d7bb5f239159754d8cf82ef076fa
MD5 6a5d60b979f105cc9a18ed7efa01c5ca
BLAKE2b-256 3e7b232def9568c463fffecf75a01c839fed04489a3bc9299bcab87b6443d67c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.4-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.4-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.4-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b0edf8fb3816bbba8dee21ecbfa07bb8ca7bc90f40adeff61ff4e422b4e9187e
MD5 0a0546e464dd4b33f8d0749802ea7e67
BLAKE2b-256 185bba4c0308dd33104fa42d8b3f25b3cfb73f594b79a6d760bbbcbb1b5c3941

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.4-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a511fb6361a2ef329807b90232ec02a7b2025bec28effe8dd408f309959312bf
MD5 9f4fd9e48121f6184ba99410ac59cb6e
BLAKE2b-256 39e74c41dc7d18393099fa72a2d2b785e3f5116bbdf2ab041d96460c5743f427

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 cbc64a918a55c7f9e30a1b30809a087adf8aaf10ccdfd23782329689075eee8e
MD5 6658515959fd31f24141a90f7dd51572
BLAKE2b-256 b6008c9cc69994d0468e0e88dfbb5dad0a9edf6f195df35f9faac1899360bc2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.4-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.4-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.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 341c770a4ea91413df24384504c099911d7db555a041ffdc080768f98ef1ad75
MD5 9418033451d902775fe3c95dccb38361
BLAKE2b-256 9538ead312c93c7e6682bdab0f82cc86f7a4b5aaa78e9f9aeebe2125c7bfb3bf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.4-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 92e38f01dbad20d1dcab238d6fb5e946cd896752fb5b014a48aa04e3d04e7c79
MD5 dcfe102644cffbf64cad52c980669dce
BLAKE2b-256 4a8f182095012916cf22158b3d6416630662396dc2672c12df812975c100b54f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0d51483c4448654e570cb6bb9a8e55157ee1f3c168d8855051e7eb390d9c501a
MD5 b1142694420d0a04234b29c07327a55b
BLAKE2b-256 2b712a4d19805edf7fd23143859f9b5bfc5d0eb2ad8ab149cdb2ce380703c143

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.4-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.4-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.4-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 00f7471b4f86343935afc6a281eebad5b04ebbdb559cb794e7d1766cd9a8317f
MD5 48d8014e5c2185ddf9e9e6092a6ca1ea
BLAKE2b-256 abcf2b79602c6b653441554b629c3f15f8eb4aa8526fce7f011642bdda1d56c9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.4-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a378100c5558488b7c4da3b9b6659183b8ec1828adec4f1db7ab412eeb6705b8
MD5 8120bdc43e075fdd3222958e80da59f4
BLAKE2b-256 10f169d94a4d3f28dadd0880f04155e253db9f0d0e94cf94f9bb4796c95c776e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e1bec3b9542f9ff16e6adde560ebe400563870e773a687836de30923b2fdf0c6
MD5 e835c906b1368f5a2eba373b15c991dc
BLAKE2b-256 6674130b4978fae5e4a09c075f49b44d76ca7196d8c5fcc3d9aa1d844cf21622

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.4-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.4-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.4-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8ae13b685734804ded691b46df81d956ceb52c9bdf8d4e72e54d48b6d13117bf
MD5 3758823ebc6b5c1f77fe834152422f44
BLAKE2b-256 ee71a4593f43a1c1319e5effdbfb8cfcaa9afb0ac4af2e80a9e59e542f9ea995

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.4-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1189cdabf1ba1adf2d38f780545ed915434cddad21b9081103f756d0ac37124a
MD5 f818db3c9f9acd629e0a6397cc3a2d77
BLAKE2b-256 4846737caf3ab10494590ffad5fa214431e503bde94c9c5e4d11e69162a28b1d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.83.4-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.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 64a979fe42f8acce2d989cb0356bde5f3ed15058b8d1907726fc54d01ca39e59
MD5 8dfad1b80b7e10a691bfb121f4bee5f9
BLAKE2b-256 ced38460fb440cf286b391a9bd04dd999551eb886e51d06c382b7afa5e2f0bf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.83.4-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.4-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.4-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a7517b0975b1d1fb3166f8fa47ce9252c2475ed9648cbbfc4f6624a3acde1872
MD5 e09cdaf979ff62c01c18b4a78987d94b
BLAKE2b-256 c1dc9833a45b30d86d9781bd46283ca01790efb311695969d6895506ef32ad19

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.83.4-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f4dc36c7a69a017e20bc941a60731a3ed00fb5a31715730f5d3b420c27053329
MD5 341a6bedf1cc6860c790b41e8602f4f7
BLAKE2b-256 d23a922d101dacf39ee2be551fcfeffbf7a8ecf37d2314e3f23fad1a579bb426

See more details on using hashes here.

Provenance

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