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

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.18-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.18-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.18-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.18-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.18-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.18-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.18-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.18-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.18-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.18-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.18-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.18-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: openbricks-0.10.18.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.18.tar.gz
Algorithm Hash digest
SHA256 19453e465c6b92944dba214a8d4fcdb81c2bdb60b9cacd195e047f1205c39f32
MD5 5bac54a8428903fb43e86fc1e040f1a9
BLAKE2b-256 406cd290f4bd33a401762d9ae07a7dddf6bdb6f44792b21b8a72f4d20f26f7ca

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.18-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 37f89af10166b4bf567fde81c4f67d13c22495c0260ac46480962018421127e4
MD5 00fd97a403dbef3e79332b1855b7dd05
BLAKE2b-256 f09bda1597ef7a28a3efa273502db487999cc0ce95e98c2342c981ededf4ef00

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.18-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.18-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.18-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ccf6513d213e590f5a1828d1bbb757a034e3f7c2919723e59f516f58cf12001b
MD5 7abe6341d974a8d35f26ae4279337e35
BLAKE2b-256 2be3277d83f6eb4b2075ba8785c9448b706a70b36306b508ac03512b65becd8b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.18-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 07b105973fd6b78d988650aed48abd36ca198633a1256917900817eacc21cc7c
MD5 f02afce5665f5992604fed9de82bca78
BLAKE2b-256 a285ff78fe84bea0498a30562eb030af39dfd67f3d851c786a8cf317e6a2edb3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.18-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 502a7425c5c20d50b0d7701fccd2ff2bdb0aef91089f75e42f632e43414d8be5
MD5 bcc7a709ea9be82127be1f9642b75664
BLAKE2b-256 a5db01da4a9a09b20611ef76538435deee1b777dcbf49c8bd86e7ef604bf769e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.18-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.18-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.18-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8ec635871ac185cebe9392ddb64909018e45bdd6945a66692a338992cd9caf5b
MD5 11615af9f2ebffd2325cc5b893ed38c6
BLAKE2b-256 41078f03b5ba7a4984a0bfb818eced34dcbe9b5dffeb33a7f44714bcf4ae9e8f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.18-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a5a73b5bd576285da8623f9b3992cd2e102a5c0bea1a80538afcc3839e1ae1b9
MD5 35cfb6f2495857cefed0e302bbc21a7a
BLAKE2b-256 ddfa27a2b7ec9670eda6d65cd4f0e55fa817af96f88ac405e8462808a87ad070

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.18-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 31d4786ba6cc26ab699ed191f4557356292c03fe0e17c18c23c8ee47d6699227
MD5 aa8bf19a9a852fda7b8b18ce26ef6633
BLAKE2b-256 0b59622cac632749d9e3347f7b3e1fa07478a20b36d91aef59d8ba40dbf5d607

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.18-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.18-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.18-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 829f90b1a8878b1241e74c97ed00b8f4371ee7475b2b3c9321d206505a171513
MD5 a571db703dcfb19929e8f08edc22cced
BLAKE2b-256 2dde4a75d403e6250d1e7ae8ab410290f7faeaa403e051a0ebe2221a2e01983f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.18-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 278ed397b72472a0ab90ce9ffa32e61cf4f082fe1cc57b07a52a5cb8e51929d2
MD5 c5f37e69d1b674678f4a5a36b6a48b84
BLAKE2b-256 fcecc6737229ebb5d3aaea213f222fae7c140fcddcdf1a8bf5c7dd6eadf34324

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.18-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 30f7e5c4dbfbef0f5454a00ca179023849cda9e1cd853e4ddb2a5406156a9a81
MD5 6a38f70e9808b474e6709b82e9df9d12
BLAKE2b-256 6af050ac1635a2501a06fcfe762edeb6f77753fca3face7a3f57dc74d7b7af9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.18-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.18-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.18-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ed29f1f21b82617200a5cfdca47578a34de6ef6b3a6561b2fe38d10273f7831e
MD5 942b8b7ffd61f45d7df33d910181e641
BLAKE2b-256 73ab84a0cbc082790c08c4becb305ed8cc59b4c414fecab46debeffec1c927a6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.18-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c027d906508fd0bc8d992add662ef1aedfeabec03c86585c1aa13f9525ebe65c
MD5 621e78b97697b672ffd9f4aa79b8ec03
BLAKE2b-256 86c060dce69058e474e387cd9d15ca1cc3543fd7ac32316a4d0174150a6f6b13

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.18-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.18-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 893d074fe316369ffc4294a3a393891472a389fe40b357e9f1dc259e33eda25f
MD5 1e2e5c72d2d5ab85b13b6b3d0f3ab48c
BLAKE2b-256 b5c477ad633941d8c2d0213808c2131c37b782c6d2c45dce7d26df407271c1ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.18-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.18-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.18-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f6e8d51a73335412896f2052c6fc8a38c5ee86ebabdeeca01b298a601f2dc713
MD5 9bafaa95187c79511bbc0d415194aea6
BLAKE2b-256 86f6603c1ecf5d20cd49ddc1edf1e1d9b3a59123cd10f13c195e55044157a755

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.18-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f4a878aa4c36c75b818c14b11c45a5770aa058c4cc49ae9f8e3dd58de22d93d5
MD5 03254ab559b4a75ccff3bc1125580fc9
BLAKE2b-256 4708100b42f3cf2be2d9737f33f70ba4bc4f7706b70451b15df0c634aba78a5a

See more details on using hashes here.

Provenance

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