Skip to main content
RunFlow CLI supports multi-tenant profiles. A profile stores a login session — who you are, which tenant is active, and which API you’re talking to — so you can switch between accounts, clients, and environments without re-entering credentials. A profile is created automatically when you run rf login. Browser logins store your tokens (refreshed automatically); API-key logins store the key.

Why Use Profiles?

Profiles are perfect for:
  • Agencies managing multiple client accounts
  • Developers working across dev, staging, and production
  • Teams switching between different projects
  • Consultants handling multiple customer environments

Commands Overview

Creating Profiles

There’s no separate “create profile” command — a profile is created (and activated) when you log in:

Non-Interactive Profile Creation (API Key)

For CI/CD and scripts, create profiles with API keys directly:

Switching: Tenants vs. Profiles

rf switch behaves according to how the active profile was created:
  • Browser (OIDC) loginrf switch moves between the tenants of the active account. No new login needed.
  • API-key loginrf switch <name> moves between your saved local profiles.
To activate a different environment (another profile with its own API URL), log into it again — rf login --profile <name> both creates and activates that profile. See Self-Hosted & Multiple Environments.

Interactive Switch

Direct Switch

Listing Profiles

Show Current Profile

Deleting Profiles

You cannot delete the currently active profile. Switch to another profile first.
To just sign out of a profile while keeping its API URL and provider, use rf logout <name> instead of deleting it — signing back in becomes a single rf login.

Multi-Tenant Workflow Example

Agency Managing Multiple Clients

If your RunFlow account has access to each client’s tenant, one login is enough:

Developer: Dev, Staging, Production

Separate environments (different API URLs) live in separate profiles:
For CI pipelines, use API-key profiles instead:

Configuration File

Profiles are stored in ~/.runflowrc (YAML):
The config file is automatically managed by the CLI. You typically don’t need to edit it manually.

Profile Aliases

You can use profile names in any command that requires authentication:

Best Practices

1. Use Descriptive Names

The default name (the tenant name) is usually fine. When naming manually:

2. Separate Environments

3. Client Naming Convention

For agencies managing multiple clients across environments:

Security Considerations

Tokens and API keys are stored in plain text in ~/.runflowrc. Ensure this file has proper permissions:

Best Practices:

  • Don’t share your ~/.runflowrc file
  • Prefer browser login for humans; reserve API keys for automation
  • Use environment-specific API keys
  • Rotate keys regularly
  • Delete unused profiles
  • Never commit .runflowrc to git

Troubleshooting

Profile Not Found

Solution: List available profiles with rf profiles and use an existing one. Remember: with a browser login, rf switch expects a tenant name, not a profile name.

Cannot Delete Current Profile

Solution: Switch to another profile first:

Expired Session

If a browser-login session can no longer refresh (long inactivity, revoked access), just log in again — the profile keeps its API URL and provider:

Lost API Key

If you lose access to a profile’s API key:

Next Steps

Login

Learn more about authentication

Self-Hosted

Multiple environments and custom APIs

Create Agent

Create agents with your profile

Agents

Manage agents across profiles