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

Uploaded CPython 3.13Windows x86-64

openbricks-1.15.0-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-1.15.0-cp313-cp313-macosx_10_13_universal2.whl (17.3 MB view details)

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

openbricks-1.15.0-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.15.0-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-1.15.0-cp312-cp312-macosx_10_13_universal2.whl (17.3 MB view details)

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

openbricks-1.15.0-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.15.0-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-1.15.0-cp311-cp311-macosx_10_9_universal2.whl (17.3 MB view details)

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

openbricks-1.15.0-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.15.0-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-1.15.0-cp310-cp310-macosx_10_9_universal2.whl (17.3 MB view details)

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

openbricks-1.15.0-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: openbricks-1.15.0.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-1.15.0.tar.gz
Algorithm Hash digest
SHA256 f8ba08523cefbfaad2e96fbdf762e8f4153c60870ce1be36159cfa0a481a2140
MD5 5a5b5bea14adc681112a22f333e3e111
BLAKE2b-256 2e56f3f294961874b8d4c0ef573f773cd17daf70b06fbe052e8a3cf1214e6522

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 17.3 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-1.15.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 dc193866ba229c6500b0cbe39c6048e46d92b59bedb5a362b808ed0d3012dd8e
MD5 6cf07ee5734c261dfacbc32f4b9adc1e
BLAKE2b-256 a3045658a8077129d413143b0718023321e7946051a8991c271ff840953bae1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.0-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-1.15.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 464ab8bbe3a3360adead58fa67fceb834943622ee1506f7776659d4ee32ac7db
MD5 4e5f08ceb8cbdd68a612e1d22e3fda12
BLAKE2b-256 ec1fda3dccd2b5a302bb73f702c9cbbdc42b7aee0b0aa0dcb6ad03192d6f3872

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 b50f66069c2241f92ba0f9639e4674034ce7cf4e7c844cbc9afbbce83c8e75a4
MD5 792eb47a20dfc90d299985a73e2348a8
BLAKE2b-256 b1b5fe2a25c8ea999d2be19951043d513cd1dfc10582a8f64c7b27dfdca11aa7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 17.3 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-1.15.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 314022ff06bf4b2eb12269a3fbc53de1b0502767d39816bfd099b2e6fefdcb98
MD5 04fb9b8a17cc29990d4e0ae8f69ce82a
BLAKE2b-256 0d243f24e366d4f49eafc0fa44dab57699df4973ca0bbe369db8214c76022fcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.0-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-1.15.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0b8567a261bb333304754cdad6339966e7263d82cf90acbf4e809ea971697cfc
MD5 d7b401eb93326c5de2e02b79d8a4fd1b
BLAKE2b-256 1a09e931e7f6f72064791553a33e0d38d15a01c4a8979a1d96d1c11c6ff5b5e4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 0b3b1fa175c45e3b91ce3eaada98815d8123eb2ce5fe350ee7b23c87f31388a1
MD5 1920b64ececfec4d8ea8630fa0c66580
BLAKE2b-256 2be2cd164c8b392964a1382f6bf66db9f77bb94bec6bfb14de3bc40bc4f3e8e3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 17.3 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-1.15.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 dd57503e8af9abd8b8aab3f46528d32acb8a2c4b425d52613e76aa5c1cc358da
MD5 55a30dd73864e50f856827dd1e2afbff
BLAKE2b-256 bb2df9d522c83749b425341ad5c2f9a691b7ec8b739dc1ad3ead5c25905224ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.0-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-1.15.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f180c9d76c1e90cddca75de99629abd8b4830d7fff409159e9db9b9fb3a829ac
MD5 a0b1715ecc2d5e0128d6b2442030a8be
BLAKE2b-256 89ae6ff7ee80071664234e7e9da014cf7bdd75bee3b3d4aaa218e6b0242311b6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c9792ed8e67783b77471fcbd2f09b58b94ae9978cb919f818b56c87ac2eb5049
MD5 63b7743d16afcf92dddcc5642181d641
BLAKE2b-256 1acad571a659d8b1b04243f1078975fe92bd6360982d1db2c5ebac3fa691a2b7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 17.3 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-1.15.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 442310ee697136989cb292147f1bf67d8cecb285ec5058112246877a9446f036
MD5 7369f63475c99614ba2e68e17bf739bb
BLAKE2b-256 9ce96f27602fa1d57a3f880f2cad88b62938c40f118e403d2ebf091464687bce

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.0-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-1.15.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f140e00ac0858634b5b8f75ef7d7da375b80d2d65d84fea92451d616d345fb18
MD5 f0c1d936e62b21b0bdb1f34968905e39
BLAKE2b-256 aeb1d6de06281072e835386859620e6f33e256dc09aac9406cba92de8b580f0c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1ee473ff33202980052ee5b9a66c31bfff5529ea30f477081843942de1735cf9
MD5 9b6c7fda3c90ac2cf7a7bf00ff70c380
BLAKE2b-256 6816c152e4217c0ac50a442ebd5428e4bf66d0e369480df73d11fc2d8a88238b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.0-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-1.15.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 349a3a014864c00dff6a575a1a8a750e75dc4a17f07a7917365b200a7ee69615
MD5 8c39a9fd72f8464ab0915fd72bafe0f1
BLAKE2b-256 38490ea3a32ebf3237771f2b5b8b2a0402dad8aa496b9d7da963dc26324660f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.0-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-1.15.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 adb4185311eeea9d92546f31c83fdc3593eb7dccced0308471bdfac5d63b99a4
MD5 7671dd490e7e958edefc97f7ff8381b8
BLAKE2b-256 b339453a143a956f93bedd79e6f40f24c1d76257a9c10f1bb5876e646f4fb317

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0b331d67b3321b0ef5065796b6177cd67ccb6f3985a53b73540d5bb9a774f9a5
MD5 7b2169061d606f7337633d30a9d11d4e
BLAKE2b-256 d796a07e539f22213439c0973ed75d79a5b6b57edadcb8bd3649e3ea7139bf89

See more details on using hashes here.

Provenance

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