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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: openbricks-0.10.24.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.10.24.tar.gz
Algorithm Hash digest
SHA256 3701d5886b4b4bfd45bc1fb935673ed5c64640c49c3c936eb70198ea6e13dd86
MD5 8a1bbe5c03e75df99e202e7549d54eb3
BLAKE2b-256 4c399beac7891d60338b9eafcb39e609e3e095b7470604a3ac48d71c81f35794

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.24-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a8b275224d629c9825ac017e2f820ff7da31b38731fe89bbd11b5b57d96a9b84
MD5 ebc916d6fed3c2b7e4e003ec3452ba12
BLAKE2b-256 14a338ddd3e4cd90eff1bddc62baec308469b749f4105db56e345e2476cc7632

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.24-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f49ade38f22e695994a17cb5d41368f5308cae54a5e1c1a0b590b84a86d6ca09
MD5 49492cd2a4e532556353b503bd374fdf
BLAKE2b-256 8f4916dc02c37c94d17439e76b08c50f3d62dc126e07d9de8ab8f689e75e3dc3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.24-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 4366d6b548a5baf3a4537ac1ca5e7205ce7ff473baa6378d1a2e1ec8b36a302c
MD5 3418e6af6f93d44f2b7d438f2aa77819
BLAKE2b-256 2d9103efdedc892f75d36a3926d12e7f6b80072ac5e641f30535c978365ef834

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.24-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 59fb914f0cb73dc6b8b39d309e6b45bfadbdada49cc17dbcbc8971193ac2b9cf
MD5 a40597722106e9733293932f0f907703
BLAKE2b-256 92958eddcf166bc19c4f49f73192e86beafa4edd56562a8a077ab3f3e69f00dc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.24-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c4b7d4419917eb9b602210ab365693fe5bd9c1457eea59f05083d2b10764d86b
MD5 961553d39b176003a5cdb2e101b88d72
BLAKE2b-256 8dbe60956a298373627b4986f210bf890f5395f2a9d9da59bbb5e2f92e58074a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.24-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f820dd1caca8649544254230419ae651cf4c5b8f8a20d75311f3851455610d84
MD5 7ca99c3a57cd4df5662e54aef875094c
BLAKE2b-256 ca312f4449445b241b8a1a60279f45980f546f079a3908791fc579e7be69ab27

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.24-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c91f17338c6494f86f14b245482076eb6290dbf326cdf87e71f26e13e82348b0
MD5 0654099a9dbb034e6d82e3ddf9fceb1b
BLAKE2b-256 5776a9a5bba6c1ab3b762e607dbfda773c34208deb7ffb3e9cf4455d645c549f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.24-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 db240ccf8684ff4073607271c4cd2d3698eff6f478594ebd8d7e19fa77eb01a8
MD5 fc7a6e762285e963c9bee49f771e25f4
BLAKE2b-256 289527f6f5ca6be5c27d7b77f01778201d1e77118fa408ebd019fd3d568bf15c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.24-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f9d2e4da7c1be1b091ecad861a67041775eaf2e3d93969630b404dc7780c4fc1
MD5 47cd03c3c3713b65212b2aedeb44ae2c
BLAKE2b-256 98debaa694ba622732f7bddbd866c9107f5879b7516bfecef9f5bf584c4e638a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.24-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b67c720dc5edad9f8ae093b3d818952cc38e4ee9803f8626e7e21baf1881b8f9
MD5 0e1d0f9016f27b24aef0391cf02b37d2
BLAKE2b-256 aee6f4db70489c3c7169393fc8cc5a11a0ab66883347936ebe6dac55cc1b7738

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.24-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b46ddca96847d9f631737dbb21c1e9115444c49323cb76b4a3ef21ae87ca10f1
MD5 68fd96011224829c2a1b904818edc439
BLAKE2b-256 01930ba386f78cb66abcd28066f12658c6b5725674c6e79077e43e10cc1e6c9a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.24-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cea91a6eac048f1af90772669962809e63677af28adfe52f1d5073c5bfe1c399
MD5 779b8093b0d00f5806fc11c6ced057b1
BLAKE2b-256 c73c42ba31ce12f038cc69759bf11a10155f988cf295ba9d47be7039c05d7357

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.24-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.10.24-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cd4ecee0709676ac278235fd4896f5023f4cd0e4d9677956d6a08dc54f264f9d
MD5 1ed667acab8f2ad9fd28f6590e16a5b0
BLAKE2b-256 c617d94a512a917590b28813cbc95225bc1a83e79482fe342d524a2c99092762

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.24-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8682d0bd88cbcb209b0f8da9500273b3c421318b1d5fb0090a7f4ade36e06e33
MD5 14c48727cfed1422f523c0033c95ec1c
BLAKE2b-256 9460f31f75ffc6fba7252da6d652c89d88fb8c05a5c0ef4a98ea2f6cabd56bf6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.24-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 db72100c5694f9aea8a757edf06cb5b477946d673a5cdbf1ec0489d10805ae3c
MD5 0164357c48adfda6c4df3ab1192c6233
BLAKE2b-256 e37625e73a398bdca81f7b8e4e33f90b9202769beb491e28c2b31832aa709733

See more details on using hashes here.

Provenance

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