CLI Reference
Command-line interface for RelayPlane workflow management and cloud integration.
Installation
The CLI is included with the SDK, or install it separately:
1# Install with SDK (recommended)2npm install @relayplane/sdk34# Or install CLI only5npm install -g @relayplane/cliThe CLI provides two commands: relay and relayplane (both are aliases).
Commands
relay login
Authenticate with RelayPlane Cloud using device OAuth flow. Opens a browser for secure authentication.
1npx relay login23# Output:4# RelayPlane CLI - Login5#6# 🔐 Starting device authorization...7#8# ┌─────────────────────────────────────────────────────────┐9# │ Please complete the following steps to login: │10# │ │11# │ 1) Open this URL in your browser: │12# │ https://relayplane.com/auth/device │13# │ │14# │ 2) Enter this code: │15# │ ABCD-1234 │16# │ │17# │ Waiting for you to complete login... │18# └─────────────────────────────────────────────────────────┘relay logout
Clear cloud credentials and disconnect from RelayPlane Cloud.
1npx relay logoutrelay status
Show current CLI status, cloud connection, and detected workflows.
1npx relay status23# Output (when connected):4# RelayPlane Status5# ─────────────────6# Mode: Local + Cloud7# Team: my-team8# Plan: pro9#10# Cloud features:11# ✓ Webhooks12# ✓ Scheduled workflows13# ✓ Run history14# ✓ Cloud telemetry15# ✓ Team access16#17# Project:18# Workflows: 5 detected1920# Output (local only):21# RelayPlane Status22# ─────────────────23# Mode: Local-only24# Cloud: Not connected25# Workflows: 3 local workflows detectedrelay workflows
List all workflows discovered in the current project.
1npx relay workflows23# Output:4# Discovering workflows in current project...5#6# Found 3 workflows:7#8# ────────────────────────────────────────────────────────────────────────────────9# Name Steps Cloud File10# ────────────────────────────────────────────────────────────────────────────────11# invoice-processor 3 ✓ enabled invoice.ts12# ticket-router 2 ✓ enabled support.ts13# greeting-workflow 2 - greet.ts14# ────────────────────────────────────────────────────────────────────────────────workflows/, src/workflows/, and app/workflows/relay sync
Sync local workflows with RelayPlane Cloud. Registers workflows for webhooks, schedules, and tracking.
1npx relay sync23# Output:4# Discovering workflows...5# Found 3 workflows6#7# Syncing with RelayPlane Cloud...8#9# ✓ invoice-processor synced10# ↻ ticket-router updated11# - greeting-workflow unchanged12#13# ✓ 2 workflows synced successfully.14#15# Your workflows are now available for:16# • Webhook triggers17# • Scheduled execution18# • Run history tracking19# • Team collaborationrelay dashboard
Open the RelayPlane Cloud dashboard in your browser.
1npx relay dashboardWorkflow Discovery
The CLI automatically discovers workflows in these locations:
- •
workflows/ - •
src/workflows/ - •
app/workflows/
Place your workflow files in any of these directories and they'll be automatically detected.
Cloud Features
When connected to RelayPlane Cloud, your workflows gain access to:
- •Webhooks - Trigger workflows via HTTP requests
- •Schedules - Run workflows on cron schedules
- •Run History - View past executions and outputs
- •Team Access - Collaborate with team members
- •Telemetry - Monitor performance and costs
Typical Workflow
1# 1. Login to cloud (one-time)2npx relay login34# 2. Check status5npx relay status67# 3. List discovered workflows8npx relay workflows910# 4. Sync workflows to cloud11npx relay sync1213# 5. Open dashboard to configure webhooks/schedules14npx relay dashboardLocal-Only Mode
RelayPlane works completely offline without cloud connection. Cloud features are optional additions for:
- •Teams that need webhook triggers
- •Scheduled/recurring workflows
- •Historical run tracking
- •Team collaboration
Troubleshooting
No workflows found
Ensure your workflow files are in one of the discovery locations and export workflows properly:
1// src/workflows/my-workflow.ts2import { relay } from '@relayplane/sdk';34export const myWorkflow = relay5 .workflow('my-workflow')6 .step('process')7 .with('openai:gpt-4o')8 .prompt('Process the input...');Login issues
If login fails or times out:
- 1.Ensure you have internet connectivity
- 2.Try
relay logoutthenrelay loginagain - 3.Check if your browser blocked the popup