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.66.0.tar.gz (3.7 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.66.0-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.66.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.0-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.66.0-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.66.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.0-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.66.0-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.66.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.0-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.66.0-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.66.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.0-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.66.0-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.66.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.0-cp39-cp39-macosx_10_9_universal2.whl (3.5 MB view details)

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

File details

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

File metadata

  • Download URL: openbricks-1.66.0.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.66.0.tar.gz
Algorithm Hash digest
SHA256 632a95f500f08c14495e5cd406b70f57a04762c542f3cc164305442ece876843
MD5 f6df2ac388ad3fb5a9bc04e075c19809
BLAKE2b-256 cb8d7598dda6a8736bfc868e8d1d89bcb4d3b22a6084e5c5fc8176d0fd374ba3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b0bb39cbd09442365bc9e33e77416da09e04cfe89ce62f27ac9bb821be2665f3
MD5 dc413f7f1240b519a70d227913c570aa
BLAKE2b-256 7714222cadbebb1d819916252ffbb78bb7a4fe4080968daf50e6872d0160b116

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 eaf26e85d95aaf1ee5802dac1720cd43367a85ea33a7357dc9a4074901918ee5
MD5 61c4d9c36859f0e984be79759ecd7db2
BLAKE2b-256 c34cafa94db24ff02507921cbc395fe461e7efdbf8b67f8a5b7a7b780336a62a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 ffbca3a24dfa80a37a3f4aa6f194c5d059a32283969bf4caa6a1034c45fbb7a4
MD5 364fec6563de78caec2788b0c5bf3176
BLAKE2b-256 1562510bf0b8fad92994e9d90039b8cace4027d5997071dc2572c82721ffe9f1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7f407bc90b135e7945fb5c8bbda44a584191705354785fbdaa21d8bdb3b93179
MD5 a6c778c3e13ca356c263cd0b817fea19
BLAKE2b-256 d48f952c1d89eb21cf0e26c20704d34dc9caa13db70139f62f64de02282275ea

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7339554b29597e0e3d0ea2cc13a3eec9676745315405ed3e40e9b3468405fd24
MD5 ecf2b6e66ac558e47aea39c95fdbd198
BLAKE2b-256 efb69f0054173d9b86f287887a8862a075b6c9439a650bdf9dce866959b90f6b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 cda63008337584d10d073fcb71096912fdb41504c18b78bf069b665d02d13b41
MD5 0b4b7b8ec6a95d8412e166b9e070bdac
BLAKE2b-256 d4f5fe0566219f54b24eb5e1ca2d4883f8cd5904a7965a3a7bb8d4d526a0688f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8cecce1461bf89053d839eee09e71f2530205ef3bb62f327ca236c894ee82bb5
MD5 64c4898d9d46587b2126f9424e82232a
BLAKE2b-256 d4fe7c80ade90d9c1010063d6e3f49c1ce78e14925da0850ed92590d26038038

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c810b63c39784af8cd1f3b038595b52e4005531786fb70642d940ba9b45d9a97
MD5 6a2a230fb892640d9d1126bbd4497a8d
BLAKE2b-256 d5327f5961d435b402c0066704abf11ecc09228ae7c437ba0419a3537659af42

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1388f15a1c8ae6819e5487d60bb2a259f5244851510d663defb2a710287c8a1b
MD5 7d5af158489c075ccb5a18f35be554ec
BLAKE2b-256 48e5f743da180ed8d26cce8a691cd18c8d35f79052dba93932dbcee0a96a37de

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6c84ce89d2a0e755655b75aebf0f720d24ec8065c6a0a24491a2ed211f090509
MD5 ab8f41ccaee6a4841a27e90c7e3c58d0
BLAKE2b-256 d6405e1fe14f4d6a090704766f536d26d048a449bc12deab41fd1b8ca5f74139

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bcc4c19b2c7439549a3d5e304f2de7e541a4168f6dcdec6faf86d82a30450a8e
MD5 397614c9ba2173d3f441273986f34970
BLAKE2b-256 907ede53c9a8cbd6439d511316f8f5fd5938c34e64da8692ad3771735a894fa7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cdd73044019dbf3d6bdbc05df604b17417a43f177d15351fd991b6cc48c86568
MD5 81539ed47f5e546473e02083403ddf26
BLAKE2b-256 1d752be2288ed91074e3b930593e83ab391d3eca2d4d7bd7a73e7805889b576d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.66.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.66.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3845af9f06954ee0d386a157f7758223ae311b2ca661bd67f1d0f2d2a03a3a95
MD5 310fc5c0033de4430381075372df9eca
BLAKE2b-256 43a1bc7a65b494adb8e6a1184437898de1d3169c89e7f502172bd71643b8fd30

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fcb5f102dbe2e49735be7f65f2d901b3b89bc28cde602fa3d1a20aeb29333559
MD5 90e9adece8c7c447b166d6eaefefd9e3
BLAKE2b-256 e3557859d7051affc75069d1201f5823ee4996d74953982d2ec4c0db2d6d6a0e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c10b07d818836e94e4945bff42de9314dd1e347e7759c4d228a4542a54635e03
MD5 eeccdb6e8901e333f76f7def0fd4a5f8
BLAKE2b-256 8ed9c3104bd5e0ab5d090b65c9e909124684df40155a2ea495b5d77ff0e96e2f

See more details on using hashes here.

Provenance

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