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.9.tar.gz (17.2 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.9-cp313-cp313-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.9-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-0.10.9-cp313-cp313-macosx_10_13_universal2.whl (17.2 MB view details)

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

openbricks-0.10.9-cp312-cp312-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.9-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-0.10.9-cp312-cp312-macosx_10_13_universal2.whl (17.2 MB view details)

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

openbricks-0.10.9-cp311-cp311-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.9-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-0.10.9-cp311-cp311-macosx_10_9_universal2.whl (17.2 MB view details)

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

openbricks-0.10.9-cp310-cp310-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.9-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-0.10.9-cp310-cp310-macosx_10_9_universal2.whl (17.2 MB view details)

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

openbricks-0.10.9-cp39-cp39-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.10.9-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-0.10.9-cp39-cp39-macosx_10_9_universal2.whl (17.2 MB view details)

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

File details

Details for the file openbricks-0.10.9.tar.gz.

File metadata

  • Download URL: openbricks-0.10.9.tar.gz
  • Upload date:
  • Size: 17.2 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.9.tar.gz
Algorithm Hash digest
SHA256 234170b05c93e7e3bb056e9cb44c00d62037fe29e1e0815cfd33eafb452e2989
MD5 9952b07210681f4b4df9e1a13d56502e
BLAKE2b-256 821c6f88527c20ed2bc43e8976f95217734cd1d6dfcd572820563819eb4ac806

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.9-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 17.2 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.10.9-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c11f51742ac62ced7b8d088f6afb112a2ef141a5046c31cc050737c65332edc0
MD5 a04f50d449bd38f07f5717dee296ca6f
BLAKE2b-256 34d3d75a98e34750f2dc5e3f4cbccc701ed6f6e4af5f300a5f0aa355fd1764e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.9-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.9-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.9-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4f76720aea929d30d1e110f1d4a53cdf4e192b2a8721fef9ef25dde8698caca0
MD5 2587ada50ba4e0e5865e5bcaefdd372a
BLAKE2b-256 bf1eab659f1d899c0a3e45666e769ea52d25c68c32c2de6abe7bbed5c4c08c94

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.9-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d3842f55b4845e4ab019c0c9014cc6075b6ef5c56b69610eb57ff9fa00d0449e
MD5 71ed1a6645a1406da0d71727c93b5095
BLAKE2b-256 4168a701b86f3eb72f9d5ab1ad5a51ed46f0edcc60d24ac906f0b4bdfd8466f6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.9-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 17.2 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.10.9-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 77337b7773f76046e99d66612758c860b85c764d630e4aed69dfdba4e81e8a24
MD5 4cb471c262c1f8212931b49492f89997
BLAKE2b-256 d32e9a45b8fd1514decdfa496f3294b4b88f7a333918f20f4404bce904251921

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.9-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.9-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.9-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8449f1922e942a9c996800e1ed169582120f2d8a208fd6a4e65263af323cb961
MD5 44f410b5d93e5e3298582d69a8d6c96d
BLAKE2b-256 bc7597a247f73f187ca9d09095b722e828c040b2f2b865fd0a20548bf947e99d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.9-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 821ff286f412da85f362dd264a28c18160234ff20bc11b595e07442667a33e23
MD5 6237c2f8e6ec29f158e6f60ab296ce36
BLAKE2b-256 b856414ae7c25c875f50334fb611a707fe67312f1eb17b27404bdb66e1ca19a4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.9-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 17.2 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.10.9-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 707162a1b0cb02afad8376a7e24981f1e80f5837cac69e31737d97a0ec5eb110
MD5 2d35459612bffca37993d2d2220aa920
BLAKE2b-256 e70b351915827ca612159e7334c15484bb8c60d33aebd0b479e4a6b9799287f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.9-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.9-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.9-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 708af27444b08ed1b6565753ec5446471a37b4d3945c79101474fe90fe72ecde
MD5 c93b7828e6f2dabe9ab3bc48896cac35
BLAKE2b-256 46f55bb2d373cfe8e357d7c9ef782c79bc11efceaf35412c0c0991d25f05a4ae

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.9-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 999a118cb5625a3a25e29452bdb78228293835a9ba803f3ae39b311a836e6cfc
MD5 2a2c789b2d717f9c1f73d1cfe47c72db
BLAKE2b-256 89e386bf52e1e3ba00bd23f9dec59d6a3abc445ecc5f0b037785f12fcc77705b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.9-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 17.2 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.10.9-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9ebe51f03d7bc746823c6b65576ca3ba6bd74e171f9b6fb75cd02fb508d76660
MD5 e0b65eec8142be4b09d868a6b29d888e
BLAKE2b-256 9e56ff58372f9ef797348250ae9a3a6483a467e3bb26ff82c9afebae3ae4690b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.9-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.9-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.9-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b6409a06cb7ae5d1245b6befba6da81c6f0fdf92b2bf7e60dbf5a72a3d3c4874
MD5 b49d9cb3806c38db19dc09210c5a61e5
BLAKE2b-256 6720153d26a397faf9df2ad4e022b8914056c4c8f623ffc4f083dcadd5ba5766

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.9-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d30965a7de682195a73340ab4fb3492a639aa40bea3761d4eab9436f3e10e4bc
MD5 f2053df795ee678e968cd76335ef33e9
BLAKE2b-256 d50a3e96595c775e0f2e09df7e2a7104dcd9f0e42e1beb1e4fd3b4fdf321e4cf

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.9-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 17.2 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.9-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 87ffde6f33e003edeb9b13a8a15e54bfec48fbf41589630d04959a6acdaada79
MD5 d3ec6cd61373b437469c83368dfec8b2
BLAKE2b-256 49e0d764d473a604765c2b9878355019dff2f00379f34aca23b53b4748b7ce17

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.9-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.9-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.9-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4667a16b975db9da323318c167a306044fb46d05b5fb662ce5dc5a9dd497206d
MD5 edb502b1c47c9a28e64229690aa9d3dc
BLAKE2b-256 e330b4c4cb6a490f8b0d8627c8f5faabad3af5570e52df099131506bfacc0e19

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.9-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f52d4f64863674607f5fa8d6a631c682b279462d25216dea1206c2754d67bf22
MD5 39a22ffbac9669914e95ac3b05c4e79c
BLAKE2b-256 fc18db07ab816c3c03173583e17737ecb071463b70197a41f0673dc6fc455273

See more details on using hashes here.

Provenance

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