Skip to content

Commit 6c219fe

Browse files
authored
Merge branch 'main' into giordanodaniel-ai-messaging-update
2 parents 7d773a8 + fd81902 commit 6c219fe

34 files changed

Lines changed: 880 additions & 143 deletions

.github/workflows/update-api-spec.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,51 +10,51 @@ jobs:
1010
update-api-spec:
1111
runs-on: ubuntu-latest
1212
timeout-minutes: 10
13-
13+
1414
permissions:
1515
contents: write
1616
pull-requests: write
17-
17+
1818
steps:
1919
- name: Checkout repository
2020
uses: actions/checkout@v4
2121
with:
2222
token: ${{ secrets.GITHUB_TOKEN }}
23-
23+
2424
- name: Set up Node.js
2525
uses: actions/setup-node@v4
2626
with:
2727
node-version: '20'
28-
28+
2929
- name: Install dependencies
3030
run: |
3131
npm install -g swagger2openapi
3232
npm install -g mintlify
33-
33+
3434
- name: Configure git
3535
run: |
3636
git config user.name "API Spec Updater"
3737
git config user.email "noreply@checkly.com"
38-
38+
3939
- name: Fetch and update API specification
4040
run: |
4141
# Store current spec hash for comparison
4242
CURRENT_HASH=$(sha256sum api-reference/openapi.json | cut -d' ' -f1)
43-
43+
4444
# Run the update script
4545
./update-api-spec.sh
46-
46+
4747
# Check if spec actually changed
4848
NEW_HASH=$(sha256sum api-reference/openapi.json | cut -d' ' -f1)
49-
49+
5050
if [ "$CURRENT_HASH" != "$NEW_HASH" ]; then
5151
echo "API specification has changed"
5252
echo "spec_changed=true" >> $GITHUB_ENV
5353
else
5454
echo "API specification is unchanged"
5555
echo "spec_changed=false" >> $GITHUB_ENV
5656
fi
57-
57+
5858
- name: Commit and Push Changes
5959
if: env.spec_changed == 'true'
6060
run: |
@@ -66,8 +66,12 @@ jobs:
6666
6767
# Push directly to main
6868
git push origin main
69-
69+
7070
- name: Report no changes
7171
if: env.spec_changed == 'false'
7272
run: |
73-
echo "✅ API specification is up to date - no changes needed"
73+
echo "✅ API specification is up to date - no changes needed"
74+
75+
- name: Ping Checkly
76+
run: curl -fsS --retry 3 https://ping.checklyhq.com/ad576f21-3f3e-4a6a-b8e4-67fd0f6ed92d
77+

api-reference/openapi.json

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

cli/checkly-init.mdx

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
title: checkly init
3+
description: 'Initialize Checkly in your project with interactive or AI-assisted onboarding.'
4+
sidebarTitle: 'checkly init'
5+
---
6+
7+
<Note>Available since CLI v7.8.0.</Note>
8+
9+
The `checkly init` command sets up Checkly in your project. It detects your project's existing configuration — package.json, Playwright, and Checkly config files — and walks you through the setup accordingly.
10+
11+
You can set up Checkly manually or let your AI coding agent handle the configuration. The command adapts its behavior based on the environment: interactive terminals get guided prompts, CI environments get non-interactive setup, and AI agents receive structured output.
12+
13+
<Accordion title="Prerequisites">
14+
Before using `checkly init`, ensure you have:
15+
16+
- Node.js installed
17+
- A project directory (an existing `package.json` is optional — the command can create one)
18+
19+
No existing Checkly account or configuration is required.
20+
</Accordion>
21+
22+
## Usage
23+
24+
```bash Terminal
25+
npx checkly init [options]
26+
```
27+
28+
| Option | Required | Description |
29+
|--------|----------|-------------|
30+
| `--target, -t` | - | Install the Checkly skill for a specific AI agent platform. |
31+
32+
## Command Options
33+
34+
<ResponseField name="--target, -t" type="string">
35+
36+
Install the [Checkly agent skill](/ai/skills) for a specific AI agent platform. Available platforms: `claude`, `cursor`, `windsurf`, `github-copilot`, `gemini-cli`, `codex`, `amp`.
37+
38+
**Usage:**
39+
40+
```bash Terminal
41+
npx checkly init --target=claude
42+
npx checkly init -t cursor
43+
```
44+
45+
</ResponseField>
46+
47+
## What to Expect
48+
49+
The `init` command detects your project context and adjusts its flow:
50+
51+
- **No `package.json`** — prompts you to create one before continuing.
52+
- **No Checkly config** — creates a `checkly.config.ts` and installs `checkly` and `jiti` as dev dependencies.
53+
- **Playwright detected** — provides context-aware setup that accounts for your existing test infrastructure.
54+
- **Existing Checkly project** — refreshes your agent skill to the latest version.
55+
56+
### AI-Assisted Setup
57+
58+
When you choose the AI-assisted path (or pass `--target`), the command:
59+
60+
1. Installs the [Checkly agent skill](/ai/skills) for your platform
61+
2. Creates a `checkly.config.ts` if one doesn't exist
62+
3. Installs dependencies
63+
4. Generates a starter prompt you can paste into your AI agent to begin configuring checks
64+
65+
<Tip>The starter prompt gives your AI agent all the context it needs about your project and Checkly's capabilities. Copy it into your agent's chat to start creating checks.</Tip>
66+
67+
### Manual Setup
68+
69+
When you choose the manual path, the command:
70+
71+
1. Creates a `checkly.config.ts` if one doesn't exist
72+
2. Installs dependencies
73+
3. Optionally copies example checks (API, browser, heartbeat, URL monitor) into a `__checks__` directory
74+
75+
### CI Mode
76+
77+
In CI environments (when `CI=true`), the command runs non-interactively and outputs setup instructions.
78+
79+
```bash Terminal
80+
CI=true npx checkly init
81+
```
82+
83+
## Examples
84+
85+
```bash Terminal
86+
# Interactive setup
87+
npx checkly init
88+
89+
# Set up with Claude Code agent skill
90+
npx checkly init --target=claude
91+
92+
# Non-interactive CI setup
93+
CI=true npx checkly init
94+
```
95+
96+
## Next Steps
97+
98+
After initialization, the typical workflow is:
99+
100+
1. **Log in**`npx checkly login` to authenticate with your Checkly account
101+
2. **Test**`npx checkly test --record` to dry-run your checks
102+
3. **Deploy**`npx checkly deploy` to deploy checks to Checkly
103+
104+
## Related Commands
105+
106+
- [`checkly skills`](/cli/checkly-skills) - Print project context and install agent skills
107+
- [`checkly login`](/cli/checkly-login) - Log in to your Checkly account
108+
- [`checkly deploy`](/cli/checkly-deploy) - Deploy checks to Checkly

cli/checkly-pw-test.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Define `checkly pw-test` specific options before the `--` separator:
4242
| `--location, -l` | - | The location to run the checks at. |
4343
| `--private-location` | - | The private location to run checks at. |
4444
| `--[no-]record` | - | Record test results in Checkly as a test session with full logs, traces and videos. |
45+
| `--refresh-cache` | - | Force a fresh install of dependencies and update the cached version. |
4546
| `--reporter` | - | One or more custom reporters for the test output. Supports comma-separated values and repeated flags. |
4647
| `--stream-logs` | - | Stream logs from the test run to the console. |
4748
| `--test-session-name` | - | A name to use when storing results in Checkly |
@@ -187,6 +188,18 @@ npx checkly pw-test --private-location="staging-vpc"
187188

188189
</ResponseField>
189190

191+
<ResponseField name="--refresh-cache" type="boolean" default="false">
192+
193+
Force a fresh install of dependencies and update the cached version. Use this when you've changed your project's dependencies and need Checkly to pick up the latest versions instead of using the cache from a previous run.
194+
195+
**Usage:**
196+
197+
```bash Terminal
198+
npx checkly pw-test --refresh-cache
199+
```
200+
201+
</ResponseField>
202+
190203
<ResponseField name="--[no-]record" type="boolean">
191204

192205
The `pw-test` automatically records your test results as a [test session](/detect/testing/overview) with full logs, traces, and videos. Use `--no-record` to disable recording.

0 commit comments

Comments
 (0)