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.19.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.10.19-cp313-cp313-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.19-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.10.19-cp313-cp313-macosx_10_13_universal2.whl (17.3 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.19-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.10.19-cp312-cp312-macosx_10_13_universal2.whl (17.3 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.19-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.10.19-cp311-cp311-macosx_10_9_universal2.whl (17.3 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.19-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.10.19-cp310-cp310-macosx_10_9_universal2.whl (17.3 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-0.10.19-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.10.19-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.10.19.tar.gz.

File metadata

  • Download URL: openbricks-0.10.19.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.10.19.tar.gz
Algorithm Hash digest
SHA256 8750af3dfa08916043fc3ce53679951085cf170f474c742cce74fa51b7447b2a
MD5 d97466ed4395b19fcf5c27bf3b1fece9
BLAKE2b-256 2b2d98a472446762aa06b9555ff56d10393979052e4c3eeb1cc3b8ec9dae48b0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.19-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0e0dc52a541bb7b02a109e1b66f0de62e11ac16acfe27fe4e1248e4482076ffb
MD5 cc361638007f93ef186b3e752ad8d9c9
BLAKE2b-256 b9fe18c75cc7d49b70039d772c02039b422cab3c73ca39ba03c80545353014de

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.19-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e2ad2873c6fd93b3e44da4d9ae360a7ca9845f0ace031eae0181b148e52ab812
MD5 0d3fed10a17056e21543d9c5b8751b63
BLAKE2b-256 a666674b4d0f9544b3c091d67aa84c009f2a1a2d148a538d08ff748d0ca0beac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.19-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 ece4bb7c7e2375a8c0eee638b243597516e86ef862d624aebe3bb6f466f05b79
MD5 ac4222a55e3fccc77f6fa96265c725f6
BLAKE2b-256 ecc55be58b80410cc330817d79dbb87874a756aa9b5855d2f92324a6bc6b3cfe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.19-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1da5058decbbe5fe192d5927e4287290aa309260348641fa7f13c7461d937c2e
MD5 407c8c59a4d439b9bcad3d2a45cf42a1
BLAKE2b-256 43009752d991602cfb6093819ec5874fe66c796aa623a008530dade0beee06f7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.19-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f2b0b3d6c9098d869845bb1cd74cee4a7e8b5e1ad7e8b4a07ad5731c4277c8eb
MD5 72bed51fc5da235544ed76629e36198f
BLAKE2b-256 5702c953f99f4d53f38b6c5e8c02618eeadf913a5b34b923c5259842ed4a6830

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.19-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 c53c4ca544542428803ee365f0f7b63c73c29a8df56005402ffd3f4f2f065243
MD5 04b7855c3102c702e938351ac9855da0
BLAKE2b-256 4847a1c851e1d6164210784daa3c9be75cc70d5304bd3269a0056125db193085

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.19-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4cfa35cc08103faabbbb4f76992a67a82bc4ae47aeffb24cb4f76a21550e8b4d
MD5 afb567e77490e89c8eb7f2fd03701b99
BLAKE2b-256 eabe85dc0a20e9a4c02b8fb83b04005564022cd2770b64ff218b0f61fa799493

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.19-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3611b6c291b6651aa070b5bde03f411884b8da2c500f01fba4f876a275069af2
MD5 82705b919825cf3d68177def3de792a6
BLAKE2b-256 8425932b904b1c01dd0bee0741318171a1117690eb48d1dc58618eaaf79df766

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.19-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 252ec3f55d70e228f8cabcc821f8dc538071cd8ebb0e97654218dae1ad8d9d67
MD5 688b524bb26fa477123a8cdd96a678c6
BLAKE2b-256 66ddcfa56a86eec5ed5adc299985466fe37951e0ed446ae518e246619dde2f0c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.19-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a0dd81466b37a793fd6ddf976b3c644fe7c7faa9995dc4f7cbae1b734c399a6c
MD5 81b03fb12dbf8bb83cc1b7990b232232
BLAKE2b-256 7b40e5fedeb2ec3edeb8e5e718ac8ffb288eeec79f8e406279d93a9f869113eb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.19-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e1a96100efba4f65f6810b357c314b8e7c6c278724e1e9486b52e99e0d780378
MD5 ef10e1f6e7f772bfcc2824600ae467eb
BLAKE2b-256 b86f72a35c6350fe10bb5598ac99ac9dd8eb64912cc4283519c39c3afc2359a2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.19-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7ef5490c4583db01406695a65a7f842e42bd0308c171ee26ad20243cc0c7e502
MD5 97eb9ec3e3f5e3f57ca31640ce2a1619
BLAKE2b-256 c766d73b8cdaca99bf1fe3bc3cf014af7f8aa8c186d0d81949d88630655812c5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.19-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.10.19-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 25b88fafd76449ad8bdad456e0342ce3a94ada88636a38168c2d1eeb1b0b3b7b
MD5 1f1145968744a9aed85fff0aa25b00da
BLAKE2b-256 cc7b2f043f53b4699e9fb755eeeb324a6a76ddca160c27d64aa3af8d31175f1f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.19-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 965c74a9d27f181662668e09fa8551dd26c107b24d84fb61a1fb1c3d51838c01
MD5 1495af32b0c33a5a0e2f1e2a7355a727
BLAKE2b-256 d76864cdc58086ab39e252e112981af05d0e7d0581a5a81fbadae26ff86b123d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.19-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6f2fd839d765323d40ec0b64fd4fa45cf21b0f96f3cfdb107592ffeaf40b6c41
MD5 ba29a51519da8bcdd742e5c6ff57ec50
BLAKE2b-256 135c033105a99276f8eb914160e069ffe00d03e595ef40f627fdf365be7b584b

See more details on using hashes here.

Provenance

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