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.

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 (0.10.x): the package currently ships sdist-only. pip install openbricks compiles the bundled native extension (openbricks_sim._native) on first install, so a C compiler + Python headers are required (gcc / clang on Linux/macOS, MSVC on Windows). Manylinux wheels via cibuildwheel are a follow-up — when those land, fresh installs will be faster and toolchain-free.

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 pybricks-dev 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-dev
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.10.6.tar.gz (3.6 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.10.6-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.6-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (3.5 MB view details)

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

openbricks-0.10.6-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-0.10.6-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.6-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (3.5 MB view details)

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

openbricks-0.10.6-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-0.10.6-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.6-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (3.5 MB view details)

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

openbricks-0.10.6-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-0.10.6-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (3.5 MB view details)

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

openbricks-0.10.6-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-0.10.6-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.10.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (3.5 MB view details)

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

openbricks-0.10.6-cp39-cp39-macosx_10_9_universal2.whl (3.5 MB view details)

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

File details

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

File metadata

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

File hashes

Hashes for openbricks-0.10.6.tar.gz
Algorithm Hash digest
SHA256 170f9b8ce29346b10b2e105b8b873f1794da2a21a68ee4e35df2a3167580ca38
MD5 d8a123d63b4558afcecbf2fdefb9f6e1
BLAKE2b-256 196a465755d533ce458910c18bd73e58bee06d43045df825cd320b61095cc413

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 11b1916ee15d0ff1ac08bb95112a86a1ba4bdb9d9542ec32854721d04b25fba8
MD5 b0d977963524343c77e20a303be14c50
BLAKE2b-256 685b38e8e14535cae2914b5dbdc1ba5d688be763527516a6897706466128c853

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.6-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 88edb3545817b96bf62efa829960f307b8eb7aca7d8bc41244396768573e4656
MD5 73f5b53284754dc8adf6c188c58c66da
BLAKE2b-256 02a65dc90a42b6675f19445aaf6106cfc4f0c52b7e35f0c4a62cfb67d1d1f5d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.6-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.10.6-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.6-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 be7c83809d2f97e00e970e1281549363c0331f87dc1c39e32e3015aeef7b918b
MD5 4f3903a9713095b885943c7978cebe5f
BLAKE2b-256 17c86b47306d9ac12cc12155a81645d780b88b9f0ea26308b9be4d46f1222567

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7c3a5f5e7024a731646edf7cdad466645024053cbbee2f55f5d60f078da382fb
MD5 e5664ae605108fea9a72b9cfffbccb37
BLAKE2b-256 2615b679997f8bad8ff3ec5b32734da6fb4396ec072e0b2afd21b2e9ca0e27be

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.6-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 10858bd44c1877df276c1d6a6fb49019b117864795b98606eaa55b1a93efa498
MD5 bdf63170522fef74f6a311519ba2c2ce
BLAKE2b-256 5b0f1b5bf44e73b5faff1e3d990f50edca571048c5a87dac5fc0b3481fd51146

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.6-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.10.6-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.6-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 263884f2a93dbd5153ffe8909e10aa42b2e491af6ddb528ab3acc4a844ae0fa6
MD5 147a998f37f11671a45f7aac448a520d
BLAKE2b-256 7550a2a4a02e8625616461a0a01bbd30d5da99bdd6d017c220dbb3cf13efcbf8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e40462c308e06f5834178d8c6b9ecc6e9a36f898c9ad281cb2bb740f9c0e6e1d
MD5 088f24dfc317b8997c863ec2e6587d82
BLAKE2b-256 0b190087d2b35e7f174493eb8730ade74cfcae1064fdb688319550474abadf89

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.6-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b253fe15f35e9cc3ceefeec3788de098b24d38cd7438c0657526a99293b837e1
MD5 7c5e3fcb0a65b99ec8dab8dd201bd593
BLAKE2b-256 d96919da0f6221932caa3869b86a1d189150d96bd79d3c6f37bc0753f87f2cfe

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.6-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.10.6-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.6-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2d7c5727e046cf52b1a2af7b43bc271818413edc151894c9f55a0dc3caff4ca4
MD5 7cb127fe5891f5bfbe70a1fa95b9f1f2
BLAKE2b-256 e38e61f366fbe6d30397946fcf46d39edd62fec6843e37f9f1575b95e23818f4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2d240b3d78e4eff1e3c3ac09add444dbad01e7f1caa7d493d19b27a1cec3f320
MD5 701937825a7f74eb8ec185606d9695ff
BLAKE2b-256 7e04e4964b4e3766620b4d233f2963e461d1867ca2ed3146b979b31466ecb6b4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 926d1d8cfac79a9f620fb5669265243ea0a64d58e699bf6ffeffd38360c455c4
MD5 b7f6f5be611b04670611f7e8770c96fe
BLAKE2b-256 674ebb70a9e378cea302b47a496e7bbe0b18cf7f7f99e378c11245da56d833b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.10.6-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.6-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 420d009547a22fd761e6a2e50d6a07931f9a10cb828721799210420d2ddc9670
MD5 32ff3a1304c0e69f293e89b1090aee34
BLAKE2b-256 4d9523a3933b9086eca513edf6f92114f9f5e368e76744d4f050a96d3aa004b0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.6-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.10.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ebc85ac4a5da98d845cc3d24735beec82db3f4d95649f35bd36f3d161a361a6a
MD5 f83a24178124daab8130a2383616634c
BLAKE2b-256 7222cdc104363dff53020e4b7a3e9734514605f4f71e5ef1da4549d9f912631d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 02b2eabd398cb9edea7b5c21f43bf0712d2f81354ff0c4b5ccc47440def3db23
MD5 21224679631d1429ff6a2663bcf520ac
BLAKE2b-256 05af3d8f16cc358438647251f5f4557065e952626013809afe8e38517de2db10

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.10.6-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.6-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 58c8b255e53cf40b49cdcf4f82ec04afabd3d70411962db867ca9691a7787be4
MD5 cf954d3e708bbd940208f6de8b505231
BLAKE2b-256 82a90c201919b71c96f38cd170b20669772b9a9aeacdebb3b3d516f7b33d66b8

See more details on using hashes here.

Provenance

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