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

Uploaded CPython 3.13Windows x86-64

openbricks-1.91.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

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

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.91.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

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

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.91.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

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

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.91.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.91.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.91.0-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.91.0.tar.gz.

File metadata

  • Download URL: openbricks-1.91.0.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.91.0.tar.gz
Algorithm Hash digest
SHA256 f18ccc5ac166dfda71763c641c950e034a33b8cdc40dc3db1ac9b1bb3cdc18bf
MD5 e6f39ddcaf5fd0c19c6c3de16efebe29
BLAKE2b-256 edfb8e3992156ded957391c21053fcd1085f4119382ac1849870f980d95a0e7d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 49223ed96626a6d1914e5faa80162f4443073e919dab665fe1729dc0be3d38eb
MD5 227a203b09e853a39c6a6aecf59e835c
BLAKE2b-256 41a93e114b5c4559a0b3b78c1b234eb8a909dda71d8c4aa830ddb8c8a9146ca9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.91.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.91.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.91.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 aefe6c54667b85e068a2a28c59458c6fd2d9364c7282ccceac2aace85015a268
MD5 c88eaca8e40dca837f49f71be7ef66f0
BLAKE2b-256 180fd96590a46797e71d8d27b4090ede8c4413990605c16fe1f6ff9a76ef7a75

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f2a4af270a1e19c5ff548ba7fd17cd917ab376a1bec74886dc1e3606f43aa075
MD5 29b388c9f2d718170e63f52fa713b9ff
BLAKE2b-256 67cfd401145241798ed97a1a0678d8925e78358b33820d5eb3d8536dab200a83

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fac0a8b80b4e927046b74ddcaa8d4cf89a9dec83a9266a31751ddddf90adccc8
MD5 9efa9387cca6f55e624ca72206a9aa86
BLAKE2b-256 e87db11db7b4ca655bb49ea410a482fe703cbda9ba141e83a216702d5878628c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.91.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.91.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.91.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 718c7885fb2808145d985a2e5595bd8e6ccc56a1e1ff54cbaad23cbbb3e73cae
MD5 31cd70d23b184ccba4deeed0d63afe99
BLAKE2b-256 0cf210bcf8cbe5ca43c7bc86c757b67a84757cf84e1d9bd795f623c52c66b978

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f3e1355502a6bd64b80f0d7b7222871d4b3df69e7c7e18b3340588cf6cb5c2ba
MD5 f6baa29c78636c50985dc7d08f810bc3
BLAKE2b-256 a18866b94b58a52ee6c60b3c6d4b2d36081ad6641363d499b5d07345d2eafd22

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e2755dc6afad07a45e1b9f0bdd1cfdf9df5ccaba2897ad062545fe77f9ecd967
MD5 99c72f9810b2801a1671c107102eab16
BLAKE2b-256 f5114826bf46b86aa3f4cb4f55335183c61e3ddb3cf02070871a72d5a45716ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.91.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.91.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.91.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b8ce05c0b5f25cac1ec8ef0ae37ed8079da94457b10878a204a687a238598781
MD5 19666f759f7f9253643fd5c853b7723a
BLAKE2b-256 b48c30dc0d0370641d8964d79872da586071ec32803a9e56482f72f7675a96a3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 daa6311bf84dbefe99b910beb4ec46a50f66124f5b57c02ede143f23c2eff2a4
MD5 1c8c36963d9911ac857c63b6dbfdf886
BLAKE2b-256 31b9266b70fb7866a4120b6a77a39d1017f672d39499212da5d643f5ddfa8a8d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c87f6d749218e75cf2f99a603d17e06ecc6e6d9677ac736985eb746a9ca0bfce
MD5 cb85f8e7c64cd915c4e0fdb79c47b45b
BLAKE2b-256 044f814e6835084f0f502a3852e71e3b27eed23616708c252d177fd0a794dff1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.91.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.91.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.91.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 377d198629ab8becf6a5244c25f987987164bdbbcee51969ee38551743d11349
MD5 8ce5962cd532d6c55a94d6b89f33c360
BLAKE2b-256 9f0522d2a87a7dd00a3ad5f9495e501860d95e402ff2c840b8680639df38e7e6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4a44c9e56be569743117c92b7de884c5057f251bf4aad6c92b0a53b55f1716e8
MD5 02e5408d08ad533be9f7445839b5d04d
BLAKE2b-256 80db58da39df28d7302297e51816d943ace6da7ca2fcc5bb4528226beca15cb5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.91.0-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.91.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 316ff3b537c0583eff4e38fff2de218e5752f5fc6807f55bf3fe3c28f74a9529
MD5 46c6ec90c987b9005265546d015be9fd
BLAKE2b-256 2a22a184ed307fd6116ac88c0a382033ec7c347598022feb94d3216fcf3c9193

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.91.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.91.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.91.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c35a2c5fa391dbe4480f851d99c0f30edbe3658a5699cf5cb0e2b306bc3af52c
MD5 98ef57cff34d66591578665e92dfa3f7
BLAKE2b-256 afcc676fd3c269967b336108d1b38e0e84a25b9e8d786b22cb6d4d7e7cd8bfce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7cc90af757931e87e281833385a995392eec2b1ab266348457d091dbd571d444
MD5 9c8fd3d0537ad224a078995f715a3977
BLAKE2b-256 a5d82e422fba363b0a90d9871c550e2dff05124220890785d9c70a3b1a3af9c7

See more details on using hashes here.

Provenance

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