Skip to main content

openbricks — host-side CLI + MuJoCo-backed simulator for the openbricks MicroPython firmware. Flash, list, run, upload, log; ``openbricks sim`` for the physics simulator.

Project description

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.

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 (0.10.x): the package currently ships sdist-only. pip install openbricks compiles the bundled native extension (openbricks_sim._native) on first install, so a C compiler + Python headers are required (gcc / clang on Linux/macOS, MSVC on Windows). Manylinux wheels via cibuildwheel are a follow-up — when those land, fresh installs will be faster and toolchain-free.

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 pybricks-dev 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-dev
PYTHONPATH=. python -m unittest discover -s tests -t .

No real hardware needed — esptool, mpremote, and bleak are mocked.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openbricks-0.10.12.tar.gz (17.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-0.10.12-cp313-cp313-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.12-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.3 MB view details)

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

openbricks-0.10.12-cp313-cp313-macosx_10_13_universal2.whl (17.3 MB view details)

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

openbricks-0.10.12-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.12-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.3 MB view details)

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

openbricks-0.10.12-cp312-cp312-macosx_10_13_universal2.whl (17.3 MB view details)

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

openbricks-0.10.12-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.12-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.3 MB view details)

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

openbricks-0.10.12-cp311-cp311-macosx_10_9_universal2.whl (17.3 MB view details)

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

openbricks-0.10.12-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.12-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.3 MB view details)

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

openbricks-0.10.12-cp310-cp310-macosx_10_9_universal2.whl (17.3 MB view details)

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

openbricks-0.10.12-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.10.12-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.3 MB view details)

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

openbricks-0.10.12-cp39-cp39-macosx_10_9_universal2.whl (17.3 MB view details)

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

File details

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

File metadata

  • Download URL: openbricks-0.10.12.tar.gz
  • Upload date:
  • Size: 17.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.10.12.tar.gz
Algorithm Hash digest
SHA256 f3a30699d0ae0132e748f18285ca976b5bc3ba37a7662c50a9e1baf076ce266a
MD5 fb7cae442c6548bf4b9331cc0928a10c
BLAKE2b-256 fe12bc4a9ab6f21008cfeacf3819b9010a72d9723bee1b2083225f7c67010d58

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.12-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0bcc4cb003dd5649cae8a184c38e4afa1b9baf2d5a730364988d825cebcef5cf
MD5 ae0d1223b55303230f959f3b5a3da5ee
BLAKE2b-256 2badd7114fe5d0f7956883346f5cdc893e129d2b47692773684250f635610744

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.12-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 aca43b67449d28e2324070cd00f7b9ad1665ed2cecc727ed37523bfcdd992e17
MD5 4d4c86128f678742cf43400a7d3ca65e
BLAKE2b-256 0a601dd472f3dbb11c5e15f81e35048333e1b2ec9c814e8f512a419397c872ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.12-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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-0.10.12-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.12-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 9e9fae3c08ff8ba758c6f9a71fa6141f418114379b0152e04cd7f01cfa9cb820
MD5 170e64dccee3dd052c0714caf8595f0b
BLAKE2b-256 2461600cec569175811305e5052a9a272bfdcafb2b502d7d34eb57b38ff5fbac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.12-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a9ae810a1e69b3393f540591a32e5bb6e12b92fdb8eeba7d652f159a2e49e5d2
MD5 66e96b94f553f3d6b6e2574ef472d51a
BLAKE2b-256 3d41df3ba521353d324449f715c83b4ef7434689dd055b91c5925953843e733d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.12-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 36be39661fc7d85c413fba4cc1f8d32dc0db6209d99d8ef6edf24d152d2e9bd7
MD5 1e8f22cdae7b774a3c376e765d6fb290
BLAKE2b-256 cd517337d0ec01f68cb1881cbb9bb7197156b30de4eb0346a2ebed89f4159d97

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.12-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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-0.10.12-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.12-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d87e43001b026cd094343cbf22e399e74ecdbb48442689444e345b8fbf047b45
MD5 bfcf07b5b11e41159da0e87f6a230308
BLAKE2b-256 a72eacfc4564b21cb4cc37373a6000e744220f10b5b07a9414bce5b0d603376c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.12-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b8ffdf7fe5291416dbb2ae6e5df23b003f33da85d5699c6b37e982f4970ab2bb
MD5 86d492acd3b4f928aa3c9e60815c6c09
BLAKE2b-256 fe908b759bb2cef836880744e26c0d30be42806044b7d74dff4646d9c0702102

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.12-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d57964393743352aa610a4a2bed2123d76631cdaff9502eafeefb92392d253ba
MD5 ab1905e5c560a7a4f2e2a425d3262486
BLAKE2b-256 2b2ae9cef9174d036e3b14a28d620516a73f316fd00307e4b12a6fc7e6bad74b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.12-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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-0.10.12-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.12-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a1920b57e58038812478d47b5c96bf7772061860797938d671a1a83970295564
MD5 5f64e13bcff12e6d3aa1fe8bddaeb990
BLAKE2b-256 d21ec6b28e6aefd8c6d7b65577af48660bf28082cf5ae0f63a2ff9cc43a8073b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.12-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9c910efafebefb3ce624daa8411aa659f75c201b284f6ee6d04fbc47bfd4c755
MD5 a8199dda47e44165ac77aa0f1738b4be
BLAKE2b-256 09241c72b48a38ed624e385d2ed2ff6d674c1979127b382ecc48a2fb5e2707f4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.12-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 65ad196d6b44d78b01038f3e563313e688271594f09db2c099dd9fba5de83b8d
MD5 0b0df82064315f627b64abbfd860b166
BLAKE2b-256 7b27806c15d603d7c0b2cf8825edf5cc3603d7ad4c0e935af3a29244a0f7330e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.12-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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-0.10.12-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.12-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2cd04cd8e7a8db557b099697505c3afec60c5e1359eaab6119837f1b77f5fbef
MD5 075f348b24cec078cc219eb271beec31
BLAKE2b-256 9ebe3c7fdd553f0f22a9a8a52293be160c001d608119d33e4dbc2c3b9663ace4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.12-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.10.12-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e492ab19a9957ac1bf9829732eaa14a1914d2b6730a66d94f370c46f5f5e332a
MD5 a162fbe9e99d730741821172745da14c
BLAKE2b-256 fd796dd57459e5075c5320f7c7bfcac048ef052884e6c34c8215e04aa04f712d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.12-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 225bae87564917a9cdc128bbc5c088fe52cceed2ec9af879c6ca7f16c413ec3d
MD5 41658d9d7b1aaa6fb61936665ef51487
BLAKE2b-256 a112a8c8b910868c2c3894e4e39025a9477cf2e9285dc3ab016efaac0af7844a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.12-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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-0.10.12-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.12-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d8accce71628543176b5e2f9aa69c6743c0a54d264cb8e00e903001e1d9f22ff
MD5 745888c500aff3b9db58b45b999dd1f0
BLAKE2b-256 adc832c24591d020fefc7e316f4ea38efe003f84f1001c0cd18a483b15da3296

See more details on using hashes here.

Provenance

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

Supported by

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