/// node operations
wai CLI reference
The installer puts a waicommand on each node machine. Use it to check status, follow logs, move models, and manage the agent — all from the node's own terminal, no dashboard login required. Works the same on Windows, macOS, and Linux.
Looking for the API / SDK quickstart instead? See the gateway docs.
Install a node
Create a node on the Nodes page to get your wai_node_… key, then run the one-liner for your OS. No admin rights needed (Windows installs per-user).
& ([scriptblock]::Create((irm https://wideareaai.com/install.ps1))) -Key wai_node_XXXX
curl -fsSL https://wideareaai.com/install.sh | sh -s -- --key wai_node_XXXX
Useful install flags: -ModelsDir D:\models / --models-dir /mnt/big/models to store models on another disk, and -LlamaVariant cuda|vulkan|cpu / --runtime native|container to force a build. The node auto-starts at login and keeps running in the background.
Commands
| wai status | Service state, health, current model, tunnel URL, media model, and a live llama-server check. |
| wai logs | Follow the agent + llama-server logs in real time (Ctrl-C to stop). |
| wai start | Start the node. |
| wai stop | Stop the node. |
| wai restart | Restart the node (agent + llama-server) — e.g. after dropping a new .gguf into the models folder. |
| wai update | Re-install the latest agent now. Keeps your models and node key. (Also happens automatically — see Auto-update.) |
| wai models-dir [path] | Show where models are stored, or move them to another disk. See below. |
| wai uninstall | Remove the node from this machine entirely: service/task, agent, CLI, config (node key), logs, and downloaded models. |
| wai help | Show all commands. wai --help, wai -h, and wai -? work too. |
Not on your PATH? Use the full path — macOS/Linux: ~/.wai/bin/wai · Windows: %LOCALAPPDATA%\wai\bin\wai.cmd
Storing models on another disk
wai models-dirwith no argument prints the current model folder. Give it a path and it moves storage there: it stops the node so files aren't locked, moves any already-downloaded models so they aren't re-fetched, repoints the config, and restarts. The folder holds all models — text plus the media subfolder for image/audio — so one command moves everything, and it persists across updates.
wai models-dir # show where models live now wai models-dir D:\models # move them to D:\models
wai models-dir # show current location wai models-dir /mnt/big/wai-models # move them there
Auto-update
Nodes keep themselves current automatically: each one checks the gateway on its heartbeat and re-runs the installer when a newer agent is available — pulling the latest agent and binaries and restarting, no wai updateneeded. Updates never interrupt a model download, and a node that can't apply an update simply stays on its current version rather than looping.
To pin a node to its installed version, set WAI_AUTO_UPDATE=0 in its config and restart. You can still update it by hand anytime with wai update.
Configuration
The installer writes a config file you can edit, then wai restart to apply: macOS/Linux ~/.wai/env, Windows %LOCALAPPDATA%\wai\env.ps1. Every value can also be passed as an environment variable.
| WAI_NODE_KEY | Node key (required; written by the installer). |
| WAI_GATEWAY_URL | Gateway URL (default: https://wideareaai.com). |
| WAI_MODELS_DIR | Where models are stored. Prefer the wai models-dir command, which also moves existing files. |
| WAI_MODEL_URL | Default model to download on first boot. |
| WAI_PORT | Local llama-server port (default: 8080). |
| WAI_LLAMA_ARGS | Extra llama-server flags (default: -ngl 999, offload all layers to GPU). |
| WAI_LLAMA_CUDA_DEVICES | Pin llama to specific GPUs, e.g. "0,1". Multi-GPU nodes otherwise reserve the largest card for image generation. |
| WAI_AUTO_UPDATE | Set to 0 to disable automatic agent updates on this node. |
| WAI_MEDIA_PORT | Image/audio (stable-diffusion.cpp / whisper.cpp) server port (default: 8081). |
| WAI_SD_ARGS | Extra stable-diffusion.cpp flags for image generation. |
| WAI_WHISPER_ARGS | Extra whisper.cpp flags for transcription. |
Node states
What wai status (and the dashboard) report.
| connection | health | meaning |
|---|---|---|
| ONLINE | initializing | Agent just started; tunnel is up, model work hasn't begun. |
| ONLINE | downloading model | One-time model download (~5GB default). Watch progress with wai logs. |
| ONLINE | loading model | Loading weights into GPU/RAM — usually under a minute. |
| ONLINE | ready | Serving inference — the gateway routes traffic here. |
| ONLINE | unhealthy | Agent is alive but llama-server stopped responding → wai restart. |
| OFFLINE | — | No heartbeat for 90s+: machine asleep, no internet, or service stopped → wai start. |
Removing a node
Click [ remove ] on the dashboard, then on the machine run wai uninstall — it stops the service, removes the agent, CLI, config, logs, and models, and takes the node off your PATH. Nothing is left behind.