Skip to content

CLI Commands

Running yokai without a subcommand launches OpenTUI. Non-interactive commands write JSON to stdout and JSON errors to stderr.

CommandDescription
yokaiStart the daemon if needed and launch OpenTUI
yokai agent [port]Run the device agent; default port 7474
yokai daemonRun the local control daemon
yokai upgradeInstall the latest release pair
yokai versionPrint version and build time
yokai --helpPrint the top-level command reference
Terminal window
yokai devices list

Uses the daemon when available and falls back to config-only entries marked offline.

Terminal window
yokai devices add --host <host> [flags]
FlagDefaultDescription
--hostrequiredHostname or IP; also becomes the device ID
--labelhostHuman-readable label
--ssh-userrootSSH user
--ssh-keyemptyPrivate-key path
--ssh-port22SSH port
--typemanualtailscale, local, or manual
--agent-port7474Remote agent port
--agent-tokengenerated during bootstrapExisting token when importing state
--gpu-typeemptynvidia, amd, or apple hint
Terminal window
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.

Terminal window
yokai services list
yokai services list --device <device-id>
Terminal window
yokai services deploy --device <device-id> [flags]
FlagDefaultDescription
--devicerequiredTarget device ID
--typeemptyvllm, llamacpp, or comfyui
--modelemptyModel repository or path
--portruntime defaultMapping such as 8000:8000
--imageconfigured defaultExplicit Docker image
--namegeneratedContainer/service name
--extra-argsemptyAdditional runtime arguments
--gpu-idsallGPU IDs passed to the deployment
--skip-pullfalseUse an existing local/private image
Terminal window
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>
Terminal window
yokai status
yokai metrics
yokai metrics --device <device-id>

status returns the fleet overview. metrics returns detailed snapshots and can filter to one device.

Terminal window
yokai config path
yokai config show
yokai 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.

Terminal window
if yokai devices test gpu-box-01 >result.json; then
jq '.agent.ok' result.json
else
jq '.error' result.json >&2
fi

Exit status is non-zero for command errors and failed connectivity checks.