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

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.14-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.14-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.14-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.14-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.14-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.14-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.14-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.14-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.14-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.14-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.14-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.14-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.10.14-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.14-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.14.tar.gz.

File metadata

  • Download URL: openbricks-0.10.14.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.14.tar.gz
Algorithm Hash digest
SHA256 ec2b69b0d1f45a48a5614f40b1e9e85b3ec904ba5dcb7af89e9b4c03c6015d3d
MD5 f3c9bffa972662474376879d4ff891d7
BLAKE2b-256 c99f7a92192bc0bc7c38959ee89bc014a3a00928b0137a74a59be12ce1a659c4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.14-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2f5bc8d4c17892c24b6c3106d2f4095bc0338c7ccee93de76c81dd6649b52058
MD5 170641d25ed71e2d764e532c38c3c367
BLAKE2b-256 3d86b5975f4db60211e3a1a457814d483300b6561839f2c48620b561698b4a4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.14-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.14-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.14-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 26cbd84b00654cf3f23b6c6d4b467efa89936a9ef5e910f9594f29036a1b9b27
MD5 a3ef0cab1ed8a88761787e9e3e161e6c
BLAKE2b-256 a14379edc30c24e7385354c5ebed452b47ed68804ed7ae049b853c62cffd226e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.14-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 0bb0bd432464c976906e7efbbf6d11a3e88ac0d5820df10091b823d006c467ac
MD5 71f28a131d849b5e491b005e57ea6952
BLAKE2b-256 05cbe6a99761e53a3546393e1888eb39e038b38c75d00000f34e5cdd9b300457

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.14-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3cf82e2d4c2bf01acb6dfeabce29d1dcc965f82e5d5fb3b4a568e2a6d5518a8f
MD5 02f0da29308bd4424563484928e0d192
BLAKE2b-256 13ac2beede5ad7c9012a9d2e578d2e801b429283fbe007f442939da679f2ed56

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.14-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.14-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.14-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b7f1e934663d2d5e0cabca46ef2e032fe386ecf58398990f0ec46b6062e04176
MD5 dad275db082d4d931920199279ad9f35
BLAKE2b-256 cf8f8fdc4bec0a31b2544979975bbaca4cbebc77ba439e4f4b981d51081b30ac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.14-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a39066de47d4bc2b105bfa1c32ac36ede2317f863e25bcb89e39eb554bf3afed
MD5 189539e6d415bc28d8239599bea6f1ee
BLAKE2b-256 f9583848a94e493ec853e5149135b2ff44c51dfb9078f9eedafb643ebb44dc95

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.14-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2aea4437603f9e76d07ef7389edf4f4269f6d877d0657ea5157df2b7a83cbf88
MD5 c34bce0d78236a20fcc9c0bb8678e239
BLAKE2b-256 baf3139f5665edf61fe897062fbe9dc9df502253526798c8078d30ab2489ccb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.14-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.14-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.14-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1645cf092863cb35611f33fbe04e0bed9ce7fac2a07af2bd88c5b09678ca46ce
MD5 6cb8a49c72635e100fd975778bcd96ed
BLAKE2b-256 78e55abe124a73306bc18b174fe7a21436cce3112a5cb182ed1f91db511a053e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.14-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e4d2a5e7d7c99b07522531bba034dd36ba8ea5eb1926390d195b9e7c8ad36f66
MD5 c7ce1448680e995ad8d7ff6688dd7d7d
BLAKE2b-256 e8fd01f0eb83c63b9dfa4f705693ffcac59f6268afdee735ee435e90a9899542

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.14-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c93f781010f62d270c59b1ba115683687169f6dd3ee380d24d20db74b2f1a0e5
MD5 4f693c1d3e4a7b9490510875f52c5bb8
BLAKE2b-256 1f7ab8dff114284e58e1799c810583d19b780b7f0843d592cdd107206195ef07

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.14-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.14-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.14-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1c5101a8e1667949c0a46e950e50dee2bdae746bf4863dae479ed055a920ba52
MD5 947fc9e996474b5d7305248898445264
BLAKE2b-256 a7a22ae9a0ccddba82df26cb0640f7069c19a223329f39683ba71383e371c7e8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.14-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 966108ab6d1f48f2bf97629583f091d07520522210c8d0e32d883bd9dea2ddbd
MD5 95d88473a1eeda5ccb49e26b1fd7302a
BLAKE2b-256 5edf327a957bbe9cdd009e47baa73af3c5d43ec275d6909f94edfd6f13ce071c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.14-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.14-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7b7fb2d2562d627520eb643c11fba4eb8d5fc78194d9ea038746dab0c87cbb03
MD5 0501bff52f87efe9fefca26858406c7c
BLAKE2b-256 254f9f6aa94cbab9d4670a2152cad6c979b828d5d9a212d2b2642cfc5fe95ea4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.14-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.14-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.14-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 712516b8057fc894c3b5e5d0ae7da64cd9cf398adb20471304daaf5ee17ff124
MD5 8a61b880d96c5cea745fe80f19310cef
BLAKE2b-256 2bd4f6598b38cca1cf93e7f49b039714862ee7b2f67d3e7199b5f2f9d8945125

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.14-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d534d8b109a783a4e8754dd687d0e0fc7f8ae90fc2a0d1f26a093b19de1c2242
MD5 a23febc7e2fdea56953e725d685d3413
BLAKE2b-256 3bc3a625e666d4946a6b6de4b72d13484b720b041833c2b385976090360829b7

See more details on using hashes here.

Provenance

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