CLI Workflow
The Ruflet CLI is the center of the developer experience. It is responsible for project setup, client launch, build orchestration, device tooling, and local environment checks.
Available commands
-function">ruflet --version
-function">ruflet new <appname>
-function">ruflet run [scriptname|path] [--web|--desktop] [--port PORT]
-function">ruflet build <apk|android|ios|aab|web|macos|windows|linux> [--self] [--verbose]
-function">ruflet install [--device DEVICE_ID] [--verbose]
-function">ruflet update [web|desktop|all] [--check] [--force] [--platform PLATFORM]
-function">ruflet debug [scriptname|path]
-function">ruflet devices
-function">ruflet emulators
-function">ruflet doctorruflet new
Use this to scaffold a fresh project:
-function">ruflet new my_appWhat it writes:
main.rbwith a starter counter appGemfileREADME.mdruflet.yaml
What ruflet.yaml controls:
- app metadata
- package name and organization
- backend URL for server-driven builds
- enabled client services/extensions
- splash and icon assets
- build theming values
ruflet run
This is the fastest way to develop a Ruflet app:
-function">ruflet run main
-function">ruflet run main --web
-function">ruflet run main --desktop
-function">ruflet run main --port 9000Important behavior:
- Mobile is the default target.
- Ruflet resolves
mainandmain.rbautomatically. - If a
Gemfileis present, Ruflet checksbundlefirst and installs missing gems when needed. - The CLI prints connection details for the selected target.
- Web launch spins up a local static host for the web client and opens the browser.
- Desktop launch waits for the backend, then opens a desktop client when available.
ruflet build
Use builds when you are ready to package the app:
-function">ruflet build apk
-function">ruflet build ios
-function">ruflet build web
-function">ruflet build macos
-function">ruflet build windows
-function">ruflet build linuxThere are two build modes:
- Default mode is server-driven. It expects
backend_urlto be configured inruflet.yaml. --selfis self-contained. It uses the embedded runtime/client entrypoint.
-function">ruflet build android --self
-function">ruflet build ios --selfruflet install
Install a previously built app to a device:
-function">ruflet install
-function">ruflet install --device emulator-5554This command syncs exported build outputs back into the Flutter client workspace and asks Flutter to install the app.
ruflet update
Update cached prebuilt clients:
-function">ruflet update all
-function">ruflet update web --check
-function">ruflet update desktop --platform macosUse --check when you only want to inspect the local cache and release tag state.
ruflet debug
Run the underlying Flutter client directly when you need lower-level debugging:
-function">ruflet debug web
-function">ruflet debug ios
-function">ruflet debug --device-id chromeThis is especially useful when you are working on client behavior instead of the Ruby app layer.
ruflet doctor, devices, and emulators
Use these commands to inspect your local toolchain:
ruflet doctorchecks Ruby, Flutter host target, and template availability.ruflet doctor --fixcan fetch missing template/tooling dependencies.ruflet devicesshows Flutter-visible devices.ruflet emulatorslists available emulators and can launch one with--start.
Recommended loop
ruflet new my_appcd my_appbundle installruflet run main- Iterate on controls and page updates
ruflet build ...when you are ready to package