rf login command authenticates you with the RunFlow API using your API key. Supports both default authentication and multi-tenant profile management.
Basic Usage
Interactive Mode
Non-Interactive Mode
Profile Management
Save multiple API keys as named profiles for easy switching between accounts:Learn more about managing multiple profiles in the Profiles
documentation.
Options
| Option | Description | Example |
|---|---|---|
--api-key <key> | Your RunFlow API key | rf login --api-key sk-xxx... |
--profile <name> | Save as named profile | rf login --profile production |
--api <url> | Override API URL | rf login --api https://api.runflow.ai |
Examples
Default Login
Named Profile Login
Custom API URL
Complete Multi-Tenant Setup
What Happens After Login?
After successful authentication:- Credentials Stored - API key saved in
~/.runflowrc - Profile Created - Default or named profile created
- Tenant Info Retrieved - Tenant ID and name fetched from API
- Ready to Use - All CLI commands now work without
--api-key
Configuration File
Credentials are stored in~/.runflowrc:
Security Best Practices
Recommendations:- Never share your
~/.runflowrcfile - Don’t commit
.runflowrcto version control - Use separate API keys for dev/staging/prod
- Rotate keys regularly
- Revoke unused keys from the dashboard
Getting Your API Key
- Go to RunFlow Dashboard
- Navigate to Settings → API Keys
- Click Create New API Key
- Copy the key (starts with
sk-...) - Use it with
rf login
Multi-Tenant Workflows
Agency Managing Multiple Clients
Developer: Dev/Staging/Prod
Troubleshooting
Invalid API Key
Network Connection Error
- Check your internet connection
- Verify API URL is correct
- Check if API is accessible (firewall, VPN)
Permission Denied (Config File)
Overwriting Existing Profile
Command Shortcuts
Next Steps
Profiles
Manage multiple profiles
Create Agent
Create your first agent
Agents
Manage your agents
Test
Test agents locally