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

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.21-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_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.21-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.21-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.21-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_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.21-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.21-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.21-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_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.21-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.21-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.21-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_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.21-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.21-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.10.21-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_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.21-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.21.tar.gz.

File metadata

  • Download URL: openbricks-0.10.21.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.21.tar.gz
Algorithm Hash digest
SHA256 24f3d4adb8cdba8da7f4e4c6803023fa3d19e7d4ccfb72e2dac3ca039090d4e2
MD5 5afb3b620935bdf8b5221acb9954981a
BLAKE2b-256 e6ba23366ebdcf01f9ed802405c7b668381d9ee33300ff691ba7ad4ce2fc61f9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.21-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d393903d4b1b89f58fc340a73de005f083a99f1831043a802754e86848db9a4e
MD5 4cc7185a88e54907a956f08da42f193d
BLAKE2b-256 04e05228d84ab7cf5a016406817dab6969fcbcb22bbd2f46d86921bf49f723a1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.21-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ab5f2224288aa71018273fd4d8f6c829a11e32e2993631df74480190baf491c5
MD5 6fed2a57f2b233761bd608c9fa258a3b
BLAKE2b-256 1519cd7dc829753a143439d68e864f312a603203f27ef9fdbb5663740a91e877

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.21-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 91811e1e8adcc4cd399188cab6c4c2a71599afe6df9acc151f56070c273bcfcf
MD5 0eab65c3c8891eae0aed4885ad9608d1
BLAKE2b-256 89eb617bf3ab78a9e30b9bcb87d5b8881d9cf468d197df2b97d7d0c4305637ba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.21-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 10a4cd16ab8144287cbb823eb468f4f3f79f6c54c6bca9d9cd9be0ae2298253b
MD5 2935a668bae87644aff14141cd7bab7d
BLAKE2b-256 827f53a5360be83f95986137341f6610ba1cc88298483ca963b8b5fcac962461

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.21-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0a47877bc0125fedd11503e0cb9953a3b55d8166f6f509e2d247f3e6dc474d37
MD5 90faadfa6c204b25bd9687edd0760ac3
BLAKE2b-256 9162b818baaa99e820589463374c7d00be529353e83dfcf5c227a43512a9dc03

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.21-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 0423155bc247b0b1bb5be3c10c246ff72105f64c90e28ecd022508e02bbe5490
MD5 29e65dcbd68fc783d9a4a372b1f8278d
BLAKE2b-256 5a0de300f26c94aedb6c9c56d7e30d54406ef4f20421155889b65be188cc34c7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.21-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2b35f54048cb75b34e0ab79ededad433f62c3ba28f06e1753dc929a7bfd7e34c
MD5 4a7cb061be847aeb2d9d2e183b3baa48
BLAKE2b-256 ae9ff4ecf18bbc0d55f9903faef2b9f416dbcc2d71dd964589a7d6ac86aef4b9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.21-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c4aab0f65c82b15a513105be5e1363b97222d5b4d6d16643080d6ae1ccb6a0b7
MD5 15d0b2d8d8140f7d9b52d486b9bc6038
BLAKE2b-256 7bee4591beb7249b8ddb4e46c4dda7b43af6d9259059cb7f2aff0aed58fc408e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.21-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 aea3d0d4f276a666535df5028810dec165493f9a2fd64f706f1656d5bd6b9960
MD5 76cdaa2cfe1c4b47b9dda0008992a1c8
BLAKE2b-256 4d1ad442b0be94c0c903be83d5b7fd5d5d42f7eea50d59e30b693048b4dac712

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.21-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e52b32e8ddba51ff188df2fb928cafea2c5054c8f08cf6e21c1e16bab6e9d9db
MD5 8b34dd0ce93550ca2a172e2a5bba45a6
BLAKE2b-256 b11d3f8e66adf4f6c28e097077d3875ccd21a7bc10640929490893ad131de74a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.21-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1e89968aa31835f32b9b3546b0b42dd3082f124c4aedaa2e34b340fa16b12e5f
MD5 29c340d662cfaebc27ee0b0472193e28
BLAKE2b-256 51a56c89b2e1304a287947e1d3cdf56123cf29ab12b9d3d8cac80cd9c4ae466e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.21-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5268f911ed7df3a77205d8e03446b235b07a95d0d82add484b77ca8df26b7278
MD5 8213011039f2a0283fc379c28dd3edaa
BLAKE2b-256 38a14e0c3386bcac07dc6e280b01fe296a0a16ab304397e85575d7dcc9abf495

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.21-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.21-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 90db58ca19977a4f731eda1e3212da4239b36e9d5a6fc7a7e15008622f97cffe
MD5 b2f03c4bf9767678972cdda3b6aae021
BLAKE2b-256 0aa9d268cb7d7d1750f4ad0505b4452de2da2a02e955d956e36db82817c8186d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.21-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7375c9ca3c42fa885cef062e966ab8fdc5e088b814189bc4cc84122b0d02d6c6
MD5 55c7be9c221c25e5e378488391fe76d4
BLAKE2b-256 036348d587312d8d8ca17130e749ae3340c72cd03667b8a540a0cb9bbe6ee162

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.21-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 dd00f3c5c58228771ad310ee5ebf4363bf82d3b43fbbd31ce0e9f1b69dd0ae02
MD5 63737c5e82f3d40b2a800c58c7e14071
BLAKE2b-256 418b1f864418767bb8a79cbc5863a2b5d89b6e66e1f5228e6d7bed84bbbd5cad

See more details on using hashes here.

Provenance

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