CLI Commands
Running yokai without a subcommand launches OpenTUI. Non-interactive commands write JSON to stdout and JSON errors to stderr.
| Command | Description |
|---|---|
yokai | Start the daemon if needed and launch OpenTUI |
yokai agent [port] | Run the device agent; default port 7474 |
yokai daemon | Run the local control daemon |
yokai upgrade | Install the latest release pair |
yokai version | Print version and build time |
yokai --help | Print the top-level command reference |
Devices
Section titled “Devices”yokai devices listUses the daemon when available and falls back to config-only entries marked offline.
yokai devices add --host <host> [flags]| Flag | Default | Description |
|---|---|---|
--host | required | Hostname or IP; also becomes the device ID |
--label | host | Human-readable label |
--ssh-user | root | SSH user |
--ssh-key | empty | Private-key path |
--ssh-port | 22 | SSH port |
--type | manual | tailscale, local, or manual |
--agent-port | 7474 | Remote agent port |
--agent-token | generated during bootstrap | Existing token when importing state |
--gpu-type | empty | nvidia, amd, or apple hint |
Lifecycle
Section titled “Lifecycle”yokai devices test <device-id>yokai devices bootstrap <device-id>yokai devices remove <device-id>test checks SSH first, then the agent through the daemon tunnel or an SSH-local probe. bootstrap installs or upgrades the agent. remove updates local state and reloads the daemon.
Services
Section titled “Services”yokai services listyokai services list --device <device-id>Deploy
Section titled “Deploy”yokai services deploy --device <device-id> [flags]| Flag | Default | Description |
|---|---|---|
--device | required | Target device ID |
--type | empty | vllm, llamacpp, or comfyui |
--model | empty | Model repository or path |
--port | runtime default | Mapping such as 8000:8000 |
--image | configured default | Explicit Docker image |
--name | generated | Container/service name |
--extra-args | empty | Additional runtime arguments |
--gpu-ids | all | GPU IDs passed to the deployment |
--skip-pull | false | Use an existing local/private image |
Lifecycle and logs
Section titled “Lifecycle and logs”yokai services stop <device-id> <container-id>yokai services restart <device-id> <container-id>yokai services remove <device-id> <container-id>yokai services logs <device-id> <container-id>yokai services logs --follow <device-id> <container-id>Fleet status
Section titled “Fleet status”yokai statusyokai metricsyokai metrics --device <device-id>status returns the fleet overview. metrics returns detailed snapshots and can filter to one device.
Configuration
Section titled “Configuration”yokai config pathyokai config showyokai config set <key> <value>Supported config set keys include daemon listen/poll/reconnect values, Hugging Face token, theme, and default images. show redacts stored tokens.
Automation pattern
Section titled “Automation pattern”if yokai devices test gpu-box-01 >result.json; then jq '.agent.ok' result.jsonelse jq '.error' result.json >&2fiExit status is non-zero for command errors and failed connectivity checks.