@supercheck/cli 0.1.0-beta.2 → 0.1.0-beta.3
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 +92 -34
- package/dist/bin/supercheck.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# @supercheck/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Open-Source Testing, Monitoring, and Reliability — as Code.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@supercheck/cli)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
The Supercheck CLI provides a first-class command-line interface for managing your testing and monitoring infrastructure as code. It is designed for CI/CD integration, automation, and power-user workflows.
|
|
9
|
+
|
|
10
|
+
## Features
|
|
11
|
+
|
|
12
|
+
- **Monitoring-as-Code**: Define monitors, tests, and status pages in TypeScript.
|
|
13
|
+
- **CI/CD Integration**: Trigger jobs and wait for results directly from your pipeline.
|
|
14
|
+
- **Local Development**: Run and debug tests locally before deploying.
|
|
15
|
+
- **Full API Access**: Manage all resources (jobs, variables, tags) from the terminal.
|
|
4
16
|
|
|
5
17
|
## Installation
|
|
6
18
|
|
|
@@ -8,31 +20,68 @@ Supercheck CLI — monitoring-as-code for Playwright and k6.
|
|
|
8
20
|
npm install -g @supercheck/cli
|
|
9
21
|
```
|
|
10
22
|
|
|
11
|
-
Or
|
|
23
|
+
Or run directly with `npx`:
|
|
12
24
|
|
|
13
25
|
```bash
|
|
14
|
-
npx @supercheck/cli
|
|
26
|
+
npx @supercheck/cli --help
|
|
15
27
|
```
|
|
16
28
|
|
|
17
29
|
## Quick Start
|
|
18
30
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
supercheck init
|
|
31
|
+
1. **Initialize a new project**:
|
|
32
|
+
```bash
|
|
33
|
+
supercheck init
|
|
34
|
+
```
|
|
35
|
+
This creates a `supercheck.config.ts` and a `_supercheck_` directory with example tests.
|
|
22
36
|
|
|
23
|
-
|
|
24
|
-
|
|
37
|
+
2. **Authenticate**:
|
|
38
|
+
```bash
|
|
39
|
+
supercheck login --token sck_live_...
|
|
40
|
+
```
|
|
41
|
+
You can generate a CLI token in your Dashboard under **Project Settings > CLI Tokens**.
|
|
25
42
|
|
|
26
|
-
|
|
27
|
-
|
|
43
|
+
3. **Validate configuration**:
|
|
44
|
+
```bash
|
|
45
|
+
supercheck config validate
|
|
46
|
+
```
|
|
28
47
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
48
|
+
4. **Deploy to Cloud**:
|
|
49
|
+
```bash
|
|
50
|
+
supercheck deploy
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Command Reference
|
|
54
|
+
|
|
55
|
+
### Authentication
|
|
56
|
+
|
|
57
|
+
- `supercheck login --token <token>`: Authenticate with a CLI token.
|
|
58
|
+
- `supercheck logout`: clear stored credentials.
|
|
59
|
+
- `supercheck whoami`: Show current authentication context.
|
|
60
|
+
|
|
61
|
+
### Jobs & Runs
|
|
62
|
+
|
|
63
|
+
- `supercheck job list`: List all jobs.
|
|
64
|
+
- `supercheck job trigger <id> --wait`: Trigger a job and wait for completion (ideal for CI/CD).
|
|
65
|
+
- `supercheck job run --id <id>`: Run a job immediately.
|
|
66
|
+
- `supercheck run list`: List recent execution runs.
|
|
67
|
+
- `supercheck run stream <id>`: Stream live console output from a running job.
|
|
68
|
+
|
|
69
|
+
### Tests & Monitors
|
|
70
|
+
|
|
71
|
+
- `supercheck test list`: List all tests.
|
|
72
|
+
- `supercheck test create --file <path>`: Create a new test from a script file.
|
|
73
|
+
- `supercheck monitor list`: List all monitors.
|
|
74
|
+
- `supercheck monitor status <id>`: Check the real-time status of a monitor.
|
|
75
|
+
|
|
76
|
+
### Resources
|
|
77
|
+
|
|
78
|
+
- `supercheck pull`: Sync cloud resources to your local config.
|
|
79
|
+
- `supercheck diff`: Preview changes between local config and cloud.
|
|
80
|
+
- `supercheck deploy`: Apply local config changes to the cloud.
|
|
32
81
|
|
|
33
82
|
## Configuration
|
|
34
83
|
|
|
35
|
-
|
|
84
|
+
The `supercheck.config.ts` file is the source of truth for your project configuration.
|
|
36
85
|
|
|
37
86
|
```typescript
|
|
38
87
|
import { defineConfig } from '@supercheck/cli'
|
|
@@ -40,40 +89,49 @@ import { defineConfig } from '@supercheck/cli'
|
|
|
40
89
|
export default defineConfig({
|
|
41
90
|
schemaVersion: '1.0',
|
|
42
91
|
project: {
|
|
43
|
-
organization: 'my-org',
|
|
44
|
-
project: 'my-project',
|
|
92
|
+
organization: 'my-org-slug',
|
|
93
|
+
project: 'my-project-slug',
|
|
45
94
|
},
|
|
46
95
|
tests: {
|
|
47
96
|
playwright: {
|
|
48
97
|
testMatch: '_supercheck_/tests/**/*.pw.ts',
|
|
49
|
-
browser: 'chromium',
|
|
50
98
|
},
|
|
51
99
|
k6: {
|
|
52
100
|
testMatch: '_supercheck_/tests/**/*.k6.ts',
|
|
53
101
|
},
|
|
54
102
|
},
|
|
103
|
+
monitors: [
|
|
104
|
+
{
|
|
105
|
+
name: 'API Health',
|
|
106
|
+
type: 'http_request',
|
|
107
|
+
target: 'https://api.example.com/health',
|
|
108
|
+
frequencyMinutes: 5,
|
|
109
|
+
}
|
|
110
|
+
]
|
|
55
111
|
})
|
|
56
112
|
```
|
|
57
113
|
|
|
58
|
-
##
|
|
114
|
+
## CI/CD Integration
|
|
59
115
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
└── main-status.ts # Status page definition
|
|
116
|
+
### GitHub Actions
|
|
117
|
+
|
|
118
|
+
```yaml
|
|
119
|
+
- name: Run E2E Tests
|
|
120
|
+
run: |
|
|
121
|
+
npx @supercheck/cli job trigger ${{ secrets.SUPERCHECK_JOB_ID }} --wait --json
|
|
122
|
+
env:
|
|
123
|
+
SUPERCHECK_TOKEN: ${{ secrets.SUPERCHECK_TOKEN }}
|
|
69
124
|
```
|
|
70
125
|
|
|
71
|
-
|
|
126
|
+
### GitLab CI
|
|
72
127
|
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
npm
|
|
78
|
-
|
|
128
|
+
```yaml
|
|
129
|
+
test:
|
|
130
|
+
image: node:18
|
|
131
|
+
script:
|
|
132
|
+
- npm install -g @supercheck/cli
|
|
133
|
+
- supercheck job trigger $SUPERCHECK_JOB_ID --wait
|
|
134
|
+
variables:
|
|
135
|
+
SUPERCHECK_TOKEN: $SUPERCHECK_TOKEN
|
|
79
136
|
```
|
|
137
|
+
|
package/dist/bin/supercheck.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supercheck/cli",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.3",
|
|
4
4
|
"description": "Open-Source Testing, Monitoring, and Reliability — as Code",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"monitoring",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"author": "Supercheck <hello@supercheck.io>",
|
|
24
24
|
"type": "module",
|
|
25
|
-
"license": "
|
|
25
|
+
"license": "Supercheck Community License",
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|