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

Uploaded CPython 3.13Windows x86-64

openbricks-1.46.0-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.46.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.46.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.46.0-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.46.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.46.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.46.0-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.46.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.46.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.46.0-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.46.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.46.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.46.0-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.46.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.46.0.tar.gz.

File metadata

  • Download URL: openbricks-1.46.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.46.0.tar.gz
Algorithm Hash digest
SHA256 1a2695f80954839adb45ec7b7ae1604f1205ffdd4c75a39a771ae9e74b2be019
MD5 11b6542b2fc70fb116a1e32b6b8ba219
BLAKE2b-256 5e7be236978200d3ea1f56fdc7d71b630dbe63ec2f7cad4cc89926089ac215b1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.46.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3b64d5f466faf1cdb5b1384510feeb8183dab63c0c625a74094d98238bc7560a
MD5 33213861a03d6c46bf94b4202cda5072
BLAKE2b-256 0da137b3022266d09d2d71f57c563d2353f8a463eefcded312f4ee8892ef9c2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.46.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.46.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.46.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 35a546b62dd230ac656729f2ad343f36a62510e6418a6c77ed1c7ef0d65f8aa6
MD5 c6fa6b9bba22cacbb97aae6225b7f497
BLAKE2b-256 2ed0edda620eb58dc0c3f4a373eec1591270c28f62a889e743e0c7304f4e8b61

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.46.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d6ddc167e0ca1621c4ba5c53b5f5537dc90d496275711cb4f6e27304a8c4def3
MD5 012f2eff33dd699ca6f2b2f7bc627771
BLAKE2b-256 2b30eeeb96e5c7159f9279c88c14bf28c880e412dfa789fd7607a48978a90322

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.46.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5ea8ddf15faedbf68e20453d29ea6aafb42534f8d48d280cdf610325bc617ea5
MD5 baa8d2c924004b5409aba90cc5f94109
BLAKE2b-256 23abe74f00268049d3410d27f8ece60d83927ef7c085b60fff90c7657a9da8f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.46.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.46.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.46.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c8965f7ab1176c07a48ca5291e3e79dfc40d3f7ca9d6185c21eec13ab735ada8
MD5 f50b4dc813ce7839e0e7bb6d169c7d56
BLAKE2b-256 74441b4422f51dae7328c3fb7a707686fd161b82c8e6525e2610a5c890fc83b1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.46.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8582383622d8cad2b1fe72e1ccb8af61d40e628a7ad710821c16adce15a9dec8
MD5 260e527434b7a545f080e997688563d2
BLAKE2b-256 4b5df3f88a9dd8e302ca2c44859ae3f2019a2318378f3c36a2f6f85698d1cdbd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.46.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 20cb2b73002df0f20e898d5b2b75d3dd9dadda2555926240fdb8f8f75b9b6b76
MD5 9bce06c63d36f6edd0a788a4a85b6d65
BLAKE2b-256 ef99d19768bf2c7b4e3b415ab09c9e140f2297b977dd05f0373b98ffc1dfff08

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.46.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.46.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.46.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a93fa802f6dd6d8c948bb3c173d92b4efd8d0899e983032c3b2686ae6ac61c6b
MD5 3d359172603dc9cc4337a5444c37653b
BLAKE2b-256 522ffc75c28852267bf546803af386f4a81e9b9ea04fc3259046e2f0ac9ff49a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.46.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 628d19d6fa7d9f2ec7be55873907c1e098c070159965c98196c782c230025e2a
MD5 74561269734ed0d73cb1d6e527fad755
BLAKE2b-256 9a1d0b15aa21b4e1b13bd30fcae863736028404657f25b193bbe6c1a8213f8c7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.46.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 dbc0477c18550429581e47e7307458109f9a627483c871569960faedd1dba543
MD5 fd08d2808f6461458928d4b700870903
BLAKE2b-256 a39e20ebeca2b86fce1b63ff4d45eb7252014c5f324f216da2993b237ea6e0e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.46.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.46.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.46.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 01bd655895843d0ab36d5076c052520b5be88dd23e45bfe95e1c97707a49e084
MD5 584a55c16604c639d4ec73f38ce3699a
BLAKE2b-256 0fdbb42364e29adc21e9c828cbaeafc0fca8a0d3407ba2d314a57c5c9c1d170c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.46.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 67c439aaf7f785aefc189b9022dce319b93af47fdd8fa6013134940d438f33de
MD5 5ed2749803f79681ff5ddb8b4ecfc156
BLAKE2b-256 75a782fa30caa1afcf0b8f0c9ab1e7dd78f9c2ee1f971794638a6820a62c1033

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.46.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.46.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ef0e5d84cd01a90ac35aa2a9913f1d54e2554dfa92cc211e0f937d11c60ce29b
MD5 c2d8d787dc3ba2575ee23561573ef377
BLAKE2b-256 d955090c79b4f4f7118ab828b0a0b97ee38cdd6b916efc821e3119f29a8ce6d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.46.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.46.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.46.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c7d8f4ae4a9b95e5324023f89265ca13d210149fdded3a6971b81baef0a97bb4
MD5 3f9a173ca653bbc0f7e03e117c39f17f
BLAKE2b-256 e4cb46d1ee67a0f0269b98cb734ab7c85b7a0336cfc09177b1b15a460a9dc147

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.46.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a9fb5b701b41f630263b6f2d6ffab1c8c4bbeb1878bb4499b13567b6c7f065dd
MD5 f7b3da886425f7afeafb9a16b88e6a17
BLAKE2b-256 0b472ef624e0eba5bca06129a2057541b82b0c090d3c56f1f964bf62160ae94f

See more details on using hashes here.

Provenance

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