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.19.2.tar.gz (17.4 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.19.2-cp313-cp313-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.19.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.19.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.19.2-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.19.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.19.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.19.2-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.19.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.19.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.19.2-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.19.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.19.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.19.2-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.19.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.19.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.19.2.tar.gz.

File metadata

  • Download URL: openbricks-1.19.2.tar.gz
  • Upload date:
  • Size: 17.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-1.19.2.tar.gz
Algorithm Hash digest
SHA256 d8d2e14e30c8908d672b8d69130385017b5d6582273dd12e99ef3c91ac4de34d
MD5 1aa0c40b4b0a353ca378f17ed941d858
BLAKE2b-256 bfb21a89a8a38a5d737e62ccc5098bf0b7214575f03a0e455d4cb7ff7f087440

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.19.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.19.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1890a96d91977b5becd15de4f60722ae0581b5fbab895ded2f1a1d3be5cd85b4
MD5 a03f7f946c48cbee247ec93c61befc74
BLAKE2b-256 e96de58f3e4d7fe2c9397a72aca7d6092c6c6ab12a11c210ff9fc025601bd60f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.19.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.19.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.19.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 831e350fe0e1c16e2c6973a53324da1feb44f2f522282670870c9af0a698b33d
MD5 c7e033421a4e667315ad055797651405
BLAKE2b-256 f4ab808e628b416e653ae5f0a00e0610f2f477984ceeea90489ae592041f607d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.19.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e62b56dba66c9ef2c87a5feed70d8f399fe0c82362471cc62ad5e1ceb1f55b34
MD5 db8f53965157d8046ee6a0613f05ba96
BLAKE2b-256 2045375db6c48276156b193068765cff4430a649e42d7c3b154de222ac721ba3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.19.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.19.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 540f312039f8db14249c0dbe88d402b2bfe88910647196c4caf1a0f01ca32d82
MD5 9b56269382eebfcc98d39160f7d49f5a
BLAKE2b-256 bf3a9fdaa96582223665a65b8cdcf34efdb18162b4dc8754629ad701b75c207e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.19.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.19.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.19.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 09d815bb12421426bcff2ae39bec2d23510d242db56c5cfafd5de3a67e522263
MD5 e92e61ce88c3d5e45cb0a81a03581040
BLAKE2b-256 b4cb9c1c36c05887a504c6f5560d04a7b4a75436a05c2ae8424b08eb51d5f536

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.19.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 ffeb37e34410525d789ceaf1eaba3169866f57f642c7bb86997d53403cfdb705
MD5 bd03f47afdaab0ab803b56c5b5a6efd5
BLAKE2b-256 efc762ce83cc6ff5778edf15c4888e0d4d6fba3cb0dcc6f76ae6b552cf0e4f5b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.19.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.19.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cf65b1782f05064941f4897c965459e0c4c122acc182b01cf078eeb83803a7bc
MD5 1f8ec71426649e05483c549a6259372e
BLAKE2b-256 e6c7754aef9cb4bf2936f9ba47b5859fb805bfa4020910f61d9e53145937897d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.19.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.19.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.19.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d3495c5d4dfc0bc42763620a268f1eb48664e653d88feb36aebfcc0c4ab3a884
MD5 9ee7c25037771bf855294464278b262b
BLAKE2b-256 8c4188060049d716853a9ce1297f207785a0aa805896a34a1baf4ecfc92010ac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.19.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1e886f45b4492a8d192bf4ad09b581d7e6eff12228872059c7282f09eb655875
MD5 52e798c7f39f029c2f5acad7c6407803
BLAKE2b-256 55ddef6458d3b636b21e93be0cb0d947e485cc54d8ae4facb24c8a5b7161c5c9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.19.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.19.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 114cefcde5a3b4c101dcc0eca8c74a450617b1105230bc8f1c4b3bc6c10861f9
MD5 db162cb4e3dc02c3c67292f4e158a8b3
BLAKE2b-256 32cfb576b1225ff8e97a95863daf02d486a659e96276c43ece563b69e0a68123

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.19.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.19.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.19.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2a0fb2689d0cda34a8d1b14929f39a22ab0b7c1417dd65ed71b6ee2819dfa93e
MD5 917c928974f911e0ebf71b7c9366dc03
BLAKE2b-256 48d1ff4e91240a10915ecb5fb9ed837e06ed10e0fb099b06c2e9ae4c536074bc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.19.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c43cc441b494bee90206f72eaf43842b652a1a9baf660a933be5e43fa66ad0ad
MD5 eefb0158008b37cb0196a8ed066366d4
BLAKE2b-256 ff50a8b0d18bd769ae7a8b67fdbb2dd0fc81b29215973f6083d15644a7794e97

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.19.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.19.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9e950178d65720251de37c98b6b143b3dda548e002f9f8f150f61e0c62411ec8
MD5 b87fb2627df37172cba37867dfdef8d0
BLAKE2b-256 38f832ff10e481e32c78d06cba6955ede65d20bb285ed631c8c1c65d1dfc5622

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.19.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.19.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.19.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5de0472c85b8b8837bf43fe8a9615f90603caab4972ddc232428607adb87174e
MD5 ffa9fbbff1012de06d5ee5411263c07b
BLAKE2b-256 3ab4a48c46814d51e6e26356f4445af3dc49de2a07940cea0bc8baef45344cc8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.19.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ff62636a2ac24e870db47f74d4614b86d7449d269d7911752321f025c15b54cb
MD5 6f72f3350f80757067f73d6b9481030c
BLAKE2b-256 79d7fbdf36bf703d5ba0d3bd419d9738f00e9c3d21abfb3b92c222b9b79423a8

See more details on using hashes here.

Provenance

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