@observeone/cli 1.27.0 → 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +146 -250
- package/dist/README.md +146 -250
- package/dist/commands/alert-channel.js +2 -2
- package/dist/commands/alert-channel.js.map +1 -1
- package/dist/commands/apply.js +4 -4
- package/dist/commands/apply.js.map +1 -1
- package/dist/commands/check.js +4 -4
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/heartbeat.js +4 -4
- package/dist/commands/heartbeat.js.map +1 -1
- package/dist/commands/incident.js +8 -8
- package/dist/commands/incident.js.map +1 -1
- package/dist/commands/monitor.js +4 -4
- package/dist/commands/monitor.js.map +1 -1
- package/dist/commands/resource-command.factory.d.ts +6 -6
- package/dist/commands/resource-command.factory.d.ts.map +1 -1
- package/dist/commands/resource-command.factory.js +9 -9
- package/dist/commands/resource-command.factory.js.map +1 -1
- package/dist/commands/runs-command.d.ts +1 -1
- package/dist/commands/runs-command.d.ts.map +1 -1
- package/dist/commands/runs-command.js +4 -8
- package/dist/commands/runs-command.js.map +1 -1
- package/dist/commands/status-page.js +12 -12
- package/dist/commands/status-page.js.map +1 -1
- package/dist/commands/suite/run.d.ts.map +1 -1
- package/dist/commands/suite/run.js +3 -1
- package/dist/commands/suite/run.js.map +1 -1
- package/dist/commands/suite/wait.d.ts.map +1 -1
- package/dist/commands/suite/wait.js +6 -4
- package/dist/commands/suite/wait.js.map +1 -1
- package/dist/interfaces/api-client.interface.d.ts +36 -36
- package/dist/package.json +1 -1
- package/dist/services/api-client.service.d.ts +45 -43
- package/dist/services/api-client.service.d.ts.map +1 -1
- package/dist/services/api-client.service.js +26 -2
- package/dist/services/api-client.service.js.map +1 -1
- package/dist/services/sse-client.service.d.ts.map +1 -1
- package/dist/services/sse-client.service.js +17 -4
- package/dist/services/sse-client.service.js.map +1 -1
- package/dist/types/index.d.ts +13 -13
- package/dist/utils/cli-input.d.ts +1 -1
- package/dist/utils/cli-input.d.ts.map +1 -1
- package/dist/utils/cli-input.js +5 -5
- package/dist/utils/cli-input.js.map +1 -1
- package/dist/utils/host-allowlist.d.ts +19 -0
- package/dist/utils/host-allowlist.d.ts.map +1 -0
- package/dist/utils/host-allowlist.js +35 -0
- package/dist/utils/host-allowlist.js.map +1 -0
- package/dist/utils/schema-prompts.d.ts +1 -1
- package/dist/utils/schemas.d.ts.map +1 -1
- package/dist/utils/schemas.js +5 -4
- package/dist/utils/schemas.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
[](package.json)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Website monitoring, synthetic testing, and infrastructure-as-code from your terminal.
|
|
9
9
|
|
|
10
|
-
The `obs` CLI lets developers and AI coding agents manage URL monitors, API checks, heartbeats, and
|
|
10
|
+
The `obs` CLI lets developers and AI coding agents manage URL monitors, API checks, heartbeats, status pages, incidents, and Playwright Autopilot suites, either through individual commands or a single declarative JSON config.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -17,78 +17,56 @@ npm install -g @observeone/cli
|
|
|
17
17
|
|
|
18
18
|
## Quick Start
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
2. **Initialize Workspace**
|
|
28
|
-
```bash
|
|
29
|
-
# Creates local .obs.config.json
|
|
30
|
-
obs init
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
3. **Logout**
|
|
34
|
-
```bash
|
|
35
|
-
# Clear local credentials
|
|
36
|
-
obs logout
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
4. **Pull your existing configuration**
|
|
40
|
-
```bash
|
|
41
|
-
obs export
|
|
42
|
-
```
|
|
20
|
+
```bash
|
|
21
|
+
obs login # Authenticate (use --force to switch accounts)
|
|
22
|
+
obs init # Create a local .obs.config.json
|
|
23
|
+
obs export # Pull your existing resources into obs.json
|
|
24
|
+
obs logout # Clear local credentials
|
|
25
|
+
```
|
|
43
26
|
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
obs url-monitor create --name "My Website" --url "https://example.com" --interval "*/5 * * * *"
|
|
47
|
-
obs url-monitor list
|
|
48
|
-
```
|
|
27
|
+
Create your first monitor:
|
|
49
28
|
|
|
50
|
-
|
|
29
|
+
```bash
|
|
30
|
+
obs url-monitor create --name "My Website" --url "https://example.com" --interval "*/5 * * * *"
|
|
31
|
+
obs url-monitor list
|
|
32
|
+
```
|
|
51
33
|
|
|
52
34
|
## Configuration Priority
|
|
53
35
|
|
|
54
|
-
The CLI resolves
|
|
55
|
-
|
|
56
|
-
1. **CLI Flags**: `--api-key`, `--api-url` passed directly to a command.
|
|
57
|
-
2. **Environment Variables**: `OBS_API_KEY`, `OBS_API_URL`.
|
|
58
|
-
3. **Local Config File**: `.obs.config.json` in the current working directory (created via `obs init`).
|
|
59
|
-
4. **Global Store**: Global OS configuration (saved after `obs login`).
|
|
60
|
-
5. **Defaults**: Internal default values.
|
|
36
|
+
The CLI resolves settings highest-to-lowest:
|
|
61
37
|
|
|
62
|
-
|
|
38
|
+
1. **CLI flags**: `--api-key`, `--api-url` passed to a command.
|
|
39
|
+
2. **Environment variables**: `OBS_API_KEY`, `OBS_API_URL`.
|
|
40
|
+
3. **Local config file**: `.obs.config.json` in the working directory (created by `obs init`).
|
|
41
|
+
4. **Global store**: OS-level config saved after `obs login`.
|
|
42
|
+
5. **Defaults**: built-in values.
|
|
63
43
|
|
|
64
44
|
## Config-as-Code (Declarative Workflow)
|
|
65
45
|
|
|
66
|
-
|
|
46
|
+
Define all your resources in one `obs.json` file and sync them to your account.
|
|
67
47
|
|
|
68
48
|
### `obs export`
|
|
69
|
-
Fetch all your existing remote resources from the ObserveOne backend and save them locally.
|
|
70
|
-
```bash
|
|
71
|
-
# Generates obs.json in the current directory
|
|
72
|
-
obs export
|
|
73
49
|
|
|
74
|
-
|
|
75
|
-
|
|
50
|
+
Fetch your remote resources and save them locally.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
obs export # Writes obs.json (suite scripts included)
|
|
54
|
+
obs export -f my-stack.json # Custom file
|
|
55
|
+
obs export --no-scripts # Omit suite Playwright scripts (lighter, config-only)
|
|
76
56
|
```
|
|
77
57
|
|
|
78
58
|
### `obs apply`
|
|
79
|
-
Sync your local JSON configuration to the ObserveOne backend. Only changed resources are updated — unchanged ones are skipped.
|
|
80
|
-
```bash
|
|
81
|
-
# Preview what would change (no writes)
|
|
82
|
-
obs apply --dry-run
|
|
83
59
|
|
|
84
|
-
|
|
85
|
-
obs apply
|
|
60
|
+
Sync local JSON to the backend. Only changed resources are updated; unchanged ones are skipped.
|
|
86
61
|
|
|
87
|
-
|
|
88
|
-
obs apply -
|
|
62
|
+
```bash
|
|
63
|
+
obs apply --dry-run # Preview the diff, no writes
|
|
64
|
+
obs apply # Apply obs.json
|
|
65
|
+
obs apply -f my-stack.json # Apply a custom file
|
|
89
66
|
```
|
|
90
67
|
|
|
91
68
|
`--dry-run` fetches remote state, runs the full diff, and prints a git-style preview:
|
|
69
|
+
|
|
92
70
|
```
|
|
93
71
|
~ monitor "Production API"
|
|
94
72
|
- cron_expression: "*/5 * * * *"
|
|
@@ -101,7 +79,8 @@ obs apply -f my-stack.json
|
|
|
101
79
|
Run without --dry-run to apply.
|
|
102
80
|
```
|
|
103
81
|
|
|
104
|
-
**Example `obs.json
|
|
82
|
+
**Example `obs.json`:**
|
|
83
|
+
|
|
105
84
|
```json
|
|
106
85
|
{
|
|
107
86
|
"monitors": [
|
|
@@ -162,353 +141,270 @@ obs apply -f my-stack.json
|
|
|
162
141
|
```
|
|
163
142
|
|
|
164
143
|
> **Notes:**
|
|
165
|
-
> - `incidents`
|
|
166
|
-
> - `suites
|
|
167
|
-
> - Status-page attached monitors are exported but not applied. Manage them
|
|
144
|
+
> - `incidents` are included in export as a backup artifact. `obs apply` warns and skips this block; incidents cannot be re-created from config.
|
|
145
|
+
> - `suites`: `obs apply` updates metadata for existing suites only. New suites require AI generation via `obs suite generate`.
|
|
146
|
+
> - Status-page attached monitors are exported but not applied. Manage them with `obs status-page add-monitor` / `remove-monitor`.
|
|
168
147
|
|
|
169
|
-
**Single-resource files
|
|
148
|
+
**Single-resource files:** `obs apply` also accepts a file holding one resource, in three shapes:
|
|
170
149
|
|
|
171
|
-
```
|
|
172
|
-
// Bare
|
|
150
|
+
```jsonc
|
|
151
|
+
// Bare: type inferred from fields (url is monitor, url+method is check, period is heartbeat)
|
|
173
152
|
{ "name": "Landing", "url": "https://example.com", "interval": "*/5 * * * *" }
|
|
174
|
-
|
|
175
|
-
```json
|
|
176
|
-
// Wrapped — explicit resource key
|
|
153
|
+
// Wrapped: explicit resource key
|
|
177
154
|
{ "monitor": { "name": "Landing", "url": "https://example.com" } }
|
|
178
|
-
|
|
179
|
-
```json
|
|
180
|
-
// Explicit type — disambiguates the bare form
|
|
155
|
+
// Explicit type: disambiguates the bare form
|
|
181
156
|
{ "type": "heartbeat", "name": "Daily Backup", "period": 86400 }
|
|
182
157
|
```
|
|
183
158
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
---
|
|
159
|
+
The bare form supports `monitor`, `check`, and `heartbeat`.
|
|
187
160
|
|
|
188
161
|
## Resource Management (CRUD)
|
|
189
162
|
|
|
190
|
-
|
|
163
|
+
Create, read, update, delete, and toggle individual resources from the terminal. Monitor, check, and heartbeat lists support server-side filtering with `--search`, `--status`, `--is-active true|false`, `--limit`, and `--page`. Pass `--file <path>` to `create` to supply a JSON payload instead of flags.
|
|
191
164
|
|
|
192
165
|
### URL Monitors
|
|
166
|
+
|
|
193
167
|
```bash
|
|
194
168
|
obs url-monitor create --name "Frontend" --url "https://example.com" --interval "*/5 * * * *" \
|
|
195
169
|
--description "Production landing page" \
|
|
196
170
|
--alert-channel-id 12 --alert-channel-id 47
|
|
197
|
-
obs url-monitor list
|
|
198
|
-
obs url-monitor list --search "Front" --status up --is-active true --limit 10 --page 1 --json
|
|
171
|
+
obs url-monitor list --search "Front" --status up --is-active true --limit 10 --page 1
|
|
199
172
|
obs url-monitor get <id>
|
|
200
|
-
obs url-monitor update <id> --
|
|
201
|
-
obs url-monitor
|
|
202
|
-
obs url-monitor
|
|
203
|
-
obs url-monitor toggle <id>
|
|
204
|
-
obs url-monitor toggle-muted <id>
|
|
173
|
+
obs url-monitor update <id> --interval "*/10 * * * *"
|
|
174
|
+
obs url-monitor run <id> # Trigger a manual check
|
|
175
|
+
obs url-monitor runs <id> --limit 10
|
|
176
|
+
obs url-monitor toggle <id> # Pause or resume
|
|
177
|
+
obs url-monitor toggle-muted <id> # Mute or unmute failure alerts
|
|
205
178
|
obs url-monitor delete <id> -y
|
|
206
179
|
```
|
|
207
180
|
|
|
208
|
-
|
|
209
|
-
- `-d, --description <text>` — optional description.
|
|
210
|
-
- `--alert-channel-id <id>` — attach an alert channel (repeat for multiple).
|
|
211
|
-
- `--no-alerts` — disable alerting on failure.
|
|
181
|
+
Flags: `-d, --description`, `--alert-channel-id <id>` (repeatable), `--no-alerts` (disable failure alerting on create).
|
|
212
182
|
|
|
213
183
|
### API Checks
|
|
184
|
+
|
|
214
185
|
```bash
|
|
215
186
|
obs check create --name "Auth API" --url "https://api.example.com/auth" --method POST \
|
|
216
|
-
--description "Signup endpoint" \
|
|
217
187
|
--interval "*/5 * * * *" \
|
|
218
|
-
--alert-channel-id 12 \
|
|
219
188
|
--header "Authorization=Bearer test" --header "X-Trace=ci" \
|
|
220
|
-
--
|
|
221
|
-
|
|
222
|
-
obs check
|
|
223
|
-
obs check
|
|
224
|
-
obs check update <id> --description "Signup v2" --header "X-Trace=ci-v2"
|
|
225
|
-
obs check runs <id> --limit 10 # recent executions
|
|
226
|
-
obs check run <id> # trigger a manual run
|
|
189
|
+
--status-code 200 --response-time-under 800
|
|
190
|
+
obs check list --search "Auth" --status paused --is-active false
|
|
191
|
+
obs check run <id>
|
|
192
|
+
obs check runs <id> --limit 10
|
|
227
193
|
obs check toggle <id>
|
|
228
194
|
obs check toggle-muted <id>
|
|
229
195
|
obs check delete <id> -y
|
|
230
196
|
```
|
|
231
197
|
|
|
232
|
-
|
|
233
|
-
- `-d, --description <text>` — optional description.
|
|
234
|
-
- `-i, --interval <cron>` — schedule expression (e.g. `*/5 * * * *`).
|
|
235
|
-
- `--alert-channel-id <id>` — attach an alert channel (repeat for multiple).
|
|
236
|
-
- `--no-alerts` — disable alerting on failure.
|
|
237
|
-
- `--header KEY=VALUE` — HTTP header to send (repeatable).
|
|
238
|
-
- `--assertion <json>` — response assertion as a JSON object (repeatable). Supported types: `status_code`, `response_time`, `json_path` (uses `path`), `text_contains`, `header` (uses `path`). Operators: `equals`, `not_equals`, `greater_than`, `less_than`, `contains`, `not_contains`, `exists`, `regex_match`.
|
|
198
|
+
Assertions can be raw JSON (`--assertion '{...}'`, repeatable) or shorthand flags (`--status-code`, `--status-code-not`, `--response-time-under/over`, `--json-path` / `--json-path-value`, `--text-contains`, `--header-exists`, `--regex-match`). See the [command reference](docs/reference/cli-commands.md#api-checks) for the full list.
|
|
239
199
|
|
|
240
200
|
### Heartbeats (Cron Monitoring)
|
|
201
|
+
|
|
241
202
|
```bash
|
|
242
203
|
obs heartbeat create --name "Daily Backup" --period 86400 --grace 3600
|
|
243
|
-
obs heartbeat list
|
|
244
|
-
obs heartbeat list --search "Backup" --status late --limit 5 --json
|
|
204
|
+
obs heartbeat list --search "Backup" --status late
|
|
245
205
|
obs heartbeat update <id> --period 43200
|
|
246
|
-
obs heartbeat runs <id> --limit 10
|
|
206
|
+
obs heartbeat runs <id> --limit 10
|
|
207
|
+
obs heartbeat reset <id> # Acknowledge missed pings and restart the grace window
|
|
247
208
|
obs heartbeat toggle <id>
|
|
248
209
|
obs heartbeat toggle-muted <id>
|
|
249
|
-
obs heartbeat reset <id> # acknowledge missed pings and restart grace window
|
|
250
210
|
obs heartbeat delete <id> -y
|
|
251
211
|
```
|
|
252
212
|
|
|
253
|
-
List filtering notes:
|
|
254
|
-
- `--search` matches visible fields server-side.
|
|
255
|
-
- `--status` uses each resource's real status values.
|
|
256
|
-
- `--is-active true|false` filters by activation state separately from status.
|
|
257
|
-
- `--page` and `--limit` enable server-side pagination.
|
|
258
|
-
|
|
259
|
-
Run history (new in v1.13.0):
|
|
260
|
-
- `obs <resource> runs <id>` fetches recent executions/pings. Default limit 20, override with `-l, --limit`.
|
|
261
|
-
|
|
262
213
|
### Alert Channels
|
|
214
|
+
|
|
263
215
|
```bash
|
|
264
216
|
obs alert-channel create --name "Ops Email" --type email --email "ops@example.com"
|
|
265
217
|
obs alert-channel list
|
|
266
|
-
obs alert-channel
|
|
267
|
-
obs alert-channel update <id> --name "Ops Email Primary"
|
|
218
|
+
obs alert-channel test <id> # Send a test notification through the channel
|
|
219
|
+
obs alert-channel update <id> --name "Ops Email Primary"
|
|
268
220
|
obs alert-channel delete <id> -y
|
|
269
221
|
```
|
|
270
222
|
|
|
223
|
+
Types: `email`, `slack`, `discord`, `teams`, `telegram`, `sms`, `webhook`.
|
|
224
|
+
|
|
271
225
|
### Status Pages
|
|
226
|
+
|
|
272
227
|
```bash
|
|
273
228
|
obs status-page create --name "Public Status" --slug "public-status"
|
|
274
229
|
obs status-page list
|
|
275
|
-
obs status-page
|
|
276
|
-
obs status-page update <id> --description "Updated"
|
|
230
|
+
obs status-page update <id> --hide-uptime
|
|
277
231
|
obs status-page delete <id> -y
|
|
278
232
|
|
|
279
|
-
# Attach
|
|
233
|
+
# Attach a monitor (returns an entry ID), reorder it, then detach it
|
|
280
234
|
obs status-page add-monitor <sp-id> <resource-id> --type url-monitor --name "API" --order 1
|
|
281
|
-
obs status-page
|
|
235
|
+
obs status-page reorder <sp-id> <entry-id> --order 2
|
|
236
|
+
obs status-page remove-monitor <sp-id> <entry-id>
|
|
282
237
|
```
|
|
283
238
|
|
|
239
|
+
`remove-monitor` and `reorder` take the entry ID returned by `add-monitor`, not the monitor's own ID.
|
|
240
|
+
|
|
284
241
|
### Incidents
|
|
242
|
+
|
|
285
243
|
```bash
|
|
286
244
|
obs incident create --title "API Outage" --priority HIGH --description "Initial investigation"
|
|
287
245
|
obs incident list
|
|
288
|
-
obs incident
|
|
289
|
-
obs incident update <id> --description "Resolved"
|
|
290
|
-
obs incident delete <id> -y
|
|
291
|
-
|
|
292
|
-
# Comment on an incident
|
|
293
|
-
obs incident comment <id> --message "Investigating upstream provider issue"
|
|
294
|
-
|
|
295
|
-
# Assign / unassign
|
|
246
|
+
obs incident comment <id> --message "Investigating the upstream provider"
|
|
296
247
|
obs incident assign <id> --user <user-id>
|
|
297
248
|
obs incident unassign <id>
|
|
249
|
+
|
|
250
|
+
# Status verbs (status is OPEN, RESOLVED, or CLOSED)
|
|
251
|
+
obs incident resolve <id>
|
|
252
|
+
obs incident close <id>
|
|
253
|
+
obs incident reopen <id>
|
|
254
|
+
obs incident delete <id> -y
|
|
298
255
|
```
|
|
299
256
|
|
|
257
|
+
`create` and `update` also accept `--assigned-to <userId>` and `--team-id <teamId>`.
|
|
258
|
+
|
|
300
259
|
### API Keys
|
|
260
|
+
|
|
301
261
|
```bash
|
|
302
262
|
obs api-key list
|
|
303
263
|
obs api-key create --name "CI Bot"
|
|
304
|
-
obs api-key revoke <id>
|
|
264
|
+
obs api-key revoke <id> -y # Also: obs api-key delete <id>
|
|
305
265
|
obs api-key toggle <id>
|
|
266
|
+
obs api-key rotate <id> -y # New key with the same name, then revoke the old one
|
|
306
267
|
```
|
|
307
268
|
|
|
308
269
|
### Teams
|
|
270
|
+
|
|
309
271
|
```bash
|
|
310
272
|
obs team list
|
|
311
273
|
obs team members <team-id>
|
|
312
|
-
obs team invite <team-id>
|
|
313
|
-
obs team remove-member <team-id> <user-id>
|
|
274
|
+
obs team invite <team-id> # Regenerate the invite code
|
|
275
|
+
obs team remove-member <team-id> <user-id> -y
|
|
314
276
|
obs team update-role <team-id> <user-id> --role member
|
|
315
277
|
```
|
|
316
278
|
|
|
317
|
-
---
|
|
318
|
-
|
|
319
|
-
## AI Browser Checks
|
|
320
|
-
|
|
321
|
-
Manage and execute intelligent Playwright-driven browser tests using natural language prompts.
|
|
322
|
-
|
|
323
|
-
```bash
|
|
324
|
-
# Run an existing test and output JUnit report for CI
|
|
325
|
-
obs ai-check run "Login Flow" --reporter junit
|
|
326
|
-
|
|
327
|
-
# Run multiple tests and output strict JSON for AI Agents
|
|
328
|
-
obs ai-check run test1 test2 --reporter json
|
|
329
|
-
|
|
330
|
-
# Run an ad-hoc test without saving it
|
|
331
|
-
obs ai-check run --adhoc --url https://example.com --prompt "Verify login section exists"
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
---
|
|
335
|
-
|
|
336
279
|
## Playwright Autopilot Suites
|
|
337
280
|
|
|
338
281
|
Generate and manage AI-driven Playwright test suites from your terminal.
|
|
339
282
|
|
|
340
283
|
```bash
|
|
341
|
-
# Generate a suite
|
|
284
|
+
# Generate a suite (plans, then generates all test scripts by default)
|
|
342
285
|
obs suite generate https://example.com --name "Smoke Tests" --max-tests 5
|
|
343
|
-
|
|
344
|
-
# Generate with a cron schedule
|
|
345
286
|
obs suite generate https://example.com --cron "0 */6 * * *"
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
obs suite generate https://example.com --plan-only
|
|
349
|
-
|
|
350
|
-
# Pass credentials/variables to the test runner
|
|
351
|
-
obs suite generate https://example.com --var USERNAME=admin --var PASSWORD=secret
|
|
287
|
+
obs suite generate https://example.com --plan-only # Review the plan before generating
|
|
288
|
+
obs suite generate https://example.com --var USER=admin --var PASS=secret
|
|
352
289
|
obs suite generate https://example.com --var-file .env.test
|
|
353
290
|
|
|
354
|
-
# List all suites
|
|
355
291
|
obs suite list
|
|
356
|
-
|
|
357
|
-
# Get full suite details
|
|
358
292
|
obs suite get <id>
|
|
293
|
+
obs suite run <id> --wait # Trigger a run; --wait streams the result
|
|
294
|
+
obs suite status <id> # Latest execution status
|
|
295
|
+
obs suite wait <id> <executionId> # Block on a specific execution
|
|
296
|
+
obs suite delete <id> -y
|
|
359
297
|
|
|
360
|
-
#
|
|
361
|
-
obs suite run <id> --wait
|
|
362
|
-
|
|
363
|
-
# Check the latest execution status
|
|
364
|
-
obs suite status <id>
|
|
365
|
-
|
|
366
|
-
# Wait on a specific execution
|
|
367
|
-
obs suite wait <id> <executionId>
|
|
368
|
-
|
|
369
|
-
# Update schedule without regenerating (v1.8.0)
|
|
298
|
+
# Schedule and credentials without regenerating
|
|
370
299
|
obs suite schedule <id> --enable
|
|
371
|
-
obs suite schedule <id> --disable
|
|
372
300
|
obs suite schedule <id> --cron "*/30 * * * *"
|
|
373
|
-
|
|
374
|
-
# Update credentials/variables without regenerating (v1.8.0)
|
|
375
|
-
obs suite secrets <id> --var USERNAME=admin --var PASSWORD=secret
|
|
376
301
|
obs suite secrets <id> --var-file .env.test
|
|
377
302
|
|
|
378
|
-
# Toggle public visibility of a suite
|
|
379
303
|
obs suite toggle-public <id>
|
|
304
|
+
obs suite heal <id> # Trigger self-heal on failing tests
|
|
305
|
+
```
|
|
380
306
|
|
|
381
|
-
|
|
382
|
-
obs suite heal <id>
|
|
307
|
+
### Edit Scripts Locally (pull / push)
|
|
383
308
|
|
|
384
|
-
|
|
385
|
-
|
|
309
|
+
Download a suite, edit its generated Playwright scripts, and push them back.
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
obs suite pull <id> # Writes ./suites/<slug>-<id>/
|
|
313
|
+
# ...edit the .spec.ts files...
|
|
314
|
+
obs suite push <id> # Sends your edits back
|
|
386
315
|
```
|
|
387
316
|
|
|
388
|
-
|
|
317
|
+
`pull` writes a folder per suite containing `PLAN.md` (when present), one `<test-name>.spec.ts` per test, and a `suite.json` manifest. `push` updates the test scripts only; plan edits are not sent back.
|
|
389
318
|
|
|
390
|
-
|
|
319
|
+
### CI Integration
|
|
391
320
|
|
|
392
|
-
|
|
393
|
-
# Show current binding (provider, repo, branch, hooks, masked token)
|
|
394
|
-
obs suite ci status <id>
|
|
321
|
+
Manage a suite's GitHub App / CI binding headlessly. Install and repo selection still happen in the web UI; these cover the post-install operations scripts need.
|
|
395
322
|
|
|
396
|
-
|
|
397
|
-
obs suite ci
|
|
323
|
+
```bash
|
|
324
|
+
obs suite ci status <id> # Show binding: repo, branch, hooks, masked token
|
|
325
|
+
obs suite ci webhook-token <id> -y # Generate or rotate the inbound webhook token
|
|
326
|
+
obs suite ci disconnect <id> -y # Remove the integration and invalidate the token
|
|
398
327
|
|
|
399
|
-
# Pipe
|
|
328
|
+
# Pipe a fresh token into a secret store
|
|
400
329
|
TOKEN=$(obs suite ci webhook-token <id> -y --json | jq -r '.data.token')
|
|
401
|
-
|
|
402
|
-
# Tear down the integration (invalidates the token, unbinds the repo)
|
|
403
|
-
obs suite ci disconnect <id> -y
|
|
404
330
|
```
|
|
405
331
|
|
|
406
|
-
|
|
332
|
+
Each `webhook-token` call invalidates the previous one. Your CI pipeline POSTs the token to `/webhook/playwright?token=<token>` to trigger a run.
|
|
407
333
|
|
|
408
|
-
|
|
334
|
+
## Resource Discovery
|
|
409
335
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
Enumerate resource templates and fetch their JSON schemas. All commands work offline against bundled schemas, no login required.
|
|
336
|
+
Enumerate resource templates and fetch their JSON schemas. These work offline against bundled schemas, no login required.
|
|
413
337
|
|
|
414
338
|
```bash
|
|
415
|
-
#
|
|
416
|
-
obs
|
|
417
|
-
obs templates list --json
|
|
418
|
-
|
|
419
|
-
# Print the JSON Schema (Draft-07) for any resource
|
|
420
|
-
obs schema monitor
|
|
421
|
-
obs schema ai-check
|
|
339
|
+
obs templates list # Every resource type with required fields
|
|
340
|
+
obs schema monitor # Print the JSON Schema (Draft-07) for a type
|
|
422
341
|
obs schema alert-channel --out ./schemas/alert-channel.schema.json
|
|
423
|
-
|
|
424
|
-
# Validate a JSON file against the bundled schema (offline)
|
|
425
342
|
obs validate --resource monitor --file ./my-monitor.json
|
|
426
|
-
|
|
427
|
-
# Scaffold a ready-to-edit template
|
|
428
|
-
obs init monitor
|
|
429
|
-
obs init ai-check --out ./tests/ai-check.json
|
|
343
|
+
obs init check --out ./tests/check.json # Scaffold a ready-to-edit template
|
|
430
344
|
```
|
|
431
345
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
The full chain for agents: `obs templates list` → `obs schema <name>` → generate payload → `obs validate` → `obs <resource> create --file <path>`. All steps except the final create are fully offline.
|
|
435
|
-
|
|
436
|
-
---
|
|
346
|
+
Resource-type aliases: `api-check` resolves to `check`, `url-monitor` to `monitor`. The full agent chain is `obs templates list` to `obs schema <name>` to a generated payload to `obs validate` to `obs <resource> create --file <path>`. Every step except the final create is offline.
|
|
437
347
|
|
|
438
348
|
## AI Agent Integration (Headless Mode)
|
|
439
349
|
|
|
440
|
-
The `obs` CLI is
|
|
350
|
+
The `obs` CLI is designed to be driven by AI coding agents.
|
|
441
351
|
|
|
442
352
|
### The `--json` Flag
|
|
443
|
-
Append `--json` to **any** command. The CLI will automatically suppress all human-readable output and return a strict, machine-readable `JsonEnvelope`.
|
|
444
353
|
|
|
445
|
-
|
|
354
|
+
Append `--json` to any command for a strict, machine-readable `JsonEnvelope`:
|
|
355
|
+
|
|
446
356
|
```json
|
|
447
357
|
{
|
|
448
358
|
"status": "SUCCESS",
|
|
449
|
-
"data": {
|
|
450
|
-
"metadata": {
|
|
451
|
-
"timestamp": "2026-03-11T12:00:00.000Z"
|
|
452
|
-
}
|
|
359
|
+
"data": { },
|
|
360
|
+
"metadata": { "timestamp": "2026-03-11T12:00:00.000Z" }
|
|
453
361
|
}
|
|
454
362
|
```
|
|
455
363
|
|
|
456
|
-
|
|
364
|
+
Filtered list commands return paginated data:
|
|
365
|
+
|
|
457
366
|
```json
|
|
458
367
|
{
|
|
459
368
|
"status": "SUCCESS",
|
|
460
369
|
"data": {
|
|
461
370
|
"items": [],
|
|
462
|
-
"pagination": {
|
|
463
|
-
"page": 1,
|
|
464
|
-
"limit": 10,
|
|
465
|
-
"total": 0,
|
|
466
|
-
"totalPages": 0
|
|
467
|
-
}
|
|
371
|
+
"pagination": { "page": 1, "limit": 10, "total": 0, "totalPages": 0 }
|
|
468
372
|
},
|
|
469
|
-
"metadata": {
|
|
470
|
-
"timestamp": "2026-04-22T12:00:00.000Z"
|
|
471
|
-
}
|
|
373
|
+
"metadata": { "timestamp": "2026-04-22T12:00:00.000Z" }
|
|
472
374
|
}
|
|
473
375
|
```
|
|
474
376
|
|
|
475
377
|
### Headless Login
|
|
476
|
-
|
|
378
|
+
|
|
379
|
+
Agents authenticate from environment variables:
|
|
380
|
+
|
|
477
381
|
```bash
|
|
478
382
|
export OBS_EMAIL="agent@company.com"
|
|
479
383
|
export OBS_PASSWORD="secure-password"
|
|
480
384
|
obs login --headless
|
|
481
385
|
```
|
|
482
386
|
|
|
483
|
-
---
|
|
484
|
-
|
|
485
|
-
## Update Notifications
|
|
486
|
-
|
|
487
|
-
The CLI includes a non-blocking background update service that checks for newer versions on npm. If an update is available, a notification will be displayed at the start of your command output. This check is automatically disabled in `--json` mode.
|
|
488
|
-
|
|
489
|
-
---
|
|
490
|
-
|
|
491
387
|
## Global Options
|
|
492
388
|
|
|
493
|
-
- `-v, --verbose
|
|
494
|
-
- `--json
|
|
495
|
-
- `--api-url <url
|
|
496
|
-
- `--api-key <key
|
|
497
|
-
- `--version
|
|
498
|
-
- `--help
|
|
389
|
+
- `-v, --verbose`: verbose output and stack traces
|
|
390
|
+
- `--json`: strict JSON output
|
|
391
|
+
- `--api-url <url>`: override the API URL
|
|
392
|
+
- `--api-key <key>`: override the API key
|
|
393
|
+
- `--version`: show the version number
|
|
394
|
+
- `--help`: show help
|
|
499
395
|
|
|
500
|
-
|
|
396
|
+
The CLI also runs a non-blocking background check for newer versions on npm and prints a notice if one is available. This is disabled in `--json` mode.
|
|
501
397
|
|
|
502
398
|
## Documentation
|
|
503
399
|
|
|
504
|
-
Deeper docs live in
|
|
400
|
+
Deeper docs live in [`docs/`](docs/):
|
|
505
401
|
|
|
506
402
|
- **Guides**
|
|
507
|
-
- [Getting started](docs/guides/getting-started.md)
|
|
508
|
-
- [Config-as-code](docs/guides/config-as-code.md)
|
|
509
|
-
- [AI agent integration](docs/guides/ai-agent-integration.md)
|
|
403
|
+
- [Getting started](docs/guides/getting-started.md): install, login, headless agent auth
|
|
404
|
+
- [Config-as-code](docs/guides/config-as-code.md): the `obs apply` / `obs export` workflow
|
|
405
|
+
- [AI agent integration](docs/guides/ai-agent-integration.md): JSON envelope, agent recipes
|
|
510
406
|
- **Reference**
|
|
511
|
-
- [CLI command reference](docs/reference/cli-commands.md)
|
|
407
|
+
- [CLI command reference](docs/reference/cli-commands.md): every command and flag
|
|
512
408
|
- [Environment variables](docs/reference/environment-variables.md)
|
|
513
409
|
- [JSON schema](docs/reference/json-schema.md)
|
|
514
410
|
- **Architecture** (for contributors)
|