This page describes Checkly CLI version 10 and later.
checkly login command authenticates with Checkly by signing up for a new account or logging in to your existing account.
The CLI shows a URL and a short code. Open the URL in a browser on any device, enter the code, and log in or sign up there. The browser doesn’t have to run on the same machine as the CLI, so this also works over SSH, in containers and from AI agents.
Prerequisites
Prerequisites
Before using
checkly login, ensure you have:- Checkly CLI installed
- A web browser on any device (it doesn’t have to be the machine running the CLI)
- Internet connection for authentication flow
Usage
The basic command initiates the login process and authenticates with your Checkly account.Terminal
Examples
Terminal
Options
Authentication Flow
The login process will:- Show a URL and a code, and open your default browser on that URL when it can
- Wait until you have logged in or signed up in the browser
- Prompt for account selection if you have multiple accounts
- Store authentication tokens locally for future CLI usage
- Display confirmation with your account information
checkly login first.
AI agents
When the CLI runs under an AI agent,checkly login prints a JSON line with the URL and code for the agent to pass on to you, and exits instead of waiting. The agent then runs npx checkly login --wait, which returns as soon as you’ve approved the login in the browser, so you don’t have to tell the agent when you’re done. If you have several accounts, the agent asks you which one to use. In CI, set environment variables instead.
New Users
If you don’t have a Checkly account:- Click “Sign up” on the authentication page
- Complete account registration
- Return to the CLI - you’ll be automatically logged in
Existing Users
If you already have an account:- Enter your credentials on the authentication page
- Complete any two-factor authentication if enabled
- Return to the CLI - authentication will complete automatically
Authentication Storage
After successful login, the CLI stores authentication tokens locally in:- macOS:
~/Library/Preferences/@checkly/cli/auth.json - Linux:
~/.config/@checkly/cli/auth.json - Windows:
%APPDATA%\@checkly\cli\Config\auth.json
Troubleshooting
Browser doesn’t open automatically
Open the displayed URL in a browser on any device and enter the code.Logging in as a different user
Runcheckly logout first, then checkly login again.
Multiple accounts
If you have access to multiple Checkly accounts, you’ll be prompted to select which account to use as the default account for CLI operations. You can also switch accounts later usingcheckly switch or checkly login --account-id <id>, or use another account for a single command with CHECKLY_ACCOUNT_ID. See Working with several accounts.
Environment variables
WhileCHECKLY_API_KEY is set, checkly login refuses to run; remove it to log in. With only CHECKLY_ACCOUNT_ID set, checkly login uses that account without asking and stores no default.
Related Commands
checkly logout- Sign out of your Checkly accountcheckly whoami- Display current account informationcheckly switch- Switch between multiple accounts