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

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.17-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.17-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.17-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.17-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.17-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.17-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.17-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.17-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.17-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.17-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.17-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.17-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.10.17-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.17-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.17.tar.gz.

File metadata

  • Download URL: openbricks-0.10.17.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.17.tar.gz
Algorithm Hash digest
SHA256 023b0f0f345cc332cdc070e74d7ebe42cac0b2c808fca57b31ae166390e2e8de
MD5 5fab27c48075bc4fcf954bc92ccc5b02
BLAKE2b-256 5c9457b340e5168dea860a98d03a319e7e63234deea23d676580d91e96384269

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.17-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e8830fad713308fae4907bfc99c6b862dcd8f59aa34016fcb366b0eb3c1c769c
MD5 5a95243cade6af596b3cd493335f26ca
BLAKE2b-256 6c3a111e7073f07300ccbb2263b0e80314b3463eb576ec252548a4c7a230f08b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.17-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.17-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.17-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 34b03ae620c073f1fbb4e78c7f9533ed23b0cc6b7ac2eb457799957e5938650f
MD5 552c90951db98f3dc7e44165635a3c5d
BLAKE2b-256 d113e669fdfaa61eed3a3df917b00a6c3c61abdbdb7ea3df2d098b69b5fccb94

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.17-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 80c5f2306eda536f64a8e3371704fa1df1a6e620f28c67313708cb6bd5f9b48f
MD5 320275207937876075e9dca6b74b0c3d
BLAKE2b-256 4c05b5914d92f185d49c27986d047fbfb9f274ac8b3de707b22f44dd8d46e009

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.17-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 56ec7d5189a8a2f6ffb83b4a2e439878cddfeed98ee094aa7606af682390d680
MD5 bdd0897d7d1641f8172dfd60dd02c820
BLAKE2b-256 3f21e5b8eda0560fbaeed21159a0b4ed594abcbafaad9db9d889fc9666e5878d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.17-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.17-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.17-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 05bcc395c3cac74ebb6222999adef39eb137bdbb1eba19a9bb8484bc71a00edc
MD5 2bc2bd464c3faee481f9e50965b2514a
BLAKE2b-256 d668c20d9286a346148df7e14a575beae38e3e51d6b3a1b778f2497c92980d0a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.17-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f511e4f1ebe7ba2dc3184b1c2d0c1affe59b298f801ac433ceb1dcb75c9fe4f5
MD5 bba0359a0f540546b7696a7460b4d2c7
BLAKE2b-256 6baee249f9af67230a29f3082ff18349a241f8593f92379a4cd91a219b477312

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.17-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c4b819b8e8dde3ba8d034a3a9c60e197f2a94ace72177d43e3244ced14606efb
MD5 0802ec64716057dbe9e417bd67551381
BLAKE2b-256 4fd519baadecfb730a52eb3bb351041c03f575461981271196e7308a51c79030

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.17-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.17-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.17-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 912e910575ebab1febbae4f20438d7c7c01c8f18346e9fd6045447b8a04f8dfc
MD5 31902f64e55a9341b2e04379d193e8ce
BLAKE2b-256 71ecd39de884c89df1e8a49aa9e49e86d7a77505d9508a84d93be76f5911765f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.17-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 fd2a65a52fde80616411f8619094537528b2c60ca10c2d766e1393511d00a370
MD5 0a0bc8bcd9dd0a9ec6d42b46ba5fa457
BLAKE2b-256 d0796bfb7167900ee44619a58a6b824effd3836b09ce15cf84b72a24588be6b2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.17-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 71f2244fc3999b5d48fe2f2b5a8dbb076c881b50b93e3081c726685bbe47c334
MD5 352ee3c324d6bb37e5b59d37871b781e
BLAKE2b-256 152e8b5f67000b9508b02f170951ce1be22db1d963b890f02568df075290d922

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.17-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.17-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.17-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cb3edfee79ab9fae3847419969ca47dd1e74fd4af747f1e98757797bb03f130e
MD5 a8558bc539ba98db62fda757d969a4d6
BLAKE2b-256 589c353a9a45899381fc101278eb1e965f9de26dde1d6336b37d48ff458c51a5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.17-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 77595b511d861447438f126094e249d58357a0b5b83e68cc5c955d4ad4db6283
MD5 bd0649f96f4322068648c2d0c3e8445a
BLAKE2b-256 6911531865eac7a619b88b022fb58fc1198b037f0a211d7cad7109ea7d51faf4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.17-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.17-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ab12b5e7d52b89e4b61e47b02528b43d4e968af367cf534e83d35e0cfcc8ed3b
MD5 92637a7d345c08dd5d77cc6fed46cb12
BLAKE2b-256 38a8e2fb983dabc5d5cc7710fd79c0d0cb196a84e8ef90c4235523bf2afdf644

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.17-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.17-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.17-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fd56acebaaf2d3ef9b6085b71a6c1afd9fe314463a610cd112898a308be13779
MD5 767993e52fcc80c407ef3bf3b7e7833a
BLAKE2b-256 6ac16d3ef801611418de2ee41313048ff1aadfe7570c869288fff334e282770f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.17-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a5679195c3e20e88582c2833e5d8af72a47131ebbbb805dd970572536b065453
MD5 957477d1410eb56a26de62b6008b7a12
BLAKE2b-256 3ab56cdedef7d57dd43a3d5ad4a5920bef3ab73f603fcda7cdc0fb552ee8843b

See more details on using hashes here.

Provenance

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