@supercheck/cli
v0.1.0-beta.9
Published
Open-Source Testing, Monitoring, and Reliability — as Code
Maintainers
Readme
@supercheck/cli
Open-Source Testing, Monitoring, and Reliability — as Code.
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.
Features
- Monitoring-as-Code: Define monitors, tests, jobs, and status pages in TypeScript.
- CI/CD Integration: Trigger jobs and wait for results directly from your pipeline.
- Full Resource Management: Manage all resources (tests, monitors, jobs, variables, tags, notifications) from the terminal.
- Local Development: Run and debug tests locally before deploying.
Installation
npm install -g @supercheck/cliOr run directly with npx:
npx @supercheck/cli --helpQuick Start
Initialize a new project:
supercheck initThis creates a
supercheck.config.tsand a_supercheck_directory with example tests.Authenticate:
supercheck login --token sck_live_...You can generate a CLI token in your Dashboard under Project Settings > CLI Tokens.
Pull existing resources:
supercheck pullPreview & Deploy:
supercheck diff supercheck deploy
Command Reference
Authentication
| Command | Description |
|---|---|
| supercheck login --token <token> | Authenticate with a CLI token |
| supercheck logout | Clear stored credentials |
| supercheck whoami | Show current authentication context |
Monitoring-as-Code
| Command | Description |
|---|---|
| supercheck init | Initialize a new project with config and example tests |
| supercheck pull | Sync cloud resources to local config |
| supercheck diff | Preview changes between local config and cloud |
| supercheck deploy | Apply local config changes to the cloud |
| supercheck destroy --force | Remove all managed resources from the cloud |
| supercheck config validate | Validate your supercheck.config.ts |
Jobs & Runs
| Command | Description |
|---|---|
| supercheck job list | List all jobs |
| supercheck job create | Create a new job |
| supercheck job run | Run a job immediately |
| supercheck job trigger <id> --wait | Trigger a job and wait for completion (CI/CD) |
| supercheck run list | List recent execution runs |
| supercheck run stream <id> | Stream live console output |
Tests & Monitors
| Command | Description |
|---|---|
| supercheck test list | List all tests |
| supercheck test create | Create a new test |
| supercheck test validate | Validate local test scripts |
| supercheck monitor list | List all monitors |
| supercheck monitor status <id> | Check real-time monitor status |
Variables, Tags & Notifications
| Command | Description |
|---|---|
| supercheck var list / get / set / delete | Manage project variables |
| supercheck tag list / create / delete | Manage tags |
| supercheck notification list / delete | Manage notification providers |
| supercheck alert history | View alert history |
| supercheck audit | View audit logs (admin) |
Utilities
| Command | Description |
|---|---|
| supercheck health | Check API health |
| supercheck locations | List available execution locations |
Configuration
The supercheck.config.ts file is the source of truth for your project configuration.
import { defineConfig } from '@supercheck/cli'
export default defineConfig({
schemaVersion: '1.0',
project: {
organization: 'my-org-id',
project: 'my-project-id',
},
tests: {
playwright: {
testMatch: '_supercheck_/tests/**/*.pw.ts',
},
k6: {
testMatch: '_supercheck_/tests/**/*.k6.ts',
},
},
monitors: [
{
name: 'API Health',
type: 'http_request',
target: 'https://api.example.com/health',
frequencyMinutes: 5,
}
]
})CI/CD Integration
GitHub Actions
- name: Run E2E Tests
run: npx @supercheck/cli job trigger ${{ secrets.SUPERCHECK_JOB_ID }} --wait --json
env:
SUPERCHECK_TOKEN: ${{ secrets.SUPERCHECK_TOKEN }}GitLab CI
test:
image: node:18
script:
- npm install -g @supercheck/cli
- supercheck job trigger $SUPERCHECK_JOB_ID --wait
variables:
SUPERCHECK_TOKEN: $SUPERCHECK_TOKENEnvironment Variables
| Variable | Description |
|---|---|
| SUPERCHECK_TOKEN | CLI token for authentication (CI/CD) |
| SUPERCHECK_TRIGGER_KEY | Trigger key for job trigger |
| SUPERCHECK_URL | Custom API URL (self-hosted) |
Global Options
| Flag | Description |
|---|---|
| --json | Output in JSON format |
| --quiet | Suppress non-essential output |
| --debug | Enable debug logging |
| -v, --version | Show CLI version |
