This page describes Checkly CLI version 10 and later.
checkly switch command switches between multiple Checkly accounts that you have access to with your current credentials. Useful when you need to manage monitoring across different organizations or environments.
Prerequisites
Prerequisites
Before using
checkly switch, ensure you have:- Valid Checkly account authentication (run
npx checkly loginif needed) - Access to multiple Checkly accounts (team memberships, client projects, etc.)
Usage
The basic command displays available accounts and provides an interactive selection interface. It changes the default account: the one commands use from then on.Terminal
Without a terminal to answer the menu,
checkly switch lists the accounts instead:
- In CI and other runs without a terminal, it fails with the available accounts and the
--account-idcommand to use. - Under an AI agent, it prints a JSON line with the default account and the choices, so the agent can ask you which account to use.
While
CHECKLY_ACCOUNT_ID is set, commands use that account instead of the default; checkly switch still changes the default and warns. See Working with several accounts.Command Options
string
The
switch command asks you to select an account interactively by default. Use this option to switch accounts non-interactively by specifying the target account ID directly.Usage:Terminal
Examples
- Standard Switch
- Automatic Switch
Terminal
Troubleshooting
Account Not Listed
If an expected account doesn’t appear:- Verify you have active access to that account
- Check that your user hasn’t been removed from the account
- Try logging out and back in to refresh account permissions
Related Commands
checkly login- Sign in to your Checkly accountcheckly whoami- Display current account information