Skip to main content

openbricks — host-side CLI + MuJoCo-backed simulator for the openbricks MicroPython firmware. Flash, list, run, upload, log; ``openbricks sim`` for the physics simulator.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openbricks-0.11.0.tar.gz (17.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-0.11.0-cp313-cp313-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-0.11.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.11.0-cp313-cp313-macosx_10_13_universal2.whl (17.3 MB view details)

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

openbricks-0.11.0-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.11.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.11.0-cp312-cp312-macosx_10_13_universal2.whl (17.3 MB view details)

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

openbricks-0.11.0-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.11.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.11.0-cp311-cp311-macosx_10_9_universal2.whl (17.3 MB view details)

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

openbricks-0.11.0-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.11.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.11.0-cp310-cp310-macosx_10_9_universal2.whl (17.3 MB view details)

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

openbricks-0.11.0-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.11.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.11.0-cp39-cp39-macosx_10_9_universal2.whl (17.3 MB view details)

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

File details

Details for the file openbricks-0.11.0.tar.gz.

File metadata

  • Download URL: openbricks-0.11.0.tar.gz
  • Upload date:
  • Size: 17.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.11.0.tar.gz
Algorithm Hash digest
SHA256 d59d9310d721b876ab277155466841c7c8b72f70fea0e98e49adcbb755f10257
MD5 e4df5bf3ac1ef15b586248b01693ff5a
BLAKE2b-256 a64e61819e73da82b912388163d1fee3f19dd7daf44eaa7b4ebe1d9a36f07243

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.11.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.11.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d7977b7e23488f8a6f276b552d208df70ed384ee23f4f3bfbda4c2fd595c2368
MD5 e4f924266cf51e9cc13b6852d32cb9fe
BLAKE2b-256 755eb430171d6bfabc973599c0f81c430b29bce504f5d6d047cd3fb4ef4b43ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.11.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-0.11.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.11.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f23af8640dbe28bcc08ea928a3aee90c913273acb541a8e26112bfb5ba395be3
MD5 2dafd4233993e739daea94ff876427d0
BLAKE2b-256 3a059cc95045d4db8d6b5dd36b86624dc4ab4bbdb2cd8f343a850bca3aabaa8f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.11.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f5bbc15d806786acc506d090da8192084af950e08de9cdcb91ce8215d312e268
MD5 dc1d96b72258621abf7aa0e07e2b9568
BLAKE2b-256 b5c60a349bf925e1da63ffc96f85c540c5d916a4458a2150fa070654cdd37a5a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.11.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.11.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b74d3b179e4a4dab7448f8e4399f4a4cde8736df53a35ad342ca9e4f6e7891fe
MD5 0dbe80229873e8631700ede4ba3da1c9
BLAKE2b-256 04ddddf2f50841951a3d6fe9c4d3121df7d8edc813e7ba1400b6bfab9254dfae

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.11.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-0.11.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.11.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 50442a07f9b28c688b872411aeff0a05930be9eb87394eb0ebe0d5c11bff6b28
MD5 9ba64c827666783252639da5a30723c7
BLAKE2b-256 ed2a21367f71aad9e6f0f4ff0487f18cb2bab960888d6928181461a53c00b516

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.11.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 1255ae41e34f44ad26066a02720cd2408bd8989fa46c932403bd19c8f9d30810
MD5 869fcd0f570926a2d2208ab6f740d544
BLAKE2b-256 a3ce57cdacaafcc1c449e961a5ae3f59cdea1f4e0038e11aec8c32ba6e49f962

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.11.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.11.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4ebb33bfaf53b7f9e8e4e9f907abe685970d467ab6f1f1de1f45bf14d4525020
MD5 f4bd3c7c27ff0d1fd2047fb8d6b9b0d0
BLAKE2b-256 8e89039c326e46216fdad04d1175c396cf344579f84e3beb858b3c8424f23d44

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.11.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-0.11.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.11.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2ec94f2c8c0389575d0353578c23fe60adb8489dec24645e282a3e09c6f89899
MD5 b4dc21c30ab72c3a6edb853ffa5b4153
BLAKE2b-256 b00435f9b255280195f6da804615962cfdf006b8f7e603257a2a9a5d60b6bb26

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.11.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 345340687c0d1e96e8965fbcb64013424d7fae285aefeaccdf6bbd0fdd54d841
MD5 229b6f6abc7e2b084db2b3efe0e4a831
BLAKE2b-256 6d126c30fb201ec18e56ced34ef0abe83e9e3604997632ff8c545aa89a76d294

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.11.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.11.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ee7a3592804b0799d70def78e9aa671391aa51eda392b0cb88c6032689f09a17
MD5 34e592d7023cc3ff9f7f981cd2b02400
BLAKE2b-256 de104b99a9071c77fdee2d7dea95ea6a15882b89e57d45c26d8f28df35368299

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.11.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-0.11.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.11.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 796abc5e0c86e8379f8e8c32c1a43afc30b4030a8083e8eb4899ae292bb5f9f9
MD5 c445b8ff3f3815808881a0c4e148b06a
BLAKE2b-256 07dbbb17378a1efa83f57424159a8cc1629f985539df8ba79d4eab2fe51b0b2e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.11.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 faaa9f55abc6caae0878efd9d74548055d1efd2c8b35ee0bdb4a64363159f1a3
MD5 071f55b3263097cc9f2b01788db062b4
BLAKE2b-256 e7c376bc57416fc1bc06dcc95ca141b2b96f6d33cfad3d631ba11f71ec9c6a39

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.11.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.11.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7d03f21cf9cb70edc3e436cc81de7216bf9fb847c820045b31629b33ab2dccdf
MD5 67a426cf378315083b2ef2c7f8f879ea
BLAKE2b-256 4512a813141c7587cd591881dbb56d295db58a4d4a74b1b23cb2c727eb23ee9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.11.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-0.11.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.11.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 cbb554517cddbb3ca277a74c18ab6a15727e1f5d74264461339610dabd0bcfde
MD5 cf31ac09ca903e0a04c4b8ed9077ab56
BLAKE2b-256 d1008c05beb9d31b001cb98bcbadfbc32a3398f840d25aa8e1ad771efdef57cd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.11.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c720dcc940dfe26408fdc76a8a3b5d7c1a91879cb036d362dd53a9b99d7f7289
MD5 0f5ea9773fc4651943a07894ebe066d5
BLAKE2b-256 c78e3b6d50e73a0865f7379c8650021c407dc3bdc3b21ad0a90f3c842ef650e9

See more details on using hashes here.

Provenance

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page