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.8.tar.gz (17.2 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.8-cp313-cp313-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.8-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

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

openbricks-0.10.8-cp313-cp313-macosx_10_13_universal2.whl (17.2 MB view details)

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

openbricks-0.10.8-cp312-cp312-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.8-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

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

openbricks-0.10.8-cp312-cp312-macosx_10_13_universal2.whl (17.2 MB view details)

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

openbricks-0.10.8-cp311-cp311-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.8-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

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

openbricks-0.10.8-cp311-cp311-macosx_10_9_universal2.whl (17.2 MB view details)

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

openbricks-0.10.8-cp310-cp310-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.8-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

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

openbricks-0.10.8-cp310-cp310-macosx_10_9_universal2.whl (17.2 MB view details)

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

openbricks-0.10.8-cp39-cp39-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.10.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

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

openbricks-0.10.8-cp39-cp39-macosx_10_9_universal2.whl (17.2 MB view details)

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

File details

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

File metadata

  • Download URL: openbricks-0.10.8.tar.gz
  • Upload date:
  • Size: 17.2 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.8.tar.gz
Algorithm Hash digest
SHA256 35659cd817ddd1cd6688152eff7b033af27984eef502537c9bdeaf8ea1cf33fb
MD5 6dcec58762f7014ff8b1b93b995cdac7
BLAKE2b-256 331f8393a492d3503474da71ff0ed973d50f1c28605090859326decdebead9cf

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.8-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 17.2 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.10.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8e3b5f80699a0ee30bba5c5a179514b370a58b10bf85a865f0c435829d99df48
MD5 8c10180df23258497e5aff01152c4558
BLAKE2b-256 d586982d29a57ed210e43165ab2920bf52ef38df7ab166197d8a29e7f4f25f24

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.8-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.8-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.8-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d6d7dc1775088e85f7257b2d904f7d8631ac779f51ef2915eed831af9eb7b02f
MD5 85fa6289d92d1da6670ea80dfed56d84
BLAKE2b-256 f072f853e8f5aaa546fb84453b19c901cd32081670ad163865772ff19be71fda

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.8-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 35f4a3d293e1896f0e784104875bd7a0bf2a9911963ab8b1499437bf04b5db12
MD5 1d41207be0595c09259341461f665a45
BLAKE2b-256 4604581b933f090b73aac74b4f1427ca8fccbb1185ddfbe88552767f69773efa

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.8-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 17.2 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.10.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8d26480ffd1f9367597c1f174dca4f567458886d4646ee63d5a12c99eeb33a06
MD5 2c15a728af5942b7f0ae8fef8c5de9ce
BLAKE2b-256 8ab5813750351623b8f15c4bba75460e4c43045f5dbfd83c0333caf9a994532b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.8-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.8-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.8-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5607cf5a6890dfdfdb3ba373a709133b25b2d171ab7e7093d2c5ed39a3f009c7
MD5 1d809ecc98af1471a479375b470e9fe3
BLAKE2b-256 2dec684ba007b7e7ca6f09d07840d5a07ac103aae90a4098de596b767542eab4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.8-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f14e27d493a33713e464f56338d0445d5bb36c2ec146d89303c821ec8cb5c2b7
MD5 d7295f5ad8e132890524e622d5993adc
BLAKE2b-256 28ffd4ad6b51016d06f61227fa7b848869e8c32c58fbb1dcff7d64681e64e7d1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.8-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 17.2 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.10.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 bda2af3d97e775508c451382a1cfc4bbbf11e93cbe6eb389813bf00269142205
MD5 591ea8af7e57559f2993f7e076bf5771
BLAKE2b-256 ff243427e3de011432341d9210ae37a3b9ec1cdc18ddd9f42a8f36de62f8dfe1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.8-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.8-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.8-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e95d3d8ec390e56f8dad8c0d9ce7372c000284382842a4c4de5c0a784b9f6e1e
MD5 799cdaa9332ee2bbe9af6de181a88c1e
BLAKE2b-256 1ac30debc5038605c0eb04cea9d2c7762f99592596fb2b2158b3ad8c7b2b9f6d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.8-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 81b23123ab71be3e1ee2ab13ae0712e4b16143a3f724377c9ca86ff21f4ec2c6
MD5 a46a3c53cbc47ea1bcb4028e2ff568ef
BLAKE2b-256 3706ecf123d83b2cae26c8a6ae19a02d87c86eea8679496679b31f1ab36a8639

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.8-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 17.2 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.10.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 13d6a6154a3cb998baf18acb59a7dbbe655cabca39af50c667bd9ac6eded0d86
MD5 76c23ca08e2c79f3890cdce3826c315b
BLAKE2b-256 82f69fac54912b4fd6c9b7b7f24e2e0628c256dd29305f8f08264f62ffeda9ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.8-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.8-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.8-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 38607849d199f33946cce1ce39d26b0ee55bb9cd6a849a02a311f98fb7feb644
MD5 d33ea06e09bd42de6a720d898ef22146
BLAKE2b-256 70e671e96db0e4f6295edd19a0d329411c68b9fd4f2621a1d6093953f76c9861

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.8-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9c21f38e0132b1fc993df17f356a0bb0a9f80e2c8a94753e918550fa73d9c633
MD5 eabb3c4bbc48e270d1190dc87f2acebd
BLAKE2b-256 6632c78d044147631d66823b1d59f44fd60c7ccf832720a4a51052140a8e1e15

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.8-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 17.2 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.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c2fe7bc4e321d4a8f1ba30944eece5a138109e1d983a4e2271087625de2d6f26
MD5 856e9cb7b430b7aaaa2e5439fe5e9a2f
BLAKE2b-256 90fed4a071f0a80b9f4dc736b22d7757e3d54a737d44950350143c0002d14909

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.8-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.8-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.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f658bcb5398744135ecbd76287ed5e89bb22310727e6cf6f63805503f6843b68
MD5 4c8bb572a37e730865fd6f56d384a8f3
BLAKE2b-256 5adf6342ae9602afec5bb49d9eab8e4caffcb3cc82956329a60e666583eda87a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.8-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 98b7894841cbda4a77361378e94d680f1daa5c07153a8078fa75e2d60740feac
MD5 5feb7d341bdc320093e7889f1f44c763
BLAKE2b-256 04470008fc0e00151c64d253a7f0894bb49559a8a0108d8944e4ac6bc365f4be

See more details on using hashes here.

Provenance

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