Skip to content

CLI Reference

RestFlow provides a powerful command-line interface for managing workflows, agents, and authentication.

Terminal window
# Build from source
cargo build --release --bin restflow
# Or install directly
cargo install --path crates/restflow-cli
CommandDescription
restflow chatStart interactive TUI chat
restflow claudeExecute via Claude Code CLI
restflow agentAgent management
restflow authAuthentication management
restflow skillSkill management
restflow taskTask management
restflow secretSecret management
restflow mcpStart as MCP server

Execute prompts via Claude Code CLI using OAuth authentication.

Terminal window
restflow claude [OPTIONS] -p <PROMPT>
OptionDescriptionDefault
-p, --prompt <PROMPT>Prompt to send to ClaudeRequired
-m, --model <MODEL>Model to use (opus, sonnet, haiku)sonnet
--session-id <ID>Session ID for conversation continuity-
--resumeResume existing sessionfalse
-w, --cwd <DIR>Working directoryCurrent dir
--timeout <SECONDS>Timeout in seconds300
--auth-profile <ID>Auth profile ID to useAuto-select
--format <FORMAT>Output format (text, json)text
Terminal window
# Basic execution
restflow claude -p "Hello, respond with OK"
# Use specific model
restflow claude -p "Explain Rust ownership" -m opus
# JSON output
restflow claude -p "List 3 colors" --format json
# Session management
restflow claude -p "Remember my name is Alice" --session-id my-session
restflow claude -p "What's my name?" --session-id my-session --resume
# Pipe input
echo "Explain this code" | restflow claude
# Specify working directory
restflow claude -p "List files in this project" --cwd ~/projects/myapp

Before using restflow claude, you need to configure a ClaudeCode auth profile:

Terminal window
restflow auth add --provider claude-code --key "sk-ant-oat01-..." --name "My Claude Code"

See Authentication for details on obtaining and configuring OAuth tokens.

Manage AI agents.

Terminal window
# List agents
restflow agent list
# Show agent details
restflow agent show <ID>
# Create agent
restflow agent create --name "My Agent" --model sonnet
# Execute agent
restflow agent exec <ID> -i "Your prompt"
# Delete agent
restflow agent delete <ID>

Manage scheduled tasks.

Terminal window
# List tasks
restflow task list
# Create task
restflow task create --agent <ID> --name "Daily Report" --cron "0 9 * * *"
# Run task immediately
restflow task run <ID>
# Pause/Resume task
restflow task pause <ID>
restflow task resume <ID>

Manage reusable skills.

Terminal window
# List skills
restflow skill list
# Show skill
restflow skill show <ID>
# Import skill from file
restflow skill import ./my-skill.md
# Export skill
restflow skill export <ID> -o ./exported-skill.md

These options are available for all commands:

OptionDescription
--db-path <PATH>Custom database path
-v, --verboseEnable verbose logging
--format <FORMAT>Output format (text, json)
-h, --helpPrint help