Skip to content

CLI Reference

RestFlow provides a powerful command-line interface for managing agents, secrets, and the daemon service. Both restflow and rf command names are supported (via Homebrew and npm installs).

Homebrew (macOS/Linux)

Terminal window
brew install lhwzds/tap/restflow

npm (Cross-platform)

Terminal window
npm install -g restflow-cli

Build from Source

Terminal window
cargo install --git https://github.com/lhwzds/restflow --package restflow-cli
CommandDescription
restflow startStart the daemon (background service)
restflow stopStop the daemon
restflow statusShow daemon status
restflow restartRestart the daemon
restflow upgradeUpgrade CLI to latest release
restflow daemonDaemon management (start/stop/status/restart)
restflow agentAgent management (list/show/create/update/delete)
restflow authAuthentication profile management
restflow keyAPI key management
restflow skillSkill management
restflow secretSecret management
restflow memoryMemory operations
restflow sessionChat session management
restflow securitySecurity approvals and allowlists
restflow configConfiguration management
restflow mcpMCP server management
restflow hookHook management
restflow infoShow system information
restflow completionsGenerate shell completions

The daemon runs in the background, enabling Telegram bot integration, scheduled tasks, and the MCP HTTP server (port 8787).

Terminal window
# Start daemon (shorthand)
restflow start
# Start daemon with daemon subcommand
restflow daemon start
# Start in foreground (for debugging)
restflow daemon start --foreground
# Custom MCP port
restflow daemon start --mcp-port 9000
# Check status
restflow status
# or
restflow daemon status
# Stop daemon
restflow stop
# Restart
restflow restart

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
# Update agent
restflow agent update <ID> --name "New Name" --model opus
# Delete agent
restflow agent delete <ID>

Manage authentication profiles for LLM providers.

Terminal window
# Add a new auth profile
restflow auth add --provider claude-code --key "sk-ant-oat01-..." --name "My Claude Code"
# List auth profiles
restflow auth list
# Show profile details
restflow auth show <ID>
# Remove profile
restflow auth remove <ID>
# Check auth status
restflow auth status
# Auto-discover credentials
restflow auth discover

See Authentication for details on obtaining and configuring credentials.

Simplified API key management.

Terminal window
# Add API key
restflow key add anthropic sk-ant-xxx
# List keys
restflow key list
# Show key details
restflow key show <ID>
# Use a key as default
restflow key use <ID>
# Test a key
restflow key test <ID>
# Remove a key
restflow key remove <ID>
# Auto-discover keys from environment
restflow key discover

Manage API keys and credentials stored in the encrypted database.

Terminal window
# Set a secret
restflow secret set ANTHROPIC_API_KEY sk-ant-xxx
# List secrets
restflow secret list
# Check if a secret exists
restflow secret has ANTHROPIC_API_KEY
# Delete a secret
restflow secret delete ANTHROPIC_API_KEY

Manage agent long-term memory.

Terminal window
# Search memory
restflow memory search "deployment process"
# List memory entries
restflow memory list
# Export memory
restflow memory export
# Show memory stats
restflow memory stats
# Clear all memory
restflow memory clear

Manage reusable skills.

Terminal window
# List skills
restflow skill list
# Show skill
restflow skill show <ID>
# Create skill
restflow skill create --name "My Skill"
# Import skill from file
restflow skill import ./my-skill.md
# Export skill
restflow skill export <ID>
# Search skills
restflow skill search "web scraping"
# Install skill from source
restflow skill install <SOURCE>
# Delete skill
restflow skill delete <ID>

Manage chat sessions.

Terminal window
# List sessions
restflow session list
# Show session details
restflow session show <ID>
# Create a new session
restflow session create
# Search sessions
restflow session search "topic"
# Delete session
restflow session delete <ID>

Manage security approvals and allowlists.

Terminal window
# List pending approvals
restflow security approvals
# Approve a pending request
restflow security approve <ID>
# Reject a pending request
restflow security reject <ID>
# Show allowlist
restflow security allowlist show
# Add to allowlist
restflow security allowlist add <PATTERN>
# Remove from allowlist
restflow security allowlist remove <PATTERN>

Manage MCP (Model Context Protocol) servers.

Terminal window
# List MCP servers
restflow mcp list
# Add MCP server
restflow mcp add <NAME> <COMMAND>
# Remove MCP server
restflow mcp remove <NAME>
# Start MCP server
restflow mcp start <NAME>
# Stop MCP server
restflow mcp stop <NAME>
# Serve as MCP stdio server
restflow mcp serve

Manage RestFlow configuration.

Terminal window
# Show all config
restflow config show
# Get a specific config value
restflow config get <KEY>
# Set a config value
restflow config set <KEY> <VALUE>
# Reset config to defaults
restflow config reset

Manage event hooks (webhooks, scripts, notifications).

Terminal window
# List hooks
restflow hook list
# Create a hook
restflow hook create --name "Deploy Notify" --event task_completed --action send_message
# Delete a hook
restflow hook delete <ID>
# Test a hook
restflow hook test <ID>

Generate shell completions for your shell:

Terminal window
# Bash
restflow completions bash > restflow.bash
# Zsh
restflow completions zsh > _restflow
# Fish
restflow completions fish > restflow.fish
Terminal window
# Show system information
restflow info
# Upgrade to latest version
restflow upgrade
# Migrate configuration from old locations
restflow migrate
restflow migrate --dry-run # Preview changes

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
-V, --versionPrint version