CLI Reference

rf exec

Execute a command on a remote agent.

rf exec [OPTIONS] <COMMAND>

Options

OptionDescriptionDefault
--relay <URL>Relay WebSocket URLRequired
--token <TOKEN>Authentication tokenRequired
--target <ID>Target agent ID or patternRequired
--timeout <SECS>Execution timeout30
--mode <MODE>Execution mode (see below)streaming

Modes

  • fire-and-forget — No response
  • fire-and-verify — Exit code only
  • streaming — Real-time output
  • orchestrated — Multi-step

Examples

# Simple command
rf exec --relay wss://relay.example.com/meet \
  --token abc123 "hostname"

# Multi-agent
rf exec --target "web-*" "systemctl status nginx"

# With timeout
rf exec --timeout 60 "apt update"

rf shell

Open an interactive shell session.

rf shell [OPTIONS]

Options

OptionDescriptionDefault
--relay <URL>Relay WebSocket URLRequired
--token <TOKEN>Authentication tokenRequired
--target <ID>Target agent IDRequired
--cols <N>Terminal columns80
--rows <N>Terminal rows24

rf status

Query agent status.

rf status [OPTIONS]

rf completions

Generate shell completions.

rf completions <SHELL>

Supported shells: bash, zsh, fish, powershell, elvish.

# Generate and install zsh completions
rf completions zsh > ~/.zfunc/_rf

rf dev

Start a local development environment (relay + agent in one process).

rf dev [OPTIONS]
OptionDescriptionDefault
--port <PORT>Local relay port9090
--policy <PATH>Policy filepermissive default