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.

Website: https://openbricks.dev · Documentation: https://docs.openbricks.dev

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: binary wheels (manylinux, macOS universal2, Windows AMD64; CPython 3.9–3.13) ship on PyPI since 0.10.3, so installs are toolchain-free on common platforms. On anything outside that matrix, pip falls back to the sdist and compiles the bundled native extension (openbricks_sim._native), which needs a C compiler + Python headers.

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: openbricks-0.10.23.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.23.tar.gz
Algorithm Hash digest
SHA256 77b83994ddaa44399044f30171e97fe509ab7c388ff6d1c759bef02f341678ab
MD5 7863c0cf1f9ac1bc335876de316328eb
BLAKE2b-256 3ff1316ac4fdfef7a20c029b7fbec4433e05700fe9a5b1c9758d80ed27e77e6f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.23-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6deb1044d4f8e27f68da4e215a5b2cc070f4dfa5ea46ce31c181c2a8943481a2
MD5 6b90edb9ed0741e8a33371ae8a5e06f3
BLAKE2b-256 c27359a1cdc6ea52e591c7dfd47f2382ad1b4057f2e9c8b0e07e2619bcf34b58

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.23-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.23-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.23-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 eaa886045ab7d720a21f454e34801992382c28a36c8b2cb1c5a8f0ca02df5860
MD5 7e97d1a14d821c83f212c82c2f3f5872
BLAKE2b-256 b54dc4114cf7ea70013dc9948e372a9685fbad1988493a62a78eac57f82152b5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.23-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a4e545e20afb0ebf421b9ad5e13b25197e3b51aa820e88afa0400fcb4db8a9a6
MD5 5da2c4725ab9008036e1485e9ca62f3a
BLAKE2b-256 3b60f197827ad8c94d6e5e11a38c3f578c9ae307b54e23247f3459f849587e5c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.23-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 33d906c9a7127a2fc31dd2fe7b255c8615da934658aa853feef3ae604671077a
MD5 e7ea37649e223c82ebec3c591a6dc995
BLAKE2b-256 c873d07eb6d3017817128d838c2ccc77be276c303195a5f1f625b46c82fcc38f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.23-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.23-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.23-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 688477e1963f8f9b46390b46b6f62dcd5acdfc0310d23757114071401113305f
MD5 8044761adf728c0083b2d888acce47ff
BLAKE2b-256 d8c4bfeaec8a151f0863570058d80b2e8b12c77cee18aa147e3b34781c730eff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.23-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 684ca2f143e0c3ed6849fbc9a3638dcafaaea09e89c05ef842a3a4adb4f78429
MD5 e7b5cf02e7c687b9359176aa287179a1
BLAKE2b-256 066412fffd3d13dcff5170c3e27edebb3d038b5dd730f6656df1428585d01fa3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.23-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 73fc7b90c60cb4a4571f2a6a0033fce482ea4b583de8edfa8ccb9cd75e6b1308
MD5 903f2c40eada6588cb497c46c628c73a
BLAKE2b-256 d3ea9497235c998cb6c4fdfe7e62be8d86e2c1d0d64c4d9e07ff9dbb8cccf9a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.23-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.23-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.23-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2bb1c82aa5e468592d315d4dbf428209939a0b2beb83832015068dc9ccc2c8ec
MD5 928b0a2ffa173115d2f5f8f1d95d1dad
BLAKE2b-256 ea7bd890c692672b3658eb3d66b238b9e1a051bc8653597e8eaf7579a62f23b1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.23-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8ad7d4285f04b9d7cae43b5000ab372d5eb49fb36ad16d85b7094648df3be6a1
MD5 96157fec3b3ecb830e1b65c782fbca6a
BLAKE2b-256 9e00108af4d4d7f9a0ca903b96b54631471fecca277e23247ae2154749e45e70

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.23-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e7afb9312def87866dfb99f3d559f276203c1512e2f29d8ba297045aaec9c31b
MD5 bf3090e45eb7b0e34c622476f9b89ab3
BLAKE2b-256 8134b91de862abb95b530352378911d57222a8c26dc15ee686fc4a1dcd9ebd35

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.23-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.23-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.23-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e823714ca20041581eb48b6c836ca62f259b31094a7ce11d238f0d60a938821f
MD5 8e5a1ed3355aeb5168206474db6bd7c4
BLAKE2b-256 d90f20ff7336747837dacb6d9b3db007ea91e416fea4c9a211010bf1e779dbf6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.23-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9a43bbf81d2451bdb0fa85c2c859daf57caac36f0cf62146fb7239c196def1a2
MD5 22ba83e882e64bb344523bcefc74bfa6
BLAKE2b-256 f7398aa3f70ede0904b8de042e370aa87d6b254ed51f36c8cbc378a4095232d7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.23-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.23-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1e903f2c764578492bee4883a099aaeee7f99ab29d6085c84da8161ecd242ad4
MD5 b420ed35471911023a082842e2a18111
BLAKE2b-256 a3b1f20f8a5e6ce9d497fb2e25081283dc7c2afb19451be651e4f506ab43be43

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.23-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.23-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.23-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 81aa864cf86f3d58e1b5b9f1eb61e91755da5af1d19884358568d307f22d59ab
MD5 1fecb19cd08ff1b000f5ffe50baf836a
BLAKE2b-256 9d82796c734624d25d0576f8b779a7f30a1eb45b9dad19814f465ecf4642ca12

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.23-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 94f10f5d2434c1f3aaa888ff54ed0631437a4c7bbceb004dd7e4b60dc5d64288
MD5 249597a95f990bed8c06a4e65365d70d
BLAKE2b-256 1c0dfe46671c0d75e7a7f149af4bc96a18e496e5f85215bbc06827f7cab1f9ce

See more details on using hashes here.

Provenance

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