Skip to main content

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.

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.79.1.tar.gz (3.8 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.79.1-cp313-cp313-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.79.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.79.1-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.79.1-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.79.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.79.1-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.79.1-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.79.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.79.1-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.79.1-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.79.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.79.1-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.79.1-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.79.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.79.1-cp39-cp39-macosx_10_9_universal2.whl (3.6 MB view details)

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

File details

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

File metadata

  • Download URL: openbricks-1.79.1.tar.gz
  • Upload date:
  • Size: 3.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.79.1.tar.gz
Algorithm Hash digest
SHA256 1f8515b47b15ef7db726499c22194176ee032aafd605d8ff928e40d56534834c
MD5 09cdf816545f61280a8865b6b5ec99ee
BLAKE2b-256 2fffc178a2439b32f1b09b9af20705843658f505963d00fe079ce34d9a775d47

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 acd4d50a5d344e003f916c73afcdab089920a4598ceb43204256d3a1b3315a15
MD5 261dbb0788e99a15f856ebeccc7d10f7
BLAKE2b-256 f5e3d4a3b567606fcf40c6b66ba92df6d61f3fab5597ffccad8f9b6f111530ef

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5fdd39ea08fd649c85b355ecfa96aff7ab0adcc39b84aa6f84bb88ac91b54ce5
MD5 cb29a0021c889dcbbbc0fd0bbc208c99
BLAKE2b-256 4d1d94a3d6d806e685776ed0b6ff257bb9cefdf00964a02e156a2608acfad0fe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d2b93df464fd7991370c38f721e754ebe9039c2fe85587f1f11bbcb5feffc3e2
MD5 a8bc076d5452d44825d7df7a95fa4938
BLAKE2b-256 92934a975ca77d0c55bbd8396fbd4da032df6f80e690dcd366b75c04e13c6a9b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3619f44d085961fc9b8a39b0fcea2d9284a6efd8551bcf400439d85405c43b3f
MD5 2d1bfcb9cbc2db64f12671d3b8f8f8b9
BLAKE2b-256 cbb6b62400e5f9c5ebdf16f5a0479ddca9cef6e6f2962989c83d691e00288f99

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4282bd538c80d32a203782e1e0a0c1fa945dca3eb6380ebc6e3d830039767b5a
MD5 1d6ea3c1404ed36837d7291738cd6cda
BLAKE2b-256 1bd1f4df5c51eec663b5112b0f54e8ba76a2b10c84291604f9e140ca46b57bd4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 0461e0b050e75bf12b8d94228c46b7cb10e5b9a9578eac00733d3713538404e8
MD5 45e6b94368bb490ba0b5e4df2eeae91e
BLAKE2b-256 eea31438cbbde44e5c1147ae37b158315f1193a346a13c8bd1693459679fbf70

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e76be183c4c704e14bb69764929e4f76963cca94ca86228dfac1ce0bd2ef267c
MD5 7072a8a9d3fd08c444279551322a6909
BLAKE2b-256 b2e37da81a3042f95c53294a8dbbbc10a54bdd52fa80fa06f7f2c3d60d485650

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8616943b78a235946e18270569f7c3c861494aab068c1a936ad1be8b6fab50bd
MD5 21104b4c35d1965cf20901ee17032992
BLAKE2b-256 11f79a29bc16bd4ff17ad550047679b1c947aa1b6ccc4db469d6c2e234745fe8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 799fae5194b2fffedb5c031d0e4723de835ecf562cfeaf1267bfa910ab636894
MD5 5b639d489a41e22f59def4db43837961
BLAKE2b-256 71ff2579cc8890b2e3caafaa35891c30842494126fde971f0c502d5d4ac8ebce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5deed725d564c705ad3c52e9e7ea635f48f9d0b0a912641c43bc4e1a837a544b
MD5 471a91d4d2128925ba21a91ed9d2ede3
BLAKE2b-256 b02433551a88731a03d11f5f238c622f89823fd41a8d949b468b52cce71583eb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9d1fa9826177805f18d864fd8b7552a6379f0f0c7839265eb34e780d74bf246a
MD5 104629df63e87864e25df4b81f50b2b1
BLAKE2b-256 5f0988564fbbba9ff06d1d0213940069367f34b2350517660bb839b2ec630ebc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4f9159695997514afeb1974e7a9f1d277197eef0060220f5c4a5f8c6f0fe5767
MD5 ea1b3f3cbd255d8a95c593041eb56b2e
BLAKE2b-256 4f861795b2cb5197ddc9a3a20c7c3d48f4a91ae0fa9397b00b0384388692925f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.79.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.79.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6cf6cdd26b1609c2d8f56ce11b12ab353d761ede6d19d449b57e1891fd87cc71
MD5 7e9de92f2e614496c3cc93abc2796c7a
BLAKE2b-256 af1a562526d2e969802689e9dd06b4ff517443cd9d11dd7ee0f393c61d3fd13c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2db2cfe1397d71978c6b686d1e2b60c51eea8de30a656e490586edc4b213606d
MD5 9702b325858a6cd0ef87cad7306bc526
BLAKE2b-256 162e13655749292a6d3a1afbc0359b0872e969772b5f1a735e780bafae08fa19

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4bcd2d9858be037af2d8b0d15ccab6c1f98afa32763d6cac4b2de689c2d18c20
MD5 e4953872860ef9f4182d753eb23c8cc4
BLAKE2b-256 afa10e34ad4d44a93a199d1c503e92a3d538890350530faa3fa947a899dc17e7

See more details on using hashes here.

Provenance

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

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page