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

Uploaded CPython 3.13Windows x86-64

openbricks-1.96.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.96.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.96.1-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.96.1-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.96.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.96.1-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.96.1-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.96.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.96.1-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.96.1-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.96.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.96.1-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.96.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.96.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.96.1.tar.gz.

File metadata

  • Download URL: openbricks-1.96.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.96.1.tar.gz
Algorithm Hash digest
SHA256 f8c7ad23f31ddc9ad6f1a8ec2387afe9f837b18b91cf02422f93094fa84a2e5d
MD5 860c96234e2abe4615de2ae541af457e
BLAKE2b-256 16fbec35be07e04e669f50e3d94162e49787a0fb95bcf473311dbd47bf5ac90e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 bc07c2abf4243e65f03b581f7bd9c0f8aec0cdff7ceb79b5db8b75f00af80fd2
MD5 e98d0486b82ece25965b6e3fa16bd611
BLAKE2b-256 50de3ee96e697b204c8e105c7728ac88a963c662e76039302ff94c4d5b5d8dc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.96.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.96.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.96.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 877b269208ac44817d21c43b4677d0e635e5a08072f74de02309ddc3459349be
MD5 3bd21526b41a27a200261e58617188d3
BLAKE2b-256 b976234528d8569241485dadd7a96f7087a8a8be752d230e193f71db887d47b6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e083d3b7685e1410de6e3375c3e86ce462c3e19e554ca0765f1b35292e893e22
MD5 db8189927a77d9d9d997cf1d37728731
BLAKE2b-256 a31cbf373dc28390c0c4324bcc1abd852bff4bc1569682027608899c7ea354ac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4e18535299592001e2d56f5b569b5d083ca5abf9fd6446f14ae21297fed568f7
MD5 cb2735b3aaf198d1d44f919d488e917c
BLAKE2b-256 43bb3f1b932e404ede3f6431bee2d2eafbbc7e8abfe83a58556f915b745021b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.96.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.96.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.96.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c6ccb71e1e3568ae55ab9a38a4e23062c467d3b10dfd090b82f73ae4444ed87f
MD5 cf5c5caaf87aea3bfbac59bf583f6d29
BLAKE2b-256 674c8f4eafed93881a51d635632f9bdcb175cbfbede9645a3a2592e3dcc1f973

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 525505f4884d4141a9e9acd475ef25b98e91763fd59649dc8865d2de53aebf08
MD5 661eab562201a1c2e4169bb9a3bc69ab
BLAKE2b-256 1e85da7ea39c8b5f6283f6c445e36cd395061919d3601c883a5e619880cc995d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ed67a7722c7eacdd744e4c008f1a39b360d23f4399edf1bf10e5ecff7cb8e3e7
MD5 46430a7b526bbc59c8cf63f7fecc841a
BLAKE2b-256 98192f146336cdb9463f2374b566d42fdffe6bef06cf40f8b9e339835fac8883

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.96.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.96.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.96.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5f978e9711e78b4aab6db283b50968f5329b3d5da3f14478907d998d287b8c1d
MD5 7778b9da5322f51bfb2f031d865137fb
BLAKE2b-256 0607061ff748b9578c98f62f0428f8ca09dbad457f1af3078dc6772fface0b04

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 77c76e93ec577ea9d4d62ac798a9852004fd2b38c246bf40bc309bd8b66fdd16
MD5 69fb3e52e18987afa8c25e5576f2676e
BLAKE2b-256 733559f1dc3e8bcd2b2f86067503128f9da32c4def66d468d7c93c1f440bfdf7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 57b0649496aeca0f6963340b455ea9a57bc8f1c6a2c90c4e2885d4b8dec18264
MD5 a446b4ef532c4f347c4fb466a8b71ce1
BLAKE2b-256 b98f449d44b1a04040f4ab2161d38b0baf6dee578afb9fb53d9db751d661abf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.96.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.96.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.96.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 cc34295247e75a9d134be78fa0373ab8f42813c415ee1a9f12b497ea10477a16
MD5 2fbf6353a3f635dec41b32fb054e5e14
BLAKE2b-256 c4434506cf4ffd73f00eb6c635260ada1c041d360842aaaa2c89280bb22a5919

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6b20a2fee6fd678bf2acb4541044900cc437238e64c75703632ae56413806339
MD5 f4bc16a15ba29c6d15430a10c18f2bd0
BLAKE2b-256 550d34b0d95ec7d1bc1e254bb4e49323d676f30235a73dda21ede912487d7f2b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.96.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.96.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 afe130cc8eed8f680989bd05957106afe1a245fa5e1159b359708c1accd516ce
MD5 54f391ea511b4bf61d9907408b83f58f
BLAKE2b-256 ce680bd8071afe767fcebc504de05c3970c84a4e00075d6cb070cd72d66b3e0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.96.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.96.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.96.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 dfa376af0a2a9f7fb88e9bf0e9c207b3a3a4a864c57f51f8beee89bf9e038806
MD5 1f2e3b9f3454dad78fef990a1e8f6ced
BLAKE2b-256 0772d8e934ca4e075b82e8791996f7a36ba0e83720cd794e267b124ac266cf63

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 fccfafd041511a8b5f37ea3252b74f806885a71427de33b5819882b6593e803e
MD5 bdb4b9d7ebb4994f0b4dfe1948da094d
BLAKE2b-256 8baf5213e9656f1bb992a8d783466121df3d7835dc4c3fe610fe349f9e3c7a0b

See more details on using hashes here.

Provenance

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