Registry / devops / checkly

checkly

JSON →
library7.12.0jsnpmunverified

The Checkly CLI provides a JavaScript/TypeScript-native workflow for implementing "monitoring as code," allowing developers to define, test, and deploy synthetic monitoring checks directly from their codebase. This approach integrates monitoring into the development pipeline, enabling version control, code reviews, and automated deployments. The current stable version is 7.12.0, with minor releases occurring frequently, often weekly or bi-weekly. Key differentiators include first-class support for `@playwright/test` for browser checks, a TypeScript-first design for robust type-checking and autocompletion, and the flexibility to run checks either on the Checkly cloud platform or within private locations on-premise, emphasizing a developer-centric experience.

npm install checkly
INSTALL
IMPORT
SIG · CHECKLY
C
checkly
devopsjavascriptv7.12.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ApiCheck, AssertionBuilder
✓ import { ApiCheck, AssertionBuilder } from 'checkly/constructs'
✗ const { ApiCheck, AssertionBuilder } = require('checkly/constructs')
These symbols are used to define API monitoring checks programmatically. CommonJS 'require' syntax is not supported for these ESM-first constructs.
test, expect
✓ import { test, expect } from '@playwright/test'
✗ import { test, expect } from 'checkly'
For browser checks, Checkly CLI leverages Playwright. 'test' and 'expect' are imported directly from '@playwright/test', which should be installed as a dev dependency in your project.
(CLI Commands)
✓ npx checkly <command>
✗ import { deploy } from 'checkly'
The Checkly CLI is primarily interacted with via the `npx checkly` command-line interface. Direct programmatic import of CLI commands from the 'checkly' package for execution is not the intended usage for end-users.

This code defines a simple API check and a Playwright-based browser check for a webshop, demonstrating how to write monitoring as code. It includes instructions for local testing and deployment to the Checkly cloud via the CLI.

import { ApiCheck, AssertionBuilder } from 'checkly/constructs'; import { test, expect } from '@playwright/test'; import * as path from 'path'; // --- API Check Example (api.check.ts) --- // Define an API check for a public endpoint. new ApiCheck('books-api-check-1', { name: 'Books API Status', request: { url: 'https://danube-web.shop/api/books', method: 'GET', assertions: [ AssertionBuilder.statusCode().equals(200), AssertionBuilder.jsonBody('$[0].id').isNotNull(), ], }, }); // --- Browser Check Example (homepage.spec.ts) --- // Define a Playwright-based browser check for a homepage. test('webshop homepage loads and has title', async ({ page }) => { const response = await page.goto('https://danube-web.shop'); expect(response?.status()).toBeLessThan(400); // Expect a successful HTTP status code await expect(page).toHaveTitle(/Danube WebShop/); // Optionally take a screenshot upon successful load const screenshotPath = path.join(process.cwd(), 'homepage.jpg'); await page.screenshot({ path: screenshotPath }); console.log(`Screenshot saved to: ${screenshotPath}`); }); // To run these checks after saving them in your project (e.g., in `__checks__` directory): // 1. Install Checkly CLI and Playwright: `npm install --save-dev checkly @playwright/test` // 2. Log in to your Checkly account: `npx checkly login` (Requires a Checkly account) // 3. Run tests locally: `npx checkly test` // 4. Deploy checks to the Checkly cloud: `npx checkly deploy`
checkly --version
Debug
Known issues
breakingThe Checkly CLI requires Node.js version 18.19.0 or greater, or 20.5.0 or greater. Older Node.js versions are not supported and will prevent the CLI from running correctly. Ensure your environment meets these engine requirements.
fix
Upgrade your Node.js environment to a supported version (e.g., using `nvm install 20 && nvm use 20` or similar version manager).
affects: >=7.0.0
gotchaWhen defining checks in TypeScript, the CLI relies on a TypeScript loader (like 'jiti'). If you install the CLI manually (`npm install checkly`) instead of using `npm create checkly@latest`, you might need to ensure 'jiti' and 'typescript' are correctly installed and configured as peer dependencies.
fix
For an easy setup, use `npm create checkly@latest`. If installing manually, ensure `npm install --save-dev jiti typescript` is run to satisfy peer dependencies and allow TypeScript transpilation.
affects: >=7.0.0
gotchaBrowser checks are written using `@playwright/test`. This package needs to be installed as a dev dependency in your project for browser checks to function correctly, even though Checkly CLI orchestrates their execution.
fix
Install Playwright: `npm install --save-dev @playwright/test`.
affects: >=7.0.0
gotchaThe Checkly CLI supports AI Agent capabilities, which can be extended by installing 'skills'. This functionality, introduced in v7.7.0, requires an additional `npx skills add checkly/checkly-cli` command to provide AI coding assistants with full context.
fix
Run `npx skills add checkly/checkly-cli` to enable enhanced AI coding assistant features for Checkly CLI within supported AI environments.
affects: >=7.7.0
Errors
Common errors & fixes
Error: TypeScript loader is missing
The Checkly CLI could not find a suitable TypeScript loader to transpile your `.ts` check files, often due to missing 'jiti' or 'typescript' packages, or incorrect `tsconfig.json` configuration.
fix
Ensure `jiti` and `typescript` are installed as `devDependencies` (`npm install --save-dev jiti typescript`) and that your `tsconfig.json` is correctly set up. Using `npm create checkly@latest` is recommended for initial setup.
Error: Cannot find module 'jiti'
The `jiti` peer dependency, required by Checkly CLI for runtime transpilation, is missing from your project's `node_modules`.
fix
Install `jiti` explicitly: `npm install jiti` or `npm install --save-dev jiti`.
Node.js version not supported
Your current Node.js version does not meet the minimum requirements (`^18.19.0 || >=20.5.0`) specified by the `checkly` package's engine field.
fix
Upgrade your Node.js environment to a supported version using a tool like `nvm` (e.g., `nvm install 20 && nvm use 20`).
Upgrade
Version history
7.12.0latest on npm
Audit
Dependencies
jitirequiredPeer dependency required for runtime code execution/transpilation of TypeScript check files.
Agent activity
23 hits · last 30 days
node
22
OpenAI (training)
1
Resources
checkly — npm install checkly · libregistry