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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: openbricks-1.15.2.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.2.tar.gz
Algorithm Hash digest
SHA256 9e1a5647aa15e28599642ea939cfee88e5a24e454e96d428049584d87680b9cb
MD5 707644be554ab9c093a9e283891e7ea5
BLAKE2b-256 900c8692f2886214769bdae8ed83335141f05dabbd6749418200fe6912e7d141

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.2-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.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ab37b111e50c59defb697554232fc90aff706fb6fee507393fca5dd823ea4443
MD5 73d81b4b5b25899a74887d974614a266
BLAKE2b-256 dc23bbc0458cebe3fbdd8d47a5959d831b6ad8bfa28f638474c2055082520a28

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.2-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.2-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.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5b8ee36423e3e1b053f9daeeb59b55abe0cdbf5a289f4cd82733f9d88c62379e
MD5 fc8b88fa50cae3dbb7d92a4c50603af3
BLAKE2b-256 022b06c6027d15f36622a543b956a6754dc6d5ba74cb3241e02c8eda892a9caa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 0252d97cbc6b5cd220dd1db3c17b5fd85c1b59f92f124d0a9a19e0c86f5aa389
MD5 d319708040abb4e347a64bdc6a5ab826
BLAKE2b-256 ec15ffa9176838bdfc4c84f70cfa0f9377cc888198c0885fad08b13c5a0de8dd

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.2-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.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 71c09ca4d8ad49c77e10e157e0a6f124a169add3dafaa461ca635db80c9784dd
MD5 fa2e6d19908abd066af2821d99377c2c
BLAKE2b-256 e40a8237fea0134c7a0fc795932a26cca19dc90f00e73c7410086277c1ff8b09

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.2-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.2-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.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 83d8df4190b0722c6f9de794adb043aa1705a8870c5c720f633df2c0c1e8b701
MD5 c6a8ed68819f0b4d12ee26725c37f9b7
BLAKE2b-256 1ee57a98e56fce20dbb95a00b3dd90bfd99900268432a67bf7727a05a4cbe243

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 c7102c450d26c34f6997e967cc776cc4f7b91f65ed5031151a1e4a413d4294a6
MD5 5cc4bc20e3f83b8da8c11083eb53e6a2
BLAKE2b-256 08a797443da5154cada999dd62fee830ca3be604ffe3fb7f07b09a8bb316596e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.2-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.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9acd11e40d53e48cd0a388aa1ad22978ba78af5e778fb1fc68d72ee22bae3327
MD5 65615f6869639e047fa22bb8ab4abd2e
BLAKE2b-256 9bfe29ac33b06c48798f433afb44f96e079040c82975ac0e5481bf70e1c4ed8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.2-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.2-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.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3fc27f611f8f8e2d39ac1555f437644f8be02a505e8598175f26def915731c87
MD5 d5c4135d4894e78841a1b58f7432c1b2
BLAKE2b-256 539a29d4c5e372a3d2dcd7711d27e46b4bad75013ccf29f15820e05a6fa7c218

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 46db34ed3e2ce3771cdf25174249a81133507394ea0fba4e22960c7b2bd50e20
MD5 a7198791f0234847179fe558d00ddd7e
BLAKE2b-256 8b3843308006ab0677772e1bed0df60006d78cd0e16b4531cd0dcb1c1abb8410

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.2-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.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6947285c940318556e903fe69c8047c2fccb83fef41643840a8a7d4933e3cf25
MD5 d9b02865340533330fc3f3430ab2103b
BLAKE2b-256 c44dd315b377b09f5735dc6b4ea225eeedbce7eb9eafdbed679415acf64c66fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.2-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.2-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.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 709700c5b6347dd809c4ae389a2aafb67f319e598e8b25494b630782029b5c7c
MD5 86bc0f33ad08d5060fbc4f7b14e914fc
BLAKE2b-256 05fc0a5d12848502abc8e8f710fe5a33a0f4a8c69d4dd7c64868c8d58c7f1118

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 255a24d448a2799c7b747a4f708f8d7b8c45825dfb5fe9e0a76d18e5d4ef3c16
MD5 11d10eaa9571bef58069ed65c25368e5
BLAKE2b-256 595d13b10e3d0a7812d7b1b2e4297bd420b2a81e55844a6daf1d60bed0a37930

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.2-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.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 71cff6ad04215ed2f2150406aff792edbdc5f565335f84ba3b7c0cc3b8c1b7e6
MD5 cba484da63c0feb7681646c1ef08c726
BLAKE2b-256 64c3a3b83370dbf4d1f929ca26c45c350d161739797aa01012951196dc2ef93a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.2-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.2-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.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ae578f286cf8352e18ba80cf9843a86157501d72177dbd7ae1d8a4cae1076735
MD5 e18976ab3c11e4003d5092b3f1c5d511
BLAKE2b-256 e77097abea1dbcd568bca86bceb07f93292088309f4d3b7800d351e2c84a6739

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 465e58fe699699863a7c6761fe139edc0396ded1370c4289d49b46ee8e668536
MD5 76fac37b9d9980b4e07eb1d7c1008d65
BLAKE2b-256 8c0b2619084d081789fb1a8bdd2294f149f34cc5c898a5a36744dbee8cd40635

See more details on using hashes here.

Provenance

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