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

Uploaded CPython 3.13Windows x86-64

openbricks-1.34.0-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.34.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.34.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.34.0-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.34.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.34.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.34.0-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.34.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.34.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.34.0-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.34.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.34.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.34.0-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.34.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.34.0.tar.gz.

File metadata

  • Download URL: openbricks-1.34.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.34.0.tar.gz
Algorithm Hash digest
SHA256 7c9af89afeeedb27016d0741b497716d6e2e60c3074b612ed82350adaca65e1f
MD5 d35a9ea8cc2b1c0a9883b220946dccc5
BLAKE2b-256 a15ae5f6ddebd187957a9c3965152482f2a8a8c8c424c4aab0dbcd15dc466e3a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d62825d9d744c32115837d63ea5e2512cc5dd1045568fc13565fe6ffa503a4d0
MD5 53ba86269bbfe495a23975f3062cadd2
BLAKE2b-256 59c88d6d1c99c3b96d88ef83882bcbffdcb068e07ccf0b7bd132340218b39ccc

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.34.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.34.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.34.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 822fe4df81ce35f2458551a1033d87a91a1c964f9e7bcee18eceb46de3f275d1
MD5 19afeaaf7aa230ca2f2699d7a7e77b7d
BLAKE2b-256 3342e18b43c5a9a4ab222432088afcb5efb789787db90e488c93e492d44419cb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 186c472f5a72e272c17f8661ccdf2854910a1ccfac63c757129578613b10f185
MD5 522fdc80a5f797c013444dacfae8c28f
BLAKE2b-256 d42dbe3623a97c9d1a9f71d892b28710b2f2107c19a7f082c54a7ca11acc525e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1a542e5109085d52f4156ed7c48aed5b56c74ba23c1b865cf7448733504f844b
MD5 948a28d8d80e063ffaba2504c66040ac
BLAKE2b-256 f15b6749952624f8d8963ff8a421a2be9e45d438df752808746046e5377e3e31

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.34.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.34.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.34.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 71a6987909ae9a42008bbde329d6737ddac22eed1d7f08722a41d38b2ffb9c58
MD5 fa730338d3286d9455f2afbceb190443
BLAKE2b-256 d2f6249027c02d49380b88a49bc1ff38f9c81cccd96d1bcf639e9a2c6b805b55

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 af9ff9f7c13b3ef21828be03c867cd7a23135cfdd4ceda503f6c19860d46cdd5
MD5 bfffc834ad13507ef10552c013824165
BLAKE2b-256 f8ef395990cfff96aadf807b8e14881a4344f3e2e7bdcf4267fba535046bb430

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 573c39bed350c68eb301dddeb7439386967c039d4478de11336a1437525945b2
MD5 a101c7c367104e7eec0cc320ffaaafa1
BLAKE2b-256 3e2a331efdd02aced96f2023f12c2b7ccb2bee65b49467869f47092895d56a47

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.34.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.34.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.34.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 24d4d7237992828b635c1fb708cf94d2d733f81d3f17fc6f9fdd0c4a3fe30147
MD5 567aff7f8852f1a898e54f64438e24f6
BLAKE2b-256 29753022007be9e48bbacbe561cac1fb25dc29aed6ce7a6d27fec0a0485a5da9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 92c84350434eed650f84a757a34c0043e31132f2fd67b1361c29a24e512cc929
MD5 42cc0e460c76916e3f85dae202cbc863
BLAKE2b-256 0fa671ee99905e2fce0bec4b18976997a8f625aa1cca2c147126275bc1921ea0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9d732a2e3a0afb83f2d3202cf882872cf164bf574f9847f811cb062dce796757
MD5 365a027125959e7936ff595ed8f99622
BLAKE2b-256 b96b4c92cf6b79dceb8eed0ac33da062df0e67fcb05b64b9ea0b2e05dbd8306d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.34.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.34.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.34.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 32a9eec2a09046378d223802705d52e2becc7f96c10112026313b14315f396dc
MD5 ee4ff737e1461339333f628efbf48a22
BLAKE2b-256 9bf6e890e6fd33c9d5254168dc72966ca384afd208549e7728a0060abd285ab3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9143d0c3383105f0d01d0c7319b793a55162a2d4c34736657a4ba8d8c4f1884e
MD5 f604bc1ffd38744a0e852db1030695ea
BLAKE2b-256 50db464e9fa674cd6ae0c6411be3db2f5f32cb444876f8cd08e5d26e3f858e21

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.34.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.34.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3d2a9f17f3052cfcc0a2b6ac4f87c75c43a7c6302082f6b7879e4410e001fa09
MD5 36845e5ab7ada41c84a91301229d2756
BLAKE2b-256 99dfafdddef60fd140e52ff15d7fa6c1eef8f06c171a30beecf955ed0f46cc39

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.34.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.34.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.34.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 46d27804d7e1627be906be1f9a19ddb2109c8a5521722e8dbcbe21bb2e9e3b2e
MD5 36825502c4aaac717692e2b05109aa86
BLAKE2b-256 20e78d2b80383e6e8b80986482d6dfb845cb8fbcee0f49a9efe696f64f8f5341

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1834f4254af1235512ba1cf739488f7e73844431966dca6a1c4ab9d44e556b19
MD5 34ab420979c5fcf3a6539996858fcf70
BLAKE2b-256 0d02df40c1130b2cf6068800c1c46cdad4cfc02da544c32a0724ba8942dfda2a

See more details on using hashes here.

Provenance

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