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).
Installation
Section titled “Installation”Homebrew (macOS/Linux)
brew install lhwzds/tap/restflownpm (Cross-platform)
npm install -g restflow-cliBuild from Source
cargo install --git https://github.com/lhwzds/restflow --package restflow-cliCommands Overview
Section titled “Commands Overview”| Command | Description |
|---|---|
restflow start | Start the daemon (background service) |
restflow stop | Stop the daemon |
restflow status | Show daemon status |
restflow restart | Restart the daemon |
restflow upgrade | Upgrade CLI to latest release |
restflow daemon | Daemon management (start/stop/status/restart) |
restflow agent | Agent management (list/show/create/update/delete) |
restflow auth | Authentication profile management |
restflow key | API key management |
restflow skill | Skill management |
restflow secret | Secret management |
restflow memory | Memory operations |
restflow session | Chat session management |
restflow security | Security approvals and allowlists |
restflow config | Configuration management |
restflow mcp | MCP server management |
restflow hook | Hook management |
restflow info | Show system information |
restflow completions | Generate shell completions |
Daemon Commands
Section titled “Daemon Commands”The daemon runs in the background, enabling Telegram bot integration, scheduled tasks, and the MCP HTTP server (port 8787).
# Start daemon (shorthand)restflow start
# Start daemon with daemon subcommandrestflow daemon start
# Start in foreground (for debugging)restflow daemon start --foreground
# Custom MCP portrestflow daemon start --mcp-port 9000
# Check statusrestflow status# orrestflow daemon status
# Stop daemonrestflow stop
# Restartrestflow restartAgent 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
# Update agentrestflow agent update <ID> --name "New Name" --model opus
# Delete agentrestflow agent delete <ID>Auth Commands
Section titled “Auth Commands”Manage authentication profiles for LLM providers.
# Add a new auth profilerestflow auth add --provider claude-code --key "sk-ant-oat01-..." --name "My Claude Code"
# List auth profilesrestflow auth list
# Show profile detailsrestflow auth show <ID>
# Remove profilerestflow auth remove <ID>
# Check auth statusrestflow auth status
# Auto-discover credentialsrestflow auth discoverSee Authentication for details on obtaining and configuring credentials.
Key Commands
Section titled “Key Commands”Simplified API key management.
# Add API keyrestflow key add anthropic sk-ant-xxx
# List keysrestflow key list
# Show key detailsrestflow key show <ID>
# Use a key as defaultrestflow key use <ID>
# Test a keyrestflow key test <ID>
# Remove a keyrestflow key remove <ID>
# Auto-discover keys from environmentrestflow key discoverSecret Commands
Section titled “Secret Commands”Manage API keys and credentials stored in the encrypted database.
# Set a secretrestflow secret set ANTHROPIC_API_KEY sk-ant-xxx
# List secretsrestflow secret list
# Check if a secret existsrestflow secret has ANTHROPIC_API_KEY
# Delete a secretrestflow secret delete ANTHROPIC_API_KEYMemory Commands
Section titled “Memory Commands”Manage agent long-term memory.
# Search memoryrestflow memory search "deployment process"
# List memory entriesrestflow memory list
# Export memoryrestflow memory export
# Show memory statsrestflow memory stats
# Clear all memoryrestflow memory clearSkill Commands
Section titled “Skill Commands”Manage reusable skills.
# List skillsrestflow skill list
# Show skillrestflow skill show <ID>
# Create skillrestflow skill create --name "My Skill"
# Import skill from filerestflow skill import ./my-skill.md
# Export skillrestflow skill export <ID>
# Search skillsrestflow skill search "web scraping"
# Install skill from sourcerestflow skill install <SOURCE>
# Delete skillrestflow skill delete <ID>Session Commands
Section titled “Session Commands”Manage chat sessions.
# List sessionsrestflow session list
# Show session detailsrestflow session show <ID>
# Create a new sessionrestflow session create
# Search sessionsrestflow session search "topic"
# Delete sessionrestflow session delete <ID>Security Commands
Section titled “Security Commands”Manage security approvals and allowlists.
# List pending approvalsrestflow security approvals
# Approve a pending requestrestflow security approve <ID>
# Reject a pending requestrestflow security reject <ID>
# Show allowlistrestflow security allowlist show
# Add to allowlistrestflow security allowlist add <PATTERN>
# Remove from allowlistrestflow security allowlist remove <PATTERN>MCP Commands
Section titled “MCP Commands”Manage MCP (Model Context Protocol) servers.
# List MCP serversrestflow mcp list
# Add MCP serverrestflow mcp add <NAME> <COMMAND>
# Remove MCP serverrestflow mcp remove <NAME>
# Start MCP serverrestflow mcp start <NAME>
# Stop MCP serverrestflow mcp stop <NAME>
# Serve as MCP stdio serverrestflow mcp serveConfig Commands
Section titled “Config Commands”Manage RestFlow configuration.
# Show all configrestflow config show
# Get a specific config valuerestflow config get <KEY>
# Set a config valuerestflow config set <KEY> <VALUE>
# Reset config to defaultsrestflow config resetHook Commands
Section titled “Hook Commands”Manage event hooks (webhooks, scripts, notifications).
# List hooksrestflow hook list
# Create a hookrestflow hook create --name "Deploy Notify" --event task_completed --action send_message
# Delete a hookrestflow hook delete <ID>
# Test a hookrestflow hook test <ID>Shell Completions
Section titled “Shell Completions”Generate shell completions for your shell:
# Bashrestflow completions bash > restflow.bash
# Zshrestflow completions zsh > _restflow
# Fishrestflow completions fish > restflow.fishOther Commands
Section titled “Other Commands”# Show system informationrestflow info
# Upgrade to latest versionrestflow upgrade
# Migrate configuration from old locationsrestflow migraterestflow migrate --dry-run # Preview changesGlobal 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 |
-V, --version | Print version |