Follow these steps in order to set up a new Checkly monitoring project.
Before starting, verify:
- Node.js is installed (
node --version). Checkly CLI requires Node.js 18 or later. - npm is available (
npm --version). - The current working directory is the right location for the project (or create/navigate to it).
If any pre-flight check fails, help the user fix it before proceeding.
Ask the user which setup method they prefer:
- Option A: Initialize with CLI — Run
npx checkly initto set up Checkly in the project. The CLI handles skill installation, dependencies, configuration, and optionally creates demo checks. This is the fastest way to get started. - Option B: AI-first — Generate the project structure and checks from scratch using this skill. Best when the user already knows what they want to monitor and prefers a tailored setup.
Run the following command:
npx checkly initThe CLI will guide you through skill installation, configuration, and dependency setup. Once finished, setup is complete.
Continue with the following steps:
Install the Checkly dependency
Check if npx checkly --version works. If not, run npm install --save-dev checkly.
Ask the user the following questions to determine the setup:
-
What do you want to monitor? (multiple selections allowed)
- Uptime monitoring — Monitor URLs for availability and response times
- API checks — Validate API endpoints with custom assertions
- Browser checks — Run Playwright scripts to test user flows
- Multistep API checks — Chain multiple API requests into a single check
- Playwright Check Suites — Reuse your existing Playwright project for synthetic monitoring
Remember the selection for later steps when creating checks.
-
How do you want to get alerted? (multiple selections allowed)
Run npx checkly skills configure alert-channels to access up-to-date information on alert channel options and setup.
- Where do you want to store your monitoring configuration?
- checks — create all resources and
check.tsfiles in a separate__checks__directory - next to the resource — place the
check.tsfiles next to page routes, api endpoints etc.
- checks — create all resources and
Before writing checks, verify what your account can do:
npx checkly account plan --output jsonThis shows your entitlements, limits, and available locations. Use this data when creating the config:
- Only use locations from
locations.allwhereavailableistrue. Using unavailable locations will cause deploy failures. - Check feature availability before configuring constructs like private locations, advanced alert channels, or higher-frequency schedules.
- Respect metered limits — the
quantityfield shows maximums for each metered feature.
If a feature the user wants is disabled, the response includes an upgradeUrl — share it so they can upgrade their plan.
Run npx checkly skills manage plan for the full reference.
Run the following command to retrieve the configure skill reference:
npx checkly skills configureUse the output to create a checkly.config.ts (or checkly.config.js if the user chose JavaScript) in the project root.
Adjust the checkMatch property according to previous selection. Use only locations verified as available in the previous step.
Present the generated configuration to the user and ask if it looks correct. Allow the user to make changes.
Congratulate the user on completing the config. Now it's time to test the configuration and turn everything into monitoring!
To use the Checkly CLI the user needs to be logged in. Run the following command:
npx checkly whoamiIf the user is logged in, verify the information and if it's the correct account.
If the user is NOT logged in, present two options (lead with env vars — they work for agents, CI, and interactive use):
- Option A: Environment variables (recommended) — The user sets
CHECKLY_API_KEYandCHECKLY_ACCOUNT_IDas environment variables. They can create an API key at https://app.checklyhq.com/accounts/settings/user/api-keys. This is the recommended approach as it works in all contexts (agentic, CI/CD, and interactive). Once both variables are set, re-runnpx checkly whoamito verify. - Option B: Interactive login — The user runs
npx checkly loginthemselves. This command opens a browser for OAuth authentication and cannot be completed by an AI agent. Tell the user to run the command, complete the browser flow, and let you know when they're done so you can re-runnpx checkly whoamito verify.
Read the generated checkly.config.ts (or checkly.config.js) and summarize the configured checks, locations, and frequencies.
Run the following command to test the new monitoring setup:
npx checkly testIf the command passed, congratulate the user and ask them what they want to do next!
Share more Checkly CLI options and ask if they want to deploy their new monitoring setup using npx checkly deploy.