checkly trigger
command executes checks that are already deployed in your Checkly account. Unlike the test
command, trigger
works with any checks in your account regardless of how they were created - via CLI constructs, the web UI, or Terraform.
Prerequisites
Prerequisites
Before using , ensure you have:
- An initialized Checkly CLI project
- At least one check or resource defined in your project
- Valid Checkly account authentication (run
npx checkly login
if needed) - A
checkly.config.ts
orcheckly.config.js
configuration file
Usage
The basic command triggers all checks in your account that are already deployed.Terminal
Option | Description |
---|---|
--config, -c | The Checkly CLI configuration file. If not passed, uses the checkly.config.ts|js file in the current directory. |
--env, -e | Env vars to be passed to the check run. Default: empty. Multiple values can be passed. |
--env-file | dotenv file path to be passed. For example --env-file="./.env" |
--fail-on-no-matching | Exit with a failing status code when there are no matching tests. |
--location, -l | The location to run the checks at. |
--private-location | The private location to run checks at. |
--record | Record check results in Checkly as a test session with full logs, traces and videos. |
--reporter, -r | A list of custom reporters for the test output. |
--retries | How many times to retry a check run. |
--tags, -t | Filter the checks to be run using a comma separated list of tags. |
--test-session-name, -n | A name to use when storing results in Checkly with --record . |
--timeout | A timeout (in seconds) to wait for checks to complete. |
--verbose, -v | Always show the full logs of the checks. |
Command Options
Specify a configuration file to use instead of the
checkly.config.ts
or checkly.config.js
in the current directory.Usage:Terminal
--env
Environment variables to be passed to the check run. Multiple values can be passed and passed variables overwrite any existing variables stored in your Checkly account.Usage:Examples:
Terminal
Terminal
Path to a dotenv file containing environment variables.Usage:Examples:The dotenv file should contain KEY=value pairs, one per line.
Terminal
Terminal
The location to run the checks at.Usage:Choose from available Checkly public locations like us-east-1, eu-west-1, ap-southeast-1, etc.
Terminal
The private location to run checks at.Usage:Examples:Private locations must be configured in your Checkly account before use.
Terminal
Terminal
--tags
Filter checks using tags. Checks run if they contain all specified tags in a single —tags flag. Multiple —tags flags create OR conditions.Usage:Examples:Tags are comma-separated within a single flag for AND logic, multiple flags for OR logic.
Terminal
Terminal
A name to use when storing results in Checkly with
--record
.Usage:Terminal
Custom reporters for test output formatting.Usage:Examples:Available options:
Terminal
Terminal
list
, dot
, ci
, github
, json
. Each provides different output formatting.Always show the full logs of the checks.Usage:
Terminal
Exit with a failing status code when there are no matching tests.Usage:Examples:Enabled by default. Use
Terminal
Terminal
--no-fail-on-no-matching
to allow zero matches without failure.Record check results in Checkly as a test session with full logs, traces and videos.Usage:Examples:Records provide full visibility including logs, traces, and videos for debugging failed checks.
Terminal
Terminal
How many times to retry a failed check run.Usage:Examples:Default: 0, Maximum: 3. Useful for handling transient failures.
Terminal
Terminal
Timeout in seconds to wait for checks to complete.Usage:Examples:Default: 600 seconds (10 minutes). Adjust based on your longest-running checks.
Terminal
Terminal
Key Differences from checkly test
npx checkly test
and npx checkly trigger
serve different purposes in the Checkly ecosystem. Here’s a comparison of their key features:
Feature | checkly test | checkly trigger |
---|---|---|
Source | Local project files | Deployed checks in account |
File patterns | Supports file matching | Not applicable |
Check creation | Can run checks from code | Uses existing checks only |
Snapshots | Can update snapshots | Cannot update snapshots |
Dependencies | Requires local project | Works independently |
Use Cases
Pre-deployment Validation
Run your deployed checks before promoting code to production:Terminal
If your production deployment includes monitoring changes and updates, use
npx checkly test
to validate your preview environment with the updated monitoring configuration.Related Commands
checkly deploy
- Deploy your Checkly configurationcheckly test
- Test your setup before deployment