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

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.7-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.7-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.7-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.7-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.7-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.7-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.7-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.7-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.7-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.7-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.7-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.7-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: openbricks-0.10.7.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.7.tar.gz
Algorithm Hash digest
SHA256 f4e69c77fbd1443cabd5675dd38dd4d6e5d3849ebedd9b23bc28506741392fc4
MD5 bfdd534e84763c30a0966caf83b83ad8
BLAKE2b-256 f05f2636d60bf865bb3bfaf78bdedf3ce299795bf60051b8dba22f4e87785f03

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cfd4aa689eed8bab8ac3c227963b3a595dfff720802f52542d8df33836466f4b
MD5 e4dfc11443c36a608f9f0f41f8c0590c
BLAKE2b-256 2e8fb9302c024a926d420590cc097cc703638a8c97f67ec7342a244b1e4eb56b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.7-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.7-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.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c486543d8b17d2672b41896856a4eba976fc7974d464d0a007cc73c34dbe8c5a
MD5 328e88548a5a5e402b473808bd190800
BLAKE2b-256 e1bc48a243a9f402982ff2b2356592767368bd39a9c2dbf8a7fcf4ff3935a2ca

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.7-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 b0372beda0458b6877b4d3f743ff8125d9c86902ba3a88bdf531809a32d1c00d
MD5 6d82b99867f1b80a57b37a1547338627
BLAKE2b-256 d2fb988c5fec299da15de1a06e13c043cbe3a4734d468e25feec38d6273f1ae6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6c3b605cc7664d8fdf93ada1df10d27b5c521455cc80a7eb89f4af9c1c467c20
MD5 28675f71c85e0b906bf5401f5d302a7c
BLAKE2b-256 d257ad2ba934e8eb522025ea767258c8ff43dd8d043cb955222a427483a04a62

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.7-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.7-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.7-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bd720fc6f5330cd817a73f14cb6f7c4dae087422e5147a674190d5b65fc1e824
MD5 080d5a4831887129efbc156839d31e26
BLAKE2b-256 83a79194f81797c1e7dced7e45288e61423c56ea1021b3242521a7be501db1df

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.7-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 93054b7246471b669327a71959eddb74b51b9681d14becf42170ad122d1d689e
MD5 c44f182e84843d7c7a4bef5d79b5ee04
BLAKE2b-256 d7481dcb9bbf47858d1b5581108eeb0e990d6d1822ab75938598e0ab546a7d05

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2addb71d67727b254778577aef0cec6f05423fab06b04993a22e7cedbd258853
MD5 144275ee5c4872c0c8f6a1881c707700
BLAKE2b-256 183b1075e50fbdd9a75d8ce2b1bdca629b0bf11f119f510b200415c5bf6d180f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.7-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.7-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.7-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7bff08aaf5d61daf6ce5c336bf92e6e0563b2f4720c789db254449712e11cb80
MD5 5e359001c6d698cd42dc3d82347afa49
BLAKE2b-256 795fa888ebc18d032e503d6a50af4f38ff5a309a4642e992fac30be9e2bce180

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.7-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 773a71501f6650a3ca158a56a2b354dac209c178eb06cc63fef0fc536faa3a36
MD5 98b8ea62a94b890cac02f6a9813b42d2
BLAKE2b-256 06ffec375130a916466cc855e9c70f114782a8ffa317475883da0edd6486d303

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 698f0a514a7c0a0d8da9d886d7c2824419791afedcd5e11743fe36af64716e8a
MD5 dd97e10cb7171b6a745e736b83e6435b
BLAKE2b-256 e28d3e74e2eecfb97342cae6bbabb4d9bd9389428a52cf62d7c7136c456b5c3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.7-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.7-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.7-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f0ab10592feeb317a4dfaec71e6f5ee6a84aee5dcc4f2062bcfef8d977b769ea
MD5 9f0fdbf955769fe66de473ef7b5a85fd
BLAKE2b-256 62fdfcf7400c512055bc1f48f2ac4503819447af41fb4611db22183d0e7eac4a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.7-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 eeb87177f63a1b5188062041bcc6ee87d2753e1a64e354cf3ff5b6a0ab398b1a
MD5 70339ef1a0e7a0386dae5ca76b077dc0
BLAKE2b-256 dcbb4a23c95f55aa082d5094f9f056857587ad1f30a0d2e6d6be33c80cedf866

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.7-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.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 76d09eed4a8338984a6307c49a929299fca66a4e717458197da3e20308643828
MD5 dbd43b9032e1a49ca7b0b9a260d1b8cb
BLAKE2b-256 caf6035afdaef94686635d04ee0eaa3d59ed9e47d152217acdda6ebdb1a3ef68

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.7-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.7-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.7-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4fd5d571bc40eab0db48bf74bc92e0ce72463fe7dd3ec7de2391d80c5b00cb76
MD5 4c3848f3dbfa79e5bfa1d9c82a13f9be
BLAKE2b-256 5a0e15aafdc9a8fa27fbe3226cb3bb152e1584bfb5e2311a1ce3a473c0ae28b0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.7-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9bf8a793a4c7342ef96e3026084452a25a19cf9b55b9070840fe7dbd511a26b9
MD5 f53e2b25c8f2371fb6564fbc7fe1b031
BLAKE2b-256 ccb1ef84c497577da5213c95bad474325add90d94575f09a1740bc5c260a20fa

See more details on using hashes here.

Provenance

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