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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: openbricks-0.13.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-0.13.0.tar.gz
Algorithm Hash digest
SHA256 7ba38a144f9e119ffdc1e7f8986feebdfbcd181ccfd44a04e04483fd99f4dd00
MD5 40082d7182eae142bcc8e32e3131312f
BLAKE2b-256 a7b31d89bf5c095de5a6bb86af370e3331320587893f372c63c344565bf306d5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.13.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-0.13.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 fa2b33050f881caf89764902f0090c9dc41eb81d44e7dd2674e41cdeecd9deb7
MD5 ee24fe7f653adecfa76d69eed33e08a3
BLAKE2b-256 95a6cd70958ccbe87ede43eed830b560f97392bc0706bc348b95b238e11a77fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.13.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8c2a55edb556f79a57095dfd7b6b615fa811e5874cf56396d4af8e891ae0a48b
MD5 90732868d118cce5c1c6e5739118adb6
BLAKE2b-256 ec7a9f2efd01709efd345df4652e6dec6f344f9cdc611bc2945d7caf8ce472e2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.13.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5d6ae4b09d7fc8e9117df6aaced9d7ffefb3e3196659cceafe920366cbe1236c
MD5 2dca006b1878b5ac13ccb3d537fb2767
BLAKE2b-256 15a5ad03eed9b5ecb1e2a859dbf2ea0c52e01b93cf2f7cdf33f04785df255658

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.13.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-0.13.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 84cc7a9d0da446d50444985bfed1a5b04c41835c6543784de36a94ccd637ceb6
MD5 fab21c0471a803d1ca6ae0fe837289d4
BLAKE2b-256 9903f820b8a38798ec858318384841e0f8c912f4167f99172ceb2be767c95c35

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.13.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8dc17bd4213c22ddaa571ec3c05d248f6f5c9686648a3be230534c3543ec5749
MD5 f7ca887edf4209f4ab8b20b104ceabc2
BLAKE2b-256 08b3d26f8f90662a3bd0ec45aa37f6e54acd7b9e95e11b34b6c10a0a6e2ab653

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.13.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a52b63c46d32a7a4530625bf79269c58daf8181b7004afab4b9faabea18be5ec
MD5 74becf12891f2ba1c5c58cfd8c3b41d6
BLAKE2b-256 68a72b8e2e27a86eb6ec9165e253e96ee3372f67297d00f17243ab84f29d18f2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.13.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-0.13.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 37af47f658c2e319c62188dd5de498b78cc825effcb068f5f35d7b2dec45108c
MD5 0cce61b77ccd67b895911fe1e2417149
BLAKE2b-256 c47d62bafdb75d800281b3e8efb16115855c182de61157d868ec0486b7f853bd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.13.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 34753f2844721ae9eedddbf4ef1175dd5803946d5597366d01d5d874cd230701
MD5 5ba4b295502d161431734b4b1308e994
BLAKE2b-256 e32dd4f06a3dd37d28c1fe873fcc495d0185b8c05b25921173d061e8e016aa70

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.13.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9a18b91a764100698f5dbc4eb8ce92bb9b405fd6127f8c32cd1146f96b0634c3
MD5 398b6eec3c34becbd1bbd8188bafcf92
BLAKE2b-256 8d3e03a263daa427769fe26d8e4f86566cb789c1bc9dfd4e214d78f26804ca42

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.13.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-0.13.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e32c66c3396bfcc700beba829f13946c84a93ff12da698fb7b0af38fe5040d1d
MD5 83d463ebd3b53b513ed71dc0059f4bf8
BLAKE2b-256 79b255bbca74c0f1ff08a1c35613405d7a3cfa14f4cd3565ddee4be44d5371b5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.13.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 560bf03ae87557e8c7c4977247d5ff3d9ed645dd24f76d2e9c327543520e913e
MD5 6965b9e3a750dcdf191b1650517968bf
BLAKE2b-256 7f1fd89c3d2bf0aef06e9babb7359a5a4d86624dfb60d4c3aaa81147463ec737

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.13.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 45f7d661d58c68b7e143c9d1f9a283b43284134bd95cd50f1c46f3d3a115999e
MD5 93bdfc13a848dff81ceac58c525c003f
BLAKE2b-256 6ad7135a9b5ec7fcc7f151155f9d6b026203954392a40b4d73a2a132c2330170

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.13.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-0.13.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d1c1a05fb4247b6ebacc15432930831ff5c3be40d005cb797ddf145398844873
MD5 cdf8261a6557fd45a47e338043c8f618
BLAKE2b-256 f0c706fe699ab45aef90b4222004a2b0d13fee4dedd6b1cc9925e90e195bd39c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.13.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9b38bdbf784d32b436d203718499c9cd43b697f8bae923acf4b85a2f771bf3e1
MD5 d48a11fd4350291f9297fae56bc740cb
BLAKE2b-256 91ba10efcd96fd4977f280ad698b572da2c4b1afa754cff689eb20790d81a934

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.13.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5f1526922510268cfef5ee54849bc0ab656ed0fdc24d794cab069b7ea6329953
MD5 fcd1dc55bea11bb0635e766d305cfbdf
BLAKE2b-256 c99f49905e7fa2bc789b271fc7690438f7b3bd8761c7ee8dd29ef78532fdcd11

See more details on using hashes here.

Provenance

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