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.33.1.tar.gz (3.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-1.33.1-cp313-cp313-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.33.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.33.1-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.33.1-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.33.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.33.1-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.33.1-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.33.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.33.1-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.33.1-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.33.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.33.1-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.33.1-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.33.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.33.1-cp39-cp39-macosx_10_9_universal2.whl (3.2 MB view details)

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

File details

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

File metadata

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

File hashes

Hashes for openbricks-1.33.1.tar.gz
Algorithm Hash digest
SHA256 3dafb0e51737d5067e6a964b0add5ace5197214fa081cc3629340afa71a79ec4
MD5 5b2816a3697d21342e94a929385d5028
BLAKE2b-256 d2a8e948a184579f60de0c674597cdff2d9c77ba293b3ad6535c3b4a23a11212

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5870392c99b9a7cf7d7121fd90d922c57c58cb4db22668db88995f3b439cd66f
MD5 fb4522637f189cb71a03c88e50a87d0c
BLAKE2b-256 387a6e49afd7a6c9db93a43b541b34b67f7be1babf2d47a647ca9465b7d521f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.33.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.33.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.33.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c59016810d8b4ba5ee6feb2a2898af83bc1165a44a157c75e3830fdd8be4b7d4
MD5 48b867e4412e88f911a608ae37de7ec3
BLAKE2b-256 ffcdf6add03af0a77af52d60314da491fecbb6419a7f2fc01bccba41a48e5e27

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 4d7f62b41597b00395dbc198cc6fd0ee02a690dd2d0878dd01542e9aabc0df17
MD5 d8433047a98368358b766e6532abe0e9
BLAKE2b-256 86b9f39fbbb8d73461b666be349a01349deed8257164c72c6383ab7f3f10a09c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3744beb668bd63d433daefe9e3bddc75a07f63fc2d2437594b978c9a30c062ee
MD5 a9dcef009e56bc560c98ad57fe89c854
BLAKE2b-256 e8097ce256047f837dbf8dcb3b644ddd30849531a23661c73b5e6906eda9d167

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.33.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.33.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.33.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d40084d5ffa936e393676c2527967851f62dfa21eeadf2c6153c50736797327e
MD5 19594a35e935117a682a438f27336f3c
BLAKE2b-256 2ce5dbbd719bf49fac5f0bf159153e62b66d280253966c277b0e18ecb9e44cfd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5a13863f556db146253ec442b6cb9d5e74e65d22902454adbf5d80d981e8bd4a
MD5 b3d6eba519edd5063c8ea1879fe05807
BLAKE2b-256 baffb8715339f87568efc981c76b183eb5dfa1da39763826548a2d62260e6d3a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ef8b52b216c694c08ab81b1a259e20431f4aebb1c86e55dee13727c7606c8e69
MD5 49ca541260ed449c1ca817469ffd6d20
BLAKE2b-256 ddcd5b5ffebbcf38f159ee5048dc810ebbb74836907246e2bcdbe650e408574c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.33.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.33.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.33.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4dbf5b5dad404d010f305d1bc137f6cfa2145a7c71e7f16a74af6664f145bf40
MD5 2df4256883d78344bf05f6f52adf8bf2
BLAKE2b-256 6f1d2842f3b570aaac7be027251d195b16548f2e2f2b10550f868dea951e645e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ba2de81f228c630b543a0a29689c4a2ecee824844bfaa02072f75e284614a11c
MD5 2e452f84a52e4465d4811df1da39863d
BLAKE2b-256 fcb240a13c105c6c606f53487d8d4b7ba0c819a30473fa2366e9f402372bc98b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2c2b228f8ca982994cea668a86ec864e053424a11cb7ab1c5b7c0c7990890656
MD5 d12728a57da44a7d3f8254c452532e8d
BLAKE2b-256 1c93e6e6bb133620b63aeeb0a898d9b74ed35b1ac852e2f93d09be1ff340b7a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.33.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.33.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.33.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f13ef235766dee3354a59bd4e9d1fcd9880d81565ae5171760dfe3787dc9b66d
MD5 62d9bfeb1e419a3e1acd04b15af1f7af
BLAKE2b-256 7785e32ba78cbc55131d61639a4b40cea85faf61edbc4aa237c4943d2891ca76

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 01e3e427a1a9ec0fd20d9f05b7ddf9d707f989fa903cf38a7ed407184aaccfd5
MD5 1a5396299e7d527ca0021849dbc1e264
BLAKE2b-256 09a6c116a1416ecb5bb91904dc60fda4777a9175e6e3f504dd5b625031b7d35d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.33.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.2 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.33.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 deafa22ccdf5d1e8702f36e4243b7891e858ea696039d8151362b1ef66c2dc6d
MD5 4b46d56386581534ed095fb0a603b094
BLAKE2b-256 d30da81273d1a23178c17285b1663e29a072ec385ef317070da372c9a876dcc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.33.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.33.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.33.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 01696d977e345b277f258c710fea259b65594b7e6b85db98523ffa71aa58deea
MD5 314918f08fc41707f8373287c76d802c
BLAKE2b-256 fe827aa6f6fabc5ccfb98baba0f623e54dc224b218b706a4d99b9f5fc30ac615

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 62c0db6192fe331c1a2dde8fee8001618c554d58da5e421a2ae514c4143d706f
MD5 bcd63833e638c22931690b2ee90a14c3
BLAKE2b-256 87381660d9ef9d2fd77768063bda9f62194305a8e5db7bc124b93ad3693dd806

See more details on using hashes here.

Provenance

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