@supercheck/cli 0.1.0-beta.2 → 0.1.0-beta.4
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 +147 -37
- package/dist/bin/supercheck.js +500 -405
- package/dist/bin/supercheck.js.map +1 -1
- package/dist/chunk-W54DX2I7.js +21 -0
- package/dist/chunk-W54DX2I7.js.map +1 -0
- package/dist/prompt-BPDPYRS7.js +8 -0
- package/dist/prompt-BPDPYRS7.js.map +1 -0
- 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, jobs, and status pages in TypeScript.
|
|
13
|
+
- **CI/CD Integration**: Trigger jobs and wait for results directly from your pipeline.
|
|
14
|
+
- **Full Resource Management**: Manage all resources (tests, monitors, jobs, variables, tags, notifications) from the terminal.
|
|
15
|
+
- **Modern UX**: Spinners, colorized output, status indicators, and interactive prompts.
|
|
4
16
|
|
|
5
17
|
## Installation
|
|
6
18
|
|
|
@@ -8,31 +20,99 @@ 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
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
supercheck
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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.
|
|
36
|
+
|
|
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**.
|
|
42
|
+
|
|
43
|
+
3. **Pull existing resources**:
|
|
44
|
+
```bash
|
|
45
|
+
supercheck pull
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
4. **Preview & Deploy**:
|
|
49
|
+
```bash
|
|
50
|
+
supercheck diff
|
|
51
|
+
supercheck deploy
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Command Reference
|
|
55
|
+
|
|
56
|
+
### Authentication
|
|
57
|
+
|
|
58
|
+
| Command | Description |
|
|
59
|
+
|---|---|
|
|
60
|
+
| `supercheck login --token <token>` | Authenticate with a CLI token |
|
|
61
|
+
| `supercheck logout` | Clear stored credentials |
|
|
62
|
+
| `supercheck whoami` | Show current authentication context |
|
|
63
|
+
|
|
64
|
+
### Monitoring-as-Code
|
|
65
|
+
|
|
66
|
+
| Command | Description |
|
|
67
|
+
|---|---|
|
|
68
|
+
| `supercheck init` | Initialize a new project with config and example tests |
|
|
69
|
+
| `supercheck pull` | Sync cloud resources to local config |
|
|
70
|
+
| `supercheck diff` | Preview changes between local config and cloud |
|
|
71
|
+
| `supercheck deploy` | Apply local config changes to the cloud |
|
|
72
|
+
| `supercheck destroy --force` | Remove all managed resources from the cloud |
|
|
73
|
+
| `supercheck config validate` | Validate your `supercheck.config.ts` |
|
|
74
|
+
|
|
75
|
+
### Jobs & Runs
|
|
76
|
+
|
|
77
|
+
| Command | Description |
|
|
78
|
+
|---|---|
|
|
79
|
+
| `supercheck job list` | List all jobs |
|
|
80
|
+
| `supercheck job create` | Create a new job |
|
|
81
|
+
| `supercheck job run` | Run a job immediately |
|
|
82
|
+
| `supercheck job trigger <id> --wait` | Trigger a job and wait for completion (CI/CD) |
|
|
83
|
+
| `supercheck run list` | List recent execution runs |
|
|
84
|
+
| `supercheck run stream <id>` | Stream live console output |
|
|
85
|
+
|
|
86
|
+
### Tests & Monitors
|
|
87
|
+
|
|
88
|
+
| Command | Description |
|
|
89
|
+
|---|---|
|
|
90
|
+
| `supercheck test list` | List all tests |
|
|
91
|
+
| `supercheck test create` | Create a new test |
|
|
92
|
+
| `supercheck test validate` | Validate local test scripts |
|
|
93
|
+
| `supercheck monitor list` | List all monitors |
|
|
94
|
+
| `supercheck monitor status <id>` | Check real-time monitor status |
|
|
95
|
+
|
|
96
|
+
### Variables, Tags & Notifications
|
|
97
|
+
|
|
98
|
+
| Command | Description |
|
|
99
|
+
|---|---|
|
|
100
|
+
| `supercheck var list / get / set / delete` | Manage project variables |
|
|
101
|
+
| `supercheck tag list / create / delete` | Manage tags |
|
|
102
|
+
| `supercheck notification list / delete` | Manage notification providers |
|
|
103
|
+
| `supercheck alert history` | View alert history |
|
|
104
|
+
| `supercheck audit` | View audit logs (admin) |
|
|
105
|
+
|
|
106
|
+
### Utilities
|
|
107
|
+
|
|
108
|
+
| Command | Description |
|
|
109
|
+
|---|---|
|
|
110
|
+
| `supercheck health` | Check API health |
|
|
111
|
+
| `supercheck locations` | List available execution locations |
|
|
32
112
|
|
|
33
113
|
## Configuration
|
|
34
114
|
|
|
35
|
-
|
|
115
|
+
The `supercheck.config.ts` file is the source of truth for your project configuration.
|
|
36
116
|
|
|
37
117
|
```typescript
|
|
38
118
|
import { defineConfig } from '@supercheck/cli'
|
|
@@ -40,40 +120,70 @@ import { defineConfig } from '@supercheck/cli'
|
|
|
40
120
|
export default defineConfig({
|
|
41
121
|
schemaVersion: '1.0',
|
|
42
122
|
project: {
|
|
43
|
-
organization: 'my-org',
|
|
44
|
-
project: 'my-project',
|
|
123
|
+
organization: 'my-org-id',
|
|
124
|
+
project: 'my-project-id',
|
|
45
125
|
},
|
|
46
126
|
tests: {
|
|
47
127
|
playwright: {
|
|
48
128
|
testMatch: '_supercheck_/tests/**/*.pw.ts',
|
|
49
|
-
browser: 'chromium',
|
|
50
129
|
},
|
|
51
130
|
k6: {
|
|
52
131
|
testMatch: '_supercheck_/tests/**/*.k6.ts',
|
|
53
132
|
},
|
|
54
133
|
},
|
|
134
|
+
monitors: [
|
|
135
|
+
{
|
|
136
|
+
name: 'API Health',
|
|
137
|
+
type: 'http_request',
|
|
138
|
+
target: 'https://api.example.com/health',
|
|
139
|
+
frequencyMinutes: 5,
|
|
140
|
+
}
|
|
141
|
+
]
|
|
55
142
|
})
|
|
56
143
|
```
|
|
57
144
|
|
|
58
|
-
##
|
|
145
|
+
## CI/CD Integration
|
|
59
146
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
└── status-pages/
|
|
68
|
-
└── main-status.ts # Status page definition
|
|
147
|
+
### GitHub Actions
|
|
148
|
+
|
|
149
|
+
```yaml
|
|
150
|
+
- name: Run E2E Tests
|
|
151
|
+
run: npx @supercheck/cli job trigger ${{ secrets.SUPERCHECK_JOB_ID }} --wait --json
|
|
152
|
+
env:
|
|
153
|
+
SUPERCHECK_TOKEN: ${{ secrets.SUPERCHECK_TOKEN }}
|
|
69
154
|
```
|
|
70
155
|
|
|
71
|
-
|
|
156
|
+
### GitLab CI
|
|
72
157
|
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
npm
|
|
78
|
-
|
|
158
|
+
```yaml
|
|
159
|
+
test:
|
|
160
|
+
image: node:18
|
|
161
|
+
script:
|
|
162
|
+
- npm install -g @supercheck/cli
|
|
163
|
+
- supercheck job trigger $SUPERCHECK_JOB_ID --wait
|
|
164
|
+
variables:
|
|
165
|
+
SUPERCHECK_TOKEN: $SUPERCHECK_TOKEN
|
|
79
166
|
```
|
|
167
|
+
|
|
168
|
+
## Environment Variables
|
|
169
|
+
|
|
170
|
+
| Variable | Description |
|
|
171
|
+
|---|---|
|
|
172
|
+
| `SUPERCHECK_TOKEN` | CLI token for authentication (CI/CD) |
|
|
173
|
+
| `SUPERCHECK_TRIGGER_KEY` | Trigger key for `job trigger` |
|
|
174
|
+
| `SUPERCHECK_URL` | Custom API URL (self-hosted) |
|
|
175
|
+
|
|
176
|
+
## Global Options
|
|
177
|
+
|
|
178
|
+
| Flag | Description |
|
|
179
|
+
|---|---|
|
|
180
|
+
| `--json` | Output in JSON format |
|
|
181
|
+
| `--quiet` | Suppress non-essential output |
|
|
182
|
+
| `--debug` | Enable debug logging |
|
|
183
|
+
| `-v, --version` | Show CLI version |
|
|
184
|
+
|
|
185
|
+
## Links
|
|
186
|
+
|
|
187
|
+
- [Website](https://supercheck.io)
|
|
188
|
+
- [Documentation](https://docs.supercheck.io)
|
|
189
|
+
- [GitHub](https://github.com/supercheck-io/supercheck)
|