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.67.1.tar.gz (3.7 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.67.1-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.67.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.67.1-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.67.1-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.67.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.67.1-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.67.1-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.67.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.67.1-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.67.1-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.67.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.67.1-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.67.1-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.67.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.67.1-cp39-cp39-macosx_10_9_universal2.whl (3.5 MB view details)

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

File details

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

File metadata

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

File hashes

Hashes for openbricks-1.67.1.tar.gz
Algorithm Hash digest
SHA256 46188df2b85919a2dca3694f61162543f481096b33ef4b8140a02fe262f43c3a
MD5 fc1161f1a5a03b8ce789fdc105f17497
BLAKE2b-256 9099875f5465a1f0ceb4672c359d420376b56a86b5bcb9a442fc80a56dd63397

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ad032203b636e87cf5d2d120efb5b14f19dc4f304a02cde34b9dc566a1c37af6
MD5 6534b93681958e2c532464a9c1bac504
BLAKE2b-256 38a9cc310e564f0c1167aa0fd4ee0c3b2dad7f3dca9f03418164e9a7937bc9ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.67.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.67.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.67.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c09a24a502ba98168806804533f8ed639f56bd11a9ba6209b546ce8687d2911d
MD5 06d8f8d4c62db144ed49aa58414379c4
BLAKE2b-256 20a731e2a071f6814ef9c6faa959200f245b3d902873b869d87cf91833300e34

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 1db3b0cad40ebe41f55b548539b73d17c9cd2d8870579054f5115b66aebef0aa
MD5 5d0b6e9efe507fbf6aa4858c12772e92
BLAKE2b-256 8914f1209d0c8914a5f74b9313fe23cce34c3ebf0099d33d09800cee1e1c9f5e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3ec4a8e776991690b541d244270465d225d369dbd85344a36d8c15f422f64547
MD5 305ac1d431a37f6ec7a6d9bb6a4e0b9f
BLAKE2b-256 77e8067635456a94d0e6dc34dc063a819d329802f0bf246f969872ea15a659b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.67.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.67.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.67.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 03cd01f776889b52dff51c3d7c59e8965b49f8394dccbd02318ea94686e90c54
MD5 b1218ee5b0cdd24eba6f5452dbed7004
BLAKE2b-256 f67ce8eed61e5f1e9f24d28e0576dd85c6edd7bb5d763c37a1432cb31ead4164

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 ca0575031a2c2d2cea13db2ab4e98baeb26f1ba28602751564cd62148b71e179
MD5 58cc31c1b92a4fa2f609de408bdf1b72
BLAKE2b-256 28b70e16b38db573e6163e96ec85247655e2b60131557a1722fb5f4ad8330527

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e69023791ab23dbacc4f0383a21c379e23634b9480c6c294c99e9e26c2c1db6c
MD5 1272f60762455ad98cce5118bce4b44f
BLAKE2b-256 ac4617b93dd26014b73c58c6c3a253c15b7cc6cb8ac5bbb32da06364b24a119c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.67.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.67.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.67.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f9e0ad4ac8f483f89ebaea023c521d79fa391c11b76f0ab5db02abf4a6e898d4
MD5 88814a13b7d74b6827cf959fef19f944
BLAKE2b-256 10d3aa5e7753a5a76717431d4fb80dfbf3a64adc2de1b6c7253a22874e9eaca7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e2fbb1a88ffccd53efc42a79d0ce1bc5edc69003b75098d832133129d4cc1e4e
MD5 006aac46da68b4f7e93c48b4f6a2247e
BLAKE2b-256 01ab21e021406de291c0a25cc2863582e471c8e8f89be931f093c58c135baf35

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4483a606d7c492da5569cd84f45e2fb8446679a366acff9f0a30d85c63eeac53
MD5 72e2440580b39d33f86e034e9a6e281e
BLAKE2b-256 8797bcbbf0fb07b11d758534f0416fcb6bb3e76dd14589d1446f972f8744c73b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.67.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.67.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.67.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c6ff78d5496e52e0c1dff51b6ea95905461e7d55a05bf829aaad299c155b1ec2
MD5 ca5ba0b4ac69f931b0e8b57565e4c208
BLAKE2b-256 05ffe94a377d2278a2f0848abfcefbe10e234e2ba34eece65bedf2e859cb6d2c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6eb2f47bee7dcfcfdaa16b4e76ed860a91755d320d06f2a3069c3911158406ae
MD5 1af1943d58e6c4f6dfa4c9791002d8c8
BLAKE2b-256 951cab065bf1cf16d7f603f2d18adfcc5ddba6c2a11c3de58b2df50096d98f81

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.67.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.67.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2d23bfa77d8647055ce12408e4dfe2283b57366c252a748b5d5bc88cf40dc9d4
MD5 2fd20ad6000fa477b2dcfbd8fc097491
BLAKE2b-256 bab34c18a942db7160a50ebcecc5594fb70b6b2a7f602bbbea1a744f6e205c60

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.67.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.67.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.67.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c847afd62f1f2bce964738bf9f26f4fe2a6e77b4203f7bdfec91992a3b1b4cae
MD5 bfd512f25db956c6eea3ab2490d00a8c
BLAKE2b-256 a3412c9a1fd96b6716a361ed07083a28b18f45b7d37f0ef3977b5f4cd570abce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 dee9dad62181c9e82c252726c4546863f42107390e83d79b95ad00fec90721c2
MD5 8c15aaf97f10efa2254f46fde1caf092
BLAKE2b-256 743a7a5a80debc088dd11c393997384332109b928368ba0b99aa8b2a2cbdef9a

See more details on using hashes here.

Provenance

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