Profiles and Overrides
You can use multiple profiles with Clever Tools, all stored in the configuration file. The active profile is the first one in the list and is used for all commands. Each profile contains your authentication data and an optional set of overrides for custom Clever Cloud deployments (API host, Console URL, etc.).
Tip
The configuration file lives in your OS config directory:
- Windows:
%APPDATA%\clever-cloud\clever-tools.json - Other systems: XDG config directory (typically
~/.config/clever-cloud/clever-tools.json)
Create and use multiple profiles
By default, clever login stores a profile under the default alias. To manage multiple accounts, log in with explicit aliases:
clever login --alias personal
clever login --alias workList and inspect profiles (the active one is marked):
clever profile listSwitch to another profile:
clever profile switch --alias workLog out from a specific profile:
clever logout --alias personalOverrides
Overrides are stored per profile and are applied only when that profile is active. You can set them at login time:
clever login --alias staging \
--api-host https://api.clever-cloud.com \
--console-url https://console.clever-cloud.com \
--auth-bridge-host https://api-bridge.clever-cloud.com \
--ssh-gateway ssh@sshgateway-clevercloud-customers.services.clever-cloud.com \
--oauth-consumer-key MY_KEY \
--oauth-consumer-secret MY_SECRETResolution order for configuration values:
- Defaults provided by Clever Tools
- Active profile overrides
- Environment variables
To change overrides later, log in again with the same alias. The profile will be replaced and becomes active.
Special cases
- If
CLEVER_TOKENandCLEVER_SECRETare set, Clever Tools injects a virtual$envprofile that becomes active. You cannot switch or logout while$envis active; unset those environment variables first. - The alias
$envis reserved and cannot be used withclever login --alias. - If there is only one stored profile,
clever profile switchfails. With exactly two profiles and no--alias, it switches to the other one; with more than two, it prompts you to pick a profile. - Logging in with an existing alias replaces the stored profile (including any previous overrides) and makes it active.
Did this documentation help you ?