From 9210e8548b453583c1fe0ce76a6e570d2d516a27 Mon Sep 17 00:00:00 2001 From: Herve Labas Date: Wed, 15 Jul 2026 16:04:02 +0200 Subject: [PATCH 1/2] docs(cli): document alert channel commands --- cli/checkly-alert-channels.mdx | 294 +++++++++++++++++++++++++++++++++ docs.json | 1 + sitemap.xml | 3 + 3 files changed, 298 insertions(+) create mode 100644 cli/checkly-alert-channels.mdx diff --git a/cli/checkly-alert-channels.mdx b/cli/checkly-alert-channels.mdx new file mode 100644 index 00000000..5ebe6022 --- /dev/null +++ b/cli/checkly-alert-channels.mdx @@ -0,0 +1,294 @@ +--- +title: checkly alert-channels +description: 'List and inspect alert channels and their notification logs from the Checkly CLI.' +sidebarTitle: 'checkly alert-channels' +canonical: 'https://www.checklyhq.com/docs/cli/checkly-alert-channels/' +--- + +Available since CLI v8.5.0. + +The `checkly alert-channels` commands let you inspect the alert channels in your account and troubleshoot notification delivery from the terminal. These commands are read-only and don't change your [alert channel configuration](/communicate/alerts/channels). + + +Before using `checkly alert-channels`, ensure you have: + +- Checkly CLI installed +- Valid Checkly account authentication (run `npx checkly login` if needed) + +For additional setup information, see [CLI overview](/cli/overview). + + +## Usage + +```bash Terminal +npx checkly alert-channels [arguments] [options] +``` + +## Subcommands + +| Subcommand | Description | +|------------|-------------| +| `list` | List all alert channels in your account. | +| `get` | Get details of an alert channel. | +| `logs` | List notification logs for an alert channel. | + +## `checkly alert-channels list` + +List the alert channels in your account. The default table includes each channel's ID, type, name, subscription count, and creation date. + +**Usage:** + +```bash Terminal +npx checkly alert-channels list [options] +``` + +**Options:** + +| Option | Required | Description | +|--------|----------|-------------| +| `--limit, -l` | - | Number of alert channels to return (1-100). Default: `25`. | +| `--page, -p` | - | Page number. Default: `1`. | +| `--output, -o` | - | Output format: `table`, `json`, or `md`. Default: `table`. | + +### List Options + + + +Set the number of alert channels to return per page, between 1 and 100. + +**Usage:** + +```bash Terminal +npx checkly alert-channels list --limit=50 +npx checkly alert-channels list -l 10 +``` + + + + + +Select the page of alert channels to return. + +**Usage:** + +```bash Terminal +npx checkly alert-channels list --limit=10 --page=2 +``` + + + + + +Set the output format. Use `json` for programmatic access or `md` for markdown. + +**Usage:** + +```bash Terminal +npx checkly alert-channels list --output=json +npx checkly alert-channels list -o md +``` + + + +### List Examples + +```bash Terminal +# List the first page of alert channels +npx checkly alert-channels list + +# List the second page with 50 channels per page +npx checkly alert-channels list --limit=50 --page=2 + +# Get alert channels as JSON +npx checkly alert-channels list --output=json +``` + +## `checkly alert-channels get` + +Get the configuration and subscriptions for a specific alert channel. + +**Usage:** + +```bash Terminal +npx checkly alert-channels get [options] +``` + +**Arguments:** + +| Argument | Description | +|----------|-------------| +| `id` | The numeric ID of the alert channel to retrieve. | + +**Options:** + +| Option | Required | Description | +|--------|----------|-------------| +| `--output, -o` | - | Output format: `detail`, `json`, or `md`. Default: `detail`. | + +### Get Options + + + +Set the output format. Use `json` for programmatic access or `md` for markdown. + +**Usage:** + +```bash Terminal +npx checkly alert-channels get 12345 --output=json +npx checkly alert-channels get 12345 -o md +``` + + + +### Get Examples + +```bash Terminal +# View alert channel details and subscriptions +npx checkly alert-channels get 12345 + +# Get the alert channel as JSON +npx checkly alert-channels get 12345 --output=json +``` + +## `checkly alert-channels logs` + +List [notification log](/communicate/alerts/notification-log) entries for a specific alert channel. Use this command to identify failed deliveries or inspect notifications from a specific time window. + +**Usage:** + +```bash Terminal +npx checkly alert-channels logs [options] +``` + +**Arguments:** + +| Argument | Description | +|----------|-------------| +| `id` | The numeric ID of the alert channel whose logs you want to retrieve. | + +**Options:** + +| Option | Required | Description | +|--------|----------|-------------| +| `--limit, -l` | - | Number of logs to return (1-100). Default: `25`. | +| `--page, -p` | - | Page number. Default: `1`. | +| `--from` | - | Start of the log window as a Unix timestamp, inclusive. | +| `--to` | - | End of the log window as a Unix timestamp, exclusive. | +| `--status, -s` | - | Filter logs by status. Supported value: `failed`. | +| `--output, -o` | - | Output format: `table`, `json`, or `md`. Default: `table`. | + +If you omit `--from` and `--to`, the command returns logs from the preceding 24 hours. An explicit time window can span at most 24 hours. + +### Logs Options + + + +Set the number of notification logs to return per page, between 1 and 100. + +**Usage:** + +```bash Terminal +npx checkly alert-channels logs 12345 --limit=50 +``` + + + + + +Select the page of notification logs to return. + +**Usage:** + +```bash Terminal +npx checkly alert-channels logs 12345 --limit=10 --page=2 +``` + + + + + +Set the inclusive start of the log window as a Unix timestamp. + +**Usage:** + +```bash Terminal +npx checkly alert-channels logs 12345 --from=1772359200 +``` + + + + + +Set the exclusive end of the log window as a Unix timestamp. The interval between `--from` and `--to` can't exceed 24 hours. + +**Usage:** + +```bash Terminal +npx checkly alert-channels logs 12345 --from=1772359200 --to=1772445600 +``` + + + + + +Filter the logs to failed notification deliveries. + +**Usage:** + +```bash Terminal +npx checkly alert-channels logs 12345 --status=failed +npx checkly alert-channels logs 12345 -s failed +``` + + + + + +Set the output format. Use `json` for programmatic access or `md` for markdown. + +**Usage:** + +```bash Terminal +npx checkly alert-channels logs 12345 --output=json +npx checkly alert-channels logs 12345 -o md +``` + + + +### Logs Examples + +```bash Terminal +# List recent notification logs for an alert channel +npx checkly alert-channels logs 12345 + +# Show only failed deliveries +npx checkly alert-channels logs 12345 --status=failed + +# Inspect a specific 24-hour window +npx checkly alert-channels logs 12345 --from=1772359200 --to=1772445600 + +# Get failed deliveries as paginated JSON +npx checkly alert-channels logs 12345 --status=failed --limit=100 --output=json +``` + +## JSON pagination + +The `list` and `logs` commands return JSON in a stable pagination envelope when you use `--output=json`: + +```json +{ + "data": [], + "pagination": { + "page": 1, + "limit": 25, + "total": 0, + "totalPages": 0 + } +} +``` + +## Related Commands + +- [`checkly checks`](/cli/checkly-checks) - List and inspect checks +- [`checkly api`](/cli/checkly-api) - Make authenticated Checkly API requests +- [`checkly whoami`](/cli/checkly-whoami) - Display current account information diff --git a/docs.json b/docs.json index f8ddbac3..a4f600f0 100644 --- a/docs.json +++ b/docs.json @@ -566,6 +566,7 @@ "group": "CLI Commands", "pages": [ "cli/checkly-account", + "cli/checkly-alert-channels", "cli/checkly-api", "cli/checkly-assets", "cli/checkly-checks", diff --git a/sitemap.xml b/sitemap.xml index 12184659..a8dc6b29 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -624,6 +624,9 @@ https://www.checklyhq.com/docs/cli/checkly-account/ + + https://www.checklyhq.com/docs/cli/checkly-alert-channels/ + https://www.checklyhq.com/docs/cli/checkly-api/ From 1ced92e882da4452ef70aa696540adb708b7f6ea Mon Sep 17 00:00:00 2001 From: Herve Labas Date: Wed, 15 Jul 2026 16:17:10 +0200 Subject: [PATCH 2/2] docs(cli): close command reference gaps --- cli/checkly-account.mdx | 422 +--------------------------------------- cli/checkly-import.mdx | 47 +++-- cli/checkly-members.mdx | 186 ++++++++++++++++++ cli/checkly-skills.mdx | 2 + docs.json | 1 + sitemap.xml | 3 + 6 files changed, 229 insertions(+), 432 deletions(-) create mode 100644 cli/checkly-members.mdx diff --git a/cli/checkly-account.mdx b/cli/checkly-account.mdx index e4679999..21f7b7cf 100644 --- a/cli/checkly-account.mdx +++ b/cli/checkly-account.mdx @@ -1,13 +1,13 @@ --- title: checkly account -description: 'View your Checkly account plan, entitlements, feature limits, and members.' +description: 'View your Checkly account plan, entitlements, feature limits, and available locations.' sidebarTitle: 'checkly account' canonical: 'https://www.checklyhq.com/docs/cli/checkly-account/' --- Available since CLI v7.7.0. -The `checkly account` command lets you view account-level information directly from the terminal. Use it to check which features are available on your plan, inspect metered limits, discover available check locations, and list account members or pending invites. +The `checkly account` command lets you view account-level information directly from the terminal. Use it to check which features are available on your plan, inspect metered limits, and discover available check locations. Before using `checkly account`, ensure you have: @@ -28,425 +28,8 @@ npx checkly account [arguments] [options] | Subcommand | Description | |------------|-------------| -| `members` | List account members and pending invites. | -| `members update` | Update an account member role. | -| `members delete` | Delete an account member. | | `plan` | Show your account plan, entitlements, and feature limits. | -## `checkly account members` - -The `checkly account members` command is only available since CLI v7.15.0. - -List account members and pending invites for the currently selected account. Use filters to find users by email or name, inspect roles, or page through large member lists. - -**Usage:** - -```bash Terminal -npx checkly account members [options] -``` - -**Options:** - -| Option | Required | Description | -|--------|----------|-------------| -| `--search, -s` | - | Search members and invites by name or email. | -| `--type` | - | Filter by item type: `member` or `invite`. | -| `--role` | - | Filter by member or invite role: `owner`, `admin`, `read_write`, `read_run`, or `read_only`. | -| `--status` | - | Filter by member or invite status: `active`, `pending`, or `expired`. | -| `--limit, -l` | - | Number of account members to return (1-100). Enables cursor pagination. | -| `--next-id` | - | Cursor for the next page. Requires `--limit`. | -| `--hide-id` | - | Hide member and invite IDs in formatted output. | -| `--output, -o` | - | Output format: `table`, `json`, or `md`. Default: `table`. | - -### Members Options - - - -Search members and invites by name or email. - -**Usage:** - -```bash Terminal -npx checkly account members --search="alex" -npx checkly account members -s "alex@example.com" -``` - - - - - -Filter the list by item type. Use `member` for active account members, or `invite` for pending and expired invites. - -**Usage:** - -```bash Terminal -npx checkly account members --type=member -npx checkly account members --type=invite -``` - - - - - -Filter members and invites by role. Available values: `owner`, `admin`, `read_write`, `read_run`, `read_only`. - -**Usage:** - -```bash Terminal -npx checkly account members --role=admin -npx checkly account members --role=read_only -``` - - - - - -Filter members and invites by status. Available values: `active`, `pending`, `expired`. - -**Usage:** - -```bash Terminal -npx checkly account members --status=active -npx checkly account members --type=invite --status=pending -``` - - - - - -Set the number of account members to return, between 1 and 100. When you set `--limit`, the command prints pagination information and a next-page command when more results are available. - -**Usage:** - -```bash Terminal -npx checkly account members --limit=50 -npx checkly account members -l 10 -``` - - - - - -Cursor for paginating through results. Use the `nextId` value from the JSON response, or the next-page command shown in table output. You must use `--limit` with `--next-id`. - -**Usage:** - -```bash Terminal -npx checkly account members --limit=10 --next-id= -``` - - - - - -Hide member and invite IDs in formatted output. JSON output always includes the response fields returned by the API. - -**Usage:** - -```bash Terminal -npx checkly account members --hide-id -``` - - - - - -Set the output format. Use `json` for programmatic access or `md` for markdown. - -**Usage:** - -```bash Terminal -npx checkly account members --output=json -npx checkly account members -o md -``` - - - -### Members Examples - -```bash Terminal -# List account members and pending invites -npx checkly account members - -# Search by name or email -npx checkly account members --search="alex" - -# Show only active members -npx checkly account members --type=member --status=active - -# Show pending invites -npx checkly account members --type=invite --status=pending - -# Find account admins -npx checkly account members --role=admin - -# Get results as JSON -npx checkly account members --output=json - -# Page through results -npx checkly account members --limit=10 --next-id= -``` - -### Members JSON Response - -The `--output=json` format returns a structured response with a `members` array and cursor pagination fields. - -```json -{ - "members": [ - { - "type": "member", - "accountId": "123", - "userId": "usr_123", - "name": "Alex Doe", - "email": "alex@example.com", - "role": "ADMIN", - "status": "ACTIVE", - "createdAt": "2026-05-01T10:00:00.000Z", - "updatedAt": "2026-05-01T10:00:00.000Z", - "isSupportMembership": false, - "ssoEnabled": true, - "mfaEnabled": true - }, - { - "type": "invite", - "id": "inv_123", - "accountId": "123", - "email": "new-user@example.com", - "role": "READ_ONLY", - "status": "PENDING", - "inviterEmail": "alex@example.com", - "createdAt": "2026-05-01T10:00:00.000Z", - "updatedAt": "2026-05-01T10:00:00.000Z", - "expiresAt": "2026-05-31T10:00:00.000Z" - } - ], - "length": 2, - "nextId": null -} -``` - -Key fields: - -- **`members[].type`** — `member` for active account members or `invite` for account invites. -- **`members[].role`** — account role, such as `OWNER`, `ADMIN`, `READ_WRITE`, `READ_RUN`, or `READ_ONLY`. -- **`members[].status`** — `ACTIVE` for members, or `PENDING` / `EXPIRED` for invites. -- **`length`** — number of items returned in the current response. -- **`nextId`** — cursor for the next page. Use it with `--limit` and `--next-id`. - -## `checkly account members update` - -The `checkly account members update` command is only available since CLI v8.7.0. - -Update an account member's role. Identify the member by email or user ID. By default, the command shows the change and prompts for confirmation before proceeding. - -**Usage:** - -```bash Terminal -npx checkly account members update --role= [options] -``` - -**Arguments:** - -| Argument | Description | -|----------|-------------| -| `member` | The account member email or user ID. | - -**Options:** - -| Option | Required | Description | -|--------|----------|-------------| -| `--role, -r` | Yes | New member role: `admin`, `read_write`, `read_run`, or `read_only`. | -| `--email` | - | Treat the member argument as an email address. | -| `--id` | - | Treat the member argument as a user ID. | -| `--force, -f` | - | Skip the confirmation prompt. | -| `--dry-run` | - | Preview what would happen without updating the member. | -| `--output, -o` | - | Output format: `table`, `json`, or `md`. Default: `table`. | - -### Members Update Options - - - -The new role to assign. Available values: `admin`, `read_write`, `read_run`, `read_only`. - -**Usage:** - -```bash Terminal -npx checkly account members update alex@example.com --role=read_write -npx checkly account members update alex@example.com -r admin -``` - - - - - -Treat the member argument as an email address. Use this to disambiguate when a value could be either an email or a user ID. Mutually exclusive with `--id`. - -**Usage:** - -```bash Terminal -npx checkly account members update alex@example.com --email --role=read_only -``` - - - - - -Treat the member argument as a user ID. Mutually exclusive with `--email`. - -**Usage:** - -```bash Terminal -npx checkly account members update usr_123 --id --role=read_only -``` - - - - - -Skip the confirmation prompt and update the member immediately. Useful in scripts and CI. - -**Usage:** - -```bash Terminal -npx checkly account members update alex@example.com --role=admin --force -``` - - - - - -Preview the role change without making any changes. - -**Usage:** - -```bash Terminal -npx checkly account members update alex@example.com --role=admin --dry-run -``` - - - - - -Set the output format. Use `json` for programmatic access or `md` for markdown. - -**Usage:** - -```bash Terminal -npx checkly account members update alex@example.com --role=admin --output=json -``` - - - -### Members Update Examples - -```bash Terminal -# Update a member's role by email (with a confirmation prompt) -npx checkly account members update alex@example.com --role=read_write - -# Update by user ID -npx checkly account members update usr_123 --id --role=admin - -# Preview the change without applying it -npx checkly account members update alex@example.com --role=admin --dry-run - -# Update without a confirmation prompt -npx checkly account members update alex@example.com --role=admin --force -``` - -## `checkly account members delete` - -The `checkly account members delete` command is only available since CLI v8.7.0. - -Delete an account member. Identify the member by email or user ID. By default, the command shows the member to be removed and prompts for confirmation before proceeding. - -**Usage:** - -```bash Terminal -npx checkly account members delete [options] -``` - -**Arguments:** - -| Argument | Description | -|----------|-------------| -| `member` | The account member email or user ID. | - -**Options:** - -| Option | Required | Description | -|--------|----------|-------------| -| `--email` | - | Treat the member argument as an email address. | -| `--id` | - | Treat the member argument as a user ID. | -| `--force, -f` | - | Skip the confirmation prompt. | -| `--dry-run` | - | Preview what would happen without deleting the member. | - -### Members Delete Options - - - -Treat the member argument as an email address. Use this to disambiguate when a value could be either an email or a user ID. Mutually exclusive with `--id`. - -**Usage:** - -```bash Terminal -npx checkly account members delete alex@example.com --email -``` - - - - - -Treat the member argument as a user ID. Mutually exclusive with `--email`. - -**Usage:** - -```bash Terminal -npx checkly account members delete usr_123 --id -``` - - - - - -Skip the confirmation prompt and delete the member immediately. Useful in scripts and CI. - -**Usage:** - -```bash Terminal -npx checkly account members delete alex@example.com --force -``` - - - - - -Preview the deletion without making any changes. - -**Usage:** - -```bash Terminal -npx checkly account members delete alex@example.com --dry-run -``` - - - -### Members Delete Examples - -```bash Terminal -# Delete a member by email (with a confirmation prompt) -npx checkly account members delete alex@example.com - -# Delete by user ID -npx checkly account members delete usr_123 --id - -# Preview the deletion without applying it -npx checkly account members delete alex@example.com --dry-run - -# Delete without a confirmation prompt -npx checkly account members delete alex@example.com --force -``` - ## `checkly account plan` Show your account plan, entitlements, and feature limits. The default view displays a summary of metered entitlements with their limits. Use `--output=json` for the full response including locations, feature flags, and upgrade URLs. @@ -607,6 +190,7 @@ Key fields: ## Related Commands +- [`checkly members`](/cli/checkly-members) - List and manage account members - [`checkly skills manage`](/cli/checkly-skills#checkly-skills-manage-resource) - Account management context for AI agents - [`checkly whoami`](/cli/checkly-whoami) - Display current account information - [`checkly switch`](/cli/checkly-switch) - Switch between Checkly accounts diff --git a/cli/checkly-import.mdx b/cli/checkly-import.mdx index 69e1ed47..f5df2c69 100644 --- a/cli/checkly-import.mdx +++ b/cli/checkly-import.mdx @@ -9,7 +9,9 @@ canonical: 'https://www.checklyhq.com/docs/cli/checkly-import/' Learn more about importing existing Checkly resources in [the "Importing Existing Resources" guide](/cli/importing). -The `checkly import` command imports existing resources from your Checkly account into your CLI-managed project. This allows you to bring existing checks, alert channels, and other resources under code management using a structured three-phase workflow. +The `checkly import plan` command imports existing resources from your Checkly account into your CLI-managed project. This allows you to bring existing checks, alert channels, and other resources under code management using a structured three-phase workflow. + +You can use `npx checkly import` as a shorthand for `npx checkly import plan`. Before using `checkly import`, ensure you have: @@ -25,14 +27,14 @@ Before using `checkly import`, ensure you have: Import all resources from your account into the current project. ```bash Terminal -npx checkly import [resources] [options] +npx checkly import plan [resources] [options] ``` **Examples:** ```bash Terminal # Import a specific resource by its ID -npx checkly import check:2ce8... +npx checkly import plan check:2ce8... ``` **Available resource types to import**: @@ -47,12 +49,13 @@ npx checkly import check:2ce8... - `status-page` - Status page configurations - `status-page-service` - Status page service definitions -`npx checkly import` starts an interactive process that generates an import plan, applies it to create Check files, and commits the changes to mark resources as managed by your CLI project. +`npx checkly import plan` starts an interactive process that generates an import plan, applies it to create Check files, and commits the changes to mark resources as managed by your CLI project. | Option | Required | Description | |--------|----------|-------------| | `--config, -c` | - | The Checkly CLI configuration file. If not passed, uses the `checkly.config.ts|js` file in the current directory. | -| `--root` | - | The root folder in which to write generated code files. | +| `--root` | - | Root folder in which to write generated code files. Default: `__checks__`. | +| `--preview` | - | Preview generated code without creating an import plan. | ## Command Options @@ -63,33 +66,44 @@ Specify a particular configuration file to use instead of the default `checkly.c **Usage:** ```bash Terminal -npx checkly import --config= -npx checkly import -c= +npx checkly import plan --config= +npx checkly import plan -c= ``` **Examples:** ```bash Terminal -$ npx checkly import --config="./checkly.staging.config.ts" +$ npx checkly import plan --config="./checkly.staging.config.ts" ``` -Preview generated code without creating an actual import plan. +Set the root folder in which to write generated code files. The default is `__checks__`. **Usage:** ```bash Terminal -npx checkly import --root= -npx checkly import -r= +npx checkly import plan --root= ``` **Examples:** ```bash Terminal -$ npx checkly import --root="./src/checks" +$ npx checkly import plan --root="./src/checks" +``` + + + + + +Generate a code preview without creating an import plan or linking resources to your project. + +**Usage:** + +```bash Terminal +npx checkly import plan --preview ``` @@ -103,7 +117,7 @@ The import process follows a three-phase workflow for safe resource migration: Analyze your account, generate an import plan and create code files for your resources. ```bash Terminal -npx checkly import +npx checkly import plan ``` ### 2. Plan Application @@ -124,6 +138,13 @@ npx checkly import commit ## Subcommands +### `checkly import plan` +Generate code and create an import plan for resources in your account. Use `--preview` to inspect generated code without creating a plan. + +```bash Terminal +npx checkly import plan [resources] [options] +``` + ### `checkly import apply` Apply a previously generated import plan to create the actual code files in your project structure. diff --git a/cli/checkly-members.mdx b/cli/checkly-members.mdx new file mode 100644 index 00000000..94852e36 --- /dev/null +++ b/cli/checkly-members.mdx @@ -0,0 +1,186 @@ +--- +title: checkly members +description: 'List, update, and delete members in your Checkly account.' +sidebarTitle: 'checkly members' +canonical: 'https://www.checklyhq.com/docs/cli/checkly-members/' +--- + +The canonical `checkly members` commands are available since CLI v8.7.0. Earlier versions use `checkly account members`, which remains available as a compatibility alias. + +The `checkly members` commands let you list account members and pending invites, update member roles, and remove members from the currently selected account. + + +Before using `checkly members`, ensure you have: + +- Checkly CLI installed +- Valid Checkly account authentication (run `npx checkly login` if needed) +- Account admin access for role updates or member deletion + +For additional setup information, see [CLI overview](/cli/overview). + + +## Usage + +```bash Terminal +npx checkly members [options] +npx checkly members [arguments] [options] +``` + +## Commands + +| Command | Description | +|---------|-------------| +| `members` | List account members and pending invites. | +| `members update` | Update an account member role. | +| `members delete` | Delete an account member. | + +## `checkly members` + +List members and pending invites for the currently selected account. You can filter the results or enable cursor pagination for larger accounts. + +**Usage:** + +```bash Terminal +npx checkly members [options] +``` + +**Options:** + +| Option | Required | Description | +|--------|----------|-------------| +| `--search, -s` | - | Search members and invites by name or email. | +| `--type` | - | Filter by item type: `member` or `invite`. | +| `--role` | - | Filter by role: `owner`, `admin`, `read_write`, `read_run`, or `read_only`. | +| `--status` | - | Filter by status: `active`, `pending`, or `expired`. | +| `--limit, -l` | - | Number of results to return (1-100). Enables cursor pagination. | +| `--next-id` | - | Cursor for the next page. Requires `--limit`. | +| `--hide-id` | - | Hide member and invite IDs in formatted output. | +| `--output, -o` | - | Output format: `table`, `json`, or `md`. Default: `table`. | + +### List Examples + +```bash Terminal +# List members and pending invites +npx checkly members + +# Search by name or email +npx checkly members --search="alex@example.com" + +# List pending invites +npx checkly members --type=invite --status=pending + +# Find account admins +npx checkly members --role=admin + +# Get the first 10 results as JSON +npx checkly members --limit=10 --output=json + +# Get the next page using the cursor from the previous response +npx checkly members --limit=10 --next-id= +``` + +### JSON pagination + +When you use `--output=json`, the command returns the members and invites together with cursor pagination fields: + +```json +{ + "members": [], + "length": 0, + "nextId": null +} +``` + +Use a non-null `nextId` value with `--limit` and `--next-id` to retrieve the next page. + +## `checkly members update` + +Update an account member's role. Identify the member by email or user ID. The command shows the proposed change and asks for confirmation by default. + +**Usage:** + +```bash Terminal +npx checkly members update --role= [options] +``` + +**Arguments:** + +| Argument | Description | +|----------|-------------| +| `member` | The account member email or user ID. | + +**Options:** + +| Option | Required | Description | +|--------|----------|-------------| +| `--role, -r` | Yes | New role: `admin`, `read_write`, `read_run`, or `read_only`. | +| `--email` | - | Treat the member argument as an email address. Mutually exclusive with `--id`. | +| `--id` | - | Treat the member argument as a user ID. Mutually exclusive with `--email`. | +| `--force, -f` | - | Skip the confirmation prompt. | +| `--dry-run` | - | Preview the change without updating the member. | +| `--output, -o` | - | Output format: `table`, `json`, or `md`. Default: `table`. | + +### Update Examples + +```bash Terminal +# Update a member by email and confirm interactively +npx checkly members update alex@example.com --role=read_write + +# Update a member by user ID +npx checkly members update usr_123 --id --role=admin + +# Preview the change without applying it +npx checkly members update alex@example.com --role=admin --dry-run + +# Update without a confirmation prompt and return JSON +npx checkly members update alex@example.com --role=admin --force --output=json +``` + +## `checkly members delete` + +Delete an account member by email or user ID. The command shows the member to remove and asks for confirmation by default. + +Deleting a member removes their access to the account. Use `--dry-run` to preview the operation before confirming it. + +**Usage:** + +```bash Terminal +npx checkly members delete [options] +``` + +**Arguments:** + +| Argument | Description | +|----------|-------------| +| `member` | The account member email or user ID. | + +**Options:** + +| Option | Required | Description | +|--------|----------|-------------| +| `--email` | - | Treat the member argument as an email address. Mutually exclusive with `--id`. | +| `--id` | - | Treat the member argument as a user ID. Mutually exclusive with `--email`. | +| `--force, -f` | - | Skip the confirmation prompt. | +| `--dry-run` | - | Preview the deletion without removing the member. | + +### Delete Examples + +```bash Terminal +# Delete a member by email and confirm interactively +npx checkly members delete alex@example.com + +# Delete a member by user ID +npx checkly members delete usr_123 --id + +# Preview the deletion +npx checkly members delete alex@example.com --dry-run + +# Delete without a confirmation prompt +npx checkly members delete alex@example.com --force +``` + +## Related Commands + +- [`checkly account`](/cli/checkly-account) - View plan entitlements and limits +- [`checkly whoami`](/cli/checkly-whoami) - Display the current account and user +- [`checkly switch`](/cli/checkly-switch) - Switch between Checkly accounts diff --git a/cli/checkly-skills.mdx b/cli/checkly-skills.mdx index 202ac8fb..6036ec58 100644 --- a/cli/checkly-skills.mdx +++ b/cli/checkly-skills.mdx @@ -11,6 +11,8 @@ The `checkly skills` command outputs Markdown-formatted context about your Check You can also install [Checkly Skills as an agent skill](/ai/skills) to let your AI agent automatically discover and use the `checkly skills` command. +`checkly rules` is deprecated and only prints a migration message. Use `checkly skills` instead. + Before using `checkly skills`, ensure you have: diff --git a/docs.json b/docs.json index a4f600f0..42d520e4 100644 --- a/docs.json +++ b/docs.json @@ -578,6 +578,7 @@ "cli/checkly-init", "cli/checkly-login", "cli/checkly-logout", + "cli/checkly-members", "cli/checkly-pw-test", "cli/checkly-rca", "cli/checkly-runtimes", diff --git a/sitemap.xml b/sitemap.xml index a8dc6b29..73b08849 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -660,6 +660,9 @@ https://www.checklyhq.com/docs/cli/checkly-logout/ + + https://www.checklyhq.com/docs/cli/checkly-members/ + https://www.checklyhq.com/docs/cli/checkly-pw-test/