Switch between accounts
This guide shows how to switch between your personal account and any organizations you belong to, using both the platform UI and the CLI.
Switch in the UI
The account switcher sits at the top of the sidebar and shows the account you are working in, with its avatar where it has one. If the sidebar is not on the page, open it from the button at the start of the top bar first.
- Click the account name or avatar.
- Select the account or organization you want to switch to from the dropdown.
The platform opens the selected account's home page, and the account's pages now act for that account. Going back in your browser returns to the page and the account you switched from.
Switch with the CLI
The CLI keeps a login for each account you work in. Log in once to each one, your own account and each organization:
swale login --account-name <account-name>
In a terminal it asks for your personal access token, or pass it with --token. The same token works for your own account and every organization you belong to. Logging in also makes that account the current one.
After that, switch between the accounts you have logged in to:
swale account switch <account-name>
After switching, all CLI commands operate under <account-name> until you switch again. Switching to an account you have not logged in to fails and names the login command to run.
Check the current account
CLI:
swale account current
Prints the account name currently active in the CLI session. When the SWALE_ACCOUNT_NAME environment variable is set, the CLI uses that account instead of the stored one, and account current prints it.
List available organizations
swale account organizations
Lists all organizations your authenticated account belongs to. In the platform UI, the same list is under Settings → Organizations, opened from the account menu.