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.

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.3.tar.gz (3.6 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.3-cp313-cp313-win_amd64.whl (62.4 kB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.3-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (86.5 kB view details)

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

openbricks-0.10.3-cp313-cp313-macosx_10_13_universal2.whl (70.7 kB view details)

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

openbricks-0.10.3-cp312-cp312-win_amd64.whl (62.4 kB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (86.6 kB view details)

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

openbricks-0.10.3-cp312-cp312-macosx_10_13_universal2.whl (70.7 kB view details)

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

openbricks-0.10.3-cp311-cp311-win_amd64.whl (62.3 kB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (86.4 kB view details)

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

openbricks-0.10.3-cp311-cp311-macosx_10_9_universal2.whl (70.5 kB view details)

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

openbricks-0.10.3-cp310-cp310-win_amd64.whl (62.3 kB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (86.3 kB view details)

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

openbricks-0.10.3-cp310-cp310-macosx_10_9_universal2.whl (70.5 kB view details)

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

openbricks-0.10.3-cp39-cp39-win_amd64.whl (62.4 kB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.10.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (85.8 kB view details)

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

openbricks-0.10.3-cp39-cp39-macosx_10_9_universal2.whl (70.5 kB view details)

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

File details

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

File metadata

  • Download URL: openbricks-0.10.3.tar.gz
  • Upload date:
  • Size: 3.6 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.3.tar.gz
Algorithm Hash digest
SHA256 903eaa43ccbc46d6ea0e67455ee6d86dfe860ad0cb032a4459a44551d227abab
MD5 de0b5f60fad488fe27f8a35c294849d3
BLAKE2b-256 75a9a43a6ce9aad33aaaff570f5f358b95ff8f3a1b45204bf320da5c6c711cb3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 62.4 kB
  • Tags: CPython 3.13, 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.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ce8998d680189d0eee43e293bdb03aafd2ad2354b0dd6d396cbadf2015c38c7c
MD5 4ee63285ed3d3f516615948d91329668
BLAKE2b-256 ec65144a1007ce2365398c121833155a8d455ec6309994926e90c05d988616a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.3-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.3-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.3-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5ed95f541040e7a02cbba8ea23dfdf3d7f40fffed77462d5ba265e5c9628213b
MD5 8a7250c05148a4e079ca3facc7bcbf5f
BLAKE2b-256 476b5f53eac573cf73d7498c9b5cce9e6d0f57f8bfef3bdea4434ea4585d894d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.3-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 7b7cca6a0a026d883f18d3b63f0420cb47015f84505d976d4fdf193d0a61d76c
MD5 df4b87bab6f6ef7fdbfa36993666b4ab
BLAKE2b-256 2a016567def26106562984970a2b945c1a575d657628fc0c5f443f30dd03c2bf

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 62.4 kB
  • Tags: CPython 3.12, 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.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 98c0ae415ac7c4c4c029887513998ef358aa13aef23ecf4cf3b5e6533ee81479
MD5 8dc958d40a0c21d6b4a6a79e5dfac644
BLAKE2b-256 bc96f763b277ba0d3666ce4224beeeae1721d95f90ea55ddd240589b556f5b24

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.3-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.3-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.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bebb8821996c418a717733297c402f83556e8da245c8f3e3c4a3271164f11d71
MD5 312e237587249dc906e8e24fcaacf0dd
BLAKE2b-256 4efbb8cc999189e2b5d8770c0161f6b0c842b00be44675f6ae98d47e564e61ec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.3-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 19879b35b245aa52453d2801bf0b906c8a5c41df8ba3c24972f431247793d7e9
MD5 16594435e4b564f6a3963adbb051b51a
BLAKE2b-256 c83a818a2ce1b4aeebc768965aa7cf93ba3d9425e8bb5f562002684beabfdc55

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 62.3 kB
  • Tags: CPython 3.11, 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.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 88a9156c3473c7eef97d2c13bf887454c066ccdb38f91165781ff3d671ae15d0
MD5 6d2f9ec03cfaecc3a9bcc89426a5f0ac
BLAKE2b-256 d03a8f4b0bf1df3e256aeb56229c9d453e421f9b862f839c24beb6a15d1757f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.3-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.3-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.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d4ffd7c01345559039d7818b2ef677924828f660a9c57cb7120f8c927fd8e2ce
MD5 69b620d7d274c482f0b66c55b437fad8
BLAKE2b-256 ed31d48dec01fc48936cecb0f1effcd8678bb50808427e26d4858ae3ce274182

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.3-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3bcd752d7b32911e0591f2640d6e2681fff5fcb51b48f95dbec4ee3c0f474f6e
MD5 fa307f5bca4243fc9f0cdc2f66f95fe7
BLAKE2b-256 d8dc98bbb005840c0784ea72edfb0e30525e53fd577801ab64327444157f9ab2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 62.3 kB
  • Tags: CPython 3.10, 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.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4bca605e05c0847ccaa73bb97a2d9aa28dedd28d9080baa8ca6d1b04871fb2df
MD5 0d22539933f8d092e51220ca3ac74e4d
BLAKE2b-256 c8dac9b8dee1c051c9bc4e575adeae8c7986fc5e6a84d1ee72a3eae4caf7bd06

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.3-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.3-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.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1e53efcd4c4c02cde8e5aabbd55b4ec105d83ff67eff21289d80ce3d6331707c
MD5 6a40c4df745b2924a7c78ee453735dff
BLAKE2b-256 6a5e8f8dc7942cd3b144665dee70bf183161cbfd1453f4265abfbb898043a851

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.3-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8fe6acf4f0abd254c236f66ccb8c7b88202972d7c7e02aec9e546b0aa6eaabc7
MD5 3b52f6c52045a826736cc38042981ccd
BLAKE2b-256 18543639c10e9e954231632d7809d6ed6e605663dd2d99077738b7c97067df39

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 62.4 kB
  • 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.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 eedb6d4a063045d0170376e50eb51817537cdbe8e7cf1b5a456deafe5480b10a
MD5 9dee349af335135c080719fee806f685
BLAKE2b-256 ffae9442ffb09c987de5454c52d1695b0b555cb9e9a557ad78aabe5458cce375

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.3-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.3-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.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6fd7002ba21746ec382383133c720f7da9a6bcdb6068b6f469e7170f2fcb8b5a
MD5 71a1b22474c78bbccde418b7b5372f1c
BLAKE2b-256 28adf35ee2af510e3c3a39507f4ab84789a10109df6b7cff6c8058f9dd860c8b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.3-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5cab9077f4341843f3a1dc8652175f39a7f48d2d660ef0c8839b236039335d7f
MD5 161e0da05145db4dc54566e8a3ea17f6
BLAKE2b-256 805ca7970de7d61b03f54c7a75f9cc6fbb065552b0ebb0cc5c737e1315c0687e

See more details on using hashes here.

Provenance

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