Skip to main content
The Checkly CLI enables you to code your entire monitoring setup taking full advantage of the flexibility of TypeScript/JavaScript. Reusing language constructs that you are already familiar with, you will be able to create a MaC setup that neatly fits your unique use cases and workflows. This page shows a few examples.

Similar checks from a list of targets

Iterating through lists of target URLs is an easy way to manage checks at scale while avoiding code duplication.
__checks__/api.check.ts
Asynchronous operations are supported by exporting an async function from your check files, too.
__checks__/api.check.ts

Separate groups for prod and pre-prod

Iterating through target environments (like preview and production) linked to Group resources allows you to reuse existing Check definitions.
__checks__/browser.check.ts
You can handle potential differences between target environments via group-level environment variables, which are made available to all checks within a group.
__checks__/group.check.ts