⚠️ This project is in early development. APIs and commands are subject to change.
prremote is a command-line tool for deploying and running Ruby scripts on a Raspberry Pi Pico W over USB serial. It ships a minimal mruby/c runtime firmware and lets you compile and send .rb files from your Mac or Linux machine directly to the device.
Inspired by mpremote for MicroPython.
- Ruby 3.x or later
- Raspberry Pi Pico W
mrbcin your PATH (forrun,deploy, andeval)- macOS:
brew install mruby - Ubuntu / Raspberry Pi OS:
sudo apt install mruby
- macOS:
gem install prremote# 1. Flash the prremote runtime to your Pico W (one-time setup)
prremote install
# 2. Write your app
echo 'puts "Hello from Pico W!"' > app.rb
# 3. Run it
prremote run app.rbFlash the prremote runtime firmware to a Pico W or Pico.
prremote install # Pico W (default)
prremote install --board pico # Pico (no wireless)
prremote install --version 0.1.1 # specify a runtime version
prremote install --board pico --version 0.1.1The firmware is downloaded from GitHub Releases on first use and cached in ~/.prremote/runtime/. Subsequent installs use the cache.
Put the device into BOOTSEL mode (hold BOOTSEL, connect USB, release) when prompted.
Compile a local .rb file to mruby bytecode and run it on the device immediately (one-shot).
prremote run app.rb
prremote run blink.rb --port /dev/tty.usbmodem101The device responds with RUNNING, streams any output, then DONE.
Compile a local .rb file and save it to the device's flash. The script runs automatically on every boot.
prremote deploy app.rbThe device responds with DEPLOYED when the write is complete.
Erase the deployed script from flash. After this, the device boots into idle mode.
prremote undeployEvaluate a Ruby one-liner on the device.
prremote eval "puts 1 + 1"
prremote eval "CYW43.init; CYW43::GPIO.new(CYW43::GPIO::LED_PIN).write 1"Send Ctrl+C to interrupt a running program.
prremote resetWatch a local file for changes and automatically re-run it on the device on every save.
prremote watch app.rbUseful during development — save your file and the device immediately runs the updated code.
List USB serial devices that may be prremote-compatible.
prremote listShow the gem version, mrbc version, and the connected device's runtime version.
prremote version
# prremote: 0.1.1
# mrbc: 3.3.0 (/usr/local/bin/mrbc)
# runtime: 0.1.3| Option | Description |
|---|---|
--port, -p PORT |
Serial port (default: auto-detect) |
--baud, -b N |
Baud rate (default: 115200) |
# First-time setup
prremote install
# Manual cycle
prremote run app.rb # compile + run (one-shot)
prremote reset # interrupt a running program
# Automated cycle (recommended)
prremote watch app.rb # auto-run on every file save
# Persistent deployment (auto-runs on boot)
prremote deploy app.rb
prremote undeploy # remove from flashprremote flashes a minimal C firmware (built on mruby/c) onto the Pico W. The firmware:
- Waits for a USB serial connection and sends
READY prremote-runtime/VERSION - Receives a command from the host:
- Raw
.mrbbytecode → execute immediately and stream output (run/eval/watch) DPLY+.mrbbytecode → save to flash and confirm withDEPLOYED(deploy)
- Raw
- Waits for the next command
Scripts saved via deploy are stored in flash and run automatically on every boot. GPIO and WiFi (CYW43) C bindings are available in Ruby code running on the device.