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

Uploaded CPython 3.13Windows x86-64

openbricks-1.85.2-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.85.2-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.85.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

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

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.85.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

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

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.85.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.85.2-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.85.2-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.85.2.tar.gz.

File metadata

  • Download URL: openbricks-1.85.2.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.85.2.tar.gz
Algorithm Hash digest
SHA256 98ab0e5dceb762773564d2041937b23f874b26992e0e4d3cb19f62d2e8e776af
MD5 4f8d85b5abfc2a6c9c27c05f62086fee
BLAKE2b-256 b6d9b6c3925ef3b0768bff1a6ef9d3f1f5ebdd6612c3413a3c95bc8bb25dc46d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 178732cc78003bc50cfc0c0b4e85aaafe6d3ef16ec9bc28d54063baedcc294da
MD5 a182c50f7abf3efb2cc2c2a4be3cbf3a
BLAKE2b-256 1c8d3fd8ece9377e4ebca4791141c2295b35a32ad4349bdf11616e1b384c2607

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.85.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.85.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.85.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3c77089de4bc99dd5b005747ac320b058bcb712ca801ab655e0aa26e2f38d292
MD5 394129eb8f4afb05265952a9549d1c7d
BLAKE2b-256 19dcb18b4145d3ca22c8966aa5e99f55c227d6d05cdf836cf11f6c7bc7972625

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 24dde4b29f704d562e34ed9baa2d1846124a56a574eddb64ac5ea94cdfd8e845
MD5 dae22d543273dc19e7475626f3c70721
BLAKE2b-256 30bd1ccbc08e89107baa1887d0f00959f6f439dcc515173c90e93bb92c05defa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 45d07120400f91dc9ad45eaa4d92682fb4d0781c8c5430d403cd22f737199238
MD5 5498a2aab13d9a586136244e0bba2c59
BLAKE2b-256 5156f03dfcfe400bcf863729f90be5681e980912ed4cb8cbddbd41484c3b65fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.85.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.85.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.85.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 728889c5a0d7c4edafb531c0a800027cd11441970a07d07ab826595085fd4919
MD5 426aedb5a6735a75d8c2ccb150f48f9a
BLAKE2b-256 aaa2cdc9b562bfe69bc3c4a48fbd4fcc831e837e6cc0390be95368aac28a57ff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 7f4ea620b3444ec4e4e82da3d1d444eeb94979209e5cb6960120d46c565d644c
MD5 ddcb387900e4c8497603d97bd7301f64
BLAKE2b-256 0061c9ab89d31c5dae9a7eaea8b562414b227b7d90a995606786095246836b35

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fe6d93fab5662cdd6d2a3cf572bd33cb2df3dd46ca6a2fb4555d70d099d5596b
MD5 a879622ee3f5e94caf32f0aa8d3445e8
BLAKE2b-256 cba043cda488c848a0664e8adf0c5ebda0dee681fd29f950ab9af6954ed526ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.85.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.85.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.85.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2beb6196899d1a1ae9f958b7b1b4f3de1fdd869763345f97a7acb96ae2e367e0
MD5 9106db8919224464bb15d114a7117fd8
BLAKE2b-256 ca60b9ef05f8a1ccd479ffcc0d2b0e191cc57951834114456322e83028163af7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 be00faeaa5f1fb16d646d41c49cd3855c0fe3bbe4bd32212695d2934062c5f54
MD5 14237a7603dc897e903731510a8bd72b
BLAKE2b-256 15d688a3983e7b10523d64de73568fbc2f9b0a19ab3785182f2c983a1006c092

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c455581dba7cf46bf426e51366539d62254210da45b883c36b639198af7a3fe7
MD5 bac84d3035dbaef0a9823b0cf45e1c31
BLAKE2b-256 30c3431b484b01dfaecca3987f357b636eaf8bc987f77cc5af982e232988b375

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.85.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.85.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.85.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2098503e78c267ea37434c6ba34521f16e325a59f6e9cb7db8106153b14623a8
MD5 24a75a49cb2e2f4cbe2cb4e5f757500f
BLAKE2b-256 8db0cb968fa9c4ed7b10ff5ad9394cd4ee158862fe14ed51486c6c28f6e72622

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 83952fd478dfd68ac6f6615185af2ec09b5050e48ee4187e8d233c58241ee9d0
MD5 2b2ca968c34f969bad8a35d4d438923e
BLAKE2b-256 4bdab4c33d7ae12d55410448cd95d05c3cae3f73bd0ade4e7996a871a05b3630

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.85.2-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.85.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f15236f4190de0624d2f60efe41a9f02072b2600c849dc12a0d331a1984479a7
MD5 b6a05e27c47172054cca6854b1eda800
BLAKE2b-256 7a3fca3bc915ba6c993f7630d1b05c9a2fc9203f385d1e67dfafe57fed80afed

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.85.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.85.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.85.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 40c42d0be72d6f7cf6327dd103cb220be27d77b1096e4c713ec616315ccf0d48
MD5 1296371e0d11a1ab8da68cb18033a429
BLAKE2b-256 a89f6182dc707b544b756898db1cec95a1a668644240aebe2c43bebe32a461dc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b930f7df06932278f6197cd6c4385300c374907d61af07bdafbdc1877ce8ebf7
MD5 cb47877d47d7222109e6511470d295ac
BLAKE2b-256 dc61e402810bb82e7ac8d78dfcd792f3517b7fbff42197fba93094e5397446c6

See more details on using hashes here.

Provenance

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

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