CLI Reference
RestFlow provides a powerful command-line interface for managing workflows, agents, and authentication.
Installation
Section titled “Installation”# Build from sourcecargo build --release --bin restflow
# Or install directlycargo install --path crates/restflow-cliCommands Overview
Section titled “Commands Overview”| Command | Description |
|---|---|
restflow chat | Start interactive TUI chat |
restflow claude | Execute via Claude Code CLI |
restflow agent | Agent management |
restflow auth | Authentication management |
restflow skill | Skill management |
restflow task | Task management |
restflow secret | Secret management |
restflow mcp | Start as MCP server |
Claude Command
Section titled “Claude Command”Execute prompts via Claude Code CLI using OAuth authentication.
restflow claude [OPTIONS] -p <PROMPT>Options
Section titled “Options”| Option | Description | Default |
|---|---|---|
-p, --prompt <PROMPT> | Prompt to send to Claude | Required |
-m, --model <MODEL> | Model to use (opus, sonnet, haiku) | sonnet |
--session-id <ID> | Session ID for conversation continuity | - |
--resume | Resume existing session | false |
-w, --cwd <DIR> | Working directory | Current dir |
--timeout <SECONDS> | Timeout in seconds | 300 |
--auth-profile <ID> | Auth profile ID to use | Auto-select |
--format <FORMAT> | Output format (text, json) | text |
Examples
Section titled “Examples”# Basic executionrestflow claude -p "Hello, respond with OK"
# Use specific modelrestflow claude -p "Explain Rust ownership" -m opus
# JSON outputrestflow claude -p "List 3 colors" --format json
# Session managementrestflow claude -p "Remember my name is Alice" --session-id my-sessionrestflow claude -p "What's my name?" --session-id my-session --resume
# Pipe inputecho "Explain this code" | restflow claude
# Specify working directoryrestflow claude -p "List files in this project" --cwd ~/projects/myappPrerequisites
Section titled “Prerequisites”Before using restflow claude, you need to configure a ClaudeCode auth profile:
restflow auth add --provider claude-code --key "sk-ant-oat01-..." --name "My Claude Code"See Authentication for details on obtaining and configuring OAuth tokens.
Agent Commands
Section titled “Agent Commands”Manage AI agents.
# List agentsrestflow agent list
# Show agent detailsrestflow agent show <ID>
# Create agentrestflow agent create --name "My Agent" --model sonnet
# Execute agentrestflow agent exec <ID> -i "Your prompt"
# Delete agentrestflow agent delete <ID>Task Commands
Section titled “Task Commands”Manage scheduled tasks.
# List tasksrestflow task list
# Create taskrestflow task create --agent <ID> --name "Daily Report" --cron "0 9 * * *"
# Run task immediatelyrestflow task run <ID>
# Pause/Resume taskrestflow task pause <ID>restflow task resume <ID>Skill Commands
Section titled “Skill Commands”Manage reusable skills.
# List skillsrestflow skill list
# Show skillrestflow skill show <ID>
# Import skill from filerestflow skill import ./my-skill.md
# Export skillrestflow skill export <ID> -o ./exported-skill.mdGlobal Options
Section titled “Global Options”These options are available for all commands:
| Option | Description |
|---|---|
--db-path <PATH> | Custom database path |
-v, --verbose | Enable verbose logging |
--format <FORMAT> | Output format (text, json) |
-h, --help | Print help |