Configuration
supercheck.config.ts reference and project structureEdit
Config File
Supercheck CLI uses a TypeScript configuration file with full IntelliSense via defineConfig().
./supercheck.config.ts # Project configuration (checked into repo)
./supercheck.config.local.ts # Local overrides (gitignored, optional)Config files must never contain tokens. The CLI scans for token patterns (sck_live_*, sck_trigger_*, sck_test_*) and rejects any config containing them.
Full Example
import { defineConfig } from '@supercheck/cli'
export default defineConfig({
schemaVersion: '1.0',
project: {
organization: '019c1fe3-0a0a-7ae9-884d-61baea139786',
project: '019c1fe3-0a0f-7089-97b3-12990d78a9ee',
},
api: {
baseUrl: process.env.SUPERCHECK_URL ?? 'https://app.supercheck.io',
},
tests: {
playwright: {
testMatch: '_supercheck_/tests/**/*.pw.ts',
},
k6: {
testMatch: '_supercheck_/tests/**/*.k6.ts',
},
},
monitors: [
{
id: '019c3643-9495-7d66-a463-1c0d42d4520e',
name: 'API Health Monitor',
type: 'http_request',
target: 'https://api.example.com/health',
frequencyMinutes: 5,
enabled: true,
config: {
method: 'GET',
timeoutSeconds: 30,
expectedStatusCodes: '200-299',
locationConfig: {
locations: ['eu-central', 'us-east', 'asia-pacific'],
},
},
alertConfig: {
enabled: true,
alertOnFailure: true,
alertOnRecovery: true,
notificationProviders: ['019c22b5-6df9-79b7-b415-db8317b1bd0b', '019c22b5-a812-7acc-9f23-46f7904d2c2a'],
},
},
],
jobs: [
{
id: '01912345-abcd-7000-8000-000000000001',
name: 'Nightly E2E Suite',
tests: ['_supercheck_/tests/019a1234-abcd-7000-8000-000000000001.pw.ts'],
jobType: 'playwright',
cronSchedule: '0 2 * * *',
alertConfig: {
enabled: true,
alertOnFailure: true,
alertOnSuccess: true,
notificationProviders: ['019c22b5-6df9-79b7-b415-db8317b1bd0b'],
},
},
],
})Configuration Precedence
Settings are resolved in this order (highest to lowest priority):
- CLI flags —
--url,--config, etc. - Environment variables —
SUPERCHECK_URL,SUPERCHECK_ORG,SUPERCHECK_PROJECT supercheck.config.local.ts— Local overrides (deep-merged)supercheck.config.ts— Project defaults
Config Path Override
# Use a specific config file
supercheck deploy --config ./configs/staging.config.tsSupported formats: .ts, .js, .mjs
Self-Hosted Configuration
Standard Supercheck self-hosted deployments use Traefik + Let's Encrypt for automatic TLS — no certificate configuration needed.
# Self-hosted setup (that's all you need!)
export SUPERCHECK_URL="https://supercheck.yourdomain.com"
export SUPERCHECK_TOKEN="sck_live_..."
supercheck whoamiIf using Cloudflare proxy, set SSL/TLS mode to "Full (strict)" in Cloudflare Dashboard.
Corporate Proxy Configuration
For environments behind HTTP proxies:
export HTTPS_PROXY="http://proxy.corp.com:8080"
export NO_PROXY="localhost,127.0.0.1,.internal.corp.com"
supercheck job trigger abc123 --waitProject Structure
_supercheck_/ Folder
Tests, monitors, and status page definitions live in the _supercheck_/ folder:
my-project/
├── _supercheck_/
│ ├── tests/
│ │ ├── 019a1234-abcd-7000-8000-000000000001.pw.ts # Playwright test (UUID filename)
│ │ ├── 019a1234-abcd-7000-8000-000000000002.pw.ts # Playwright API test
│ │ └── 019a1234-abcd-7000-8000-000000000003.k6.ts # k6 performance test
│ ├── monitors/
│ │ └── api-monitor.ts # Monitor definition
│ └── status-pages/
│ └── main-status.ts # Status page definition
├── supercheck.config.ts
└── package.jsonFile Naming Convention
| Extension | Runner | Example |
|---|---|---|
*.pw.ts | Playwright | 019a1234-abcd-7000-8000-000000000001.pw.ts |
*.k6.ts | k6 | 019a1234-abcd-7000-8000-000000000003.k6.ts |
Test files pulled from the cloud are named using their database UUID ({uuid}.pw.ts or {uuid}.k6.ts). This ensures stable file paths that survive test renames in the dashboard. The test title is stored in the Supercheck database.
Config Schema Reference
project
| Field | Type | Required | Description |
|---|---|---|---|
organization | string | Yes | Organization slug |
project | string | Yes | Project slug |
api
| Field | Type | Default | Description |
|---|---|---|---|
baseUrl | string | https://app.supercheck.io | API base URL |
tests.playwright
| Field | Type | Description |
|---|---|---|
testMatch | string | Glob pattern for Playwright test files |
tests.k6
| Field | Type | Description |
|---|---|---|
testMatch | string | Glob pattern for k6 test files |
jobs[]
| Field | Type | Description |
|---|---|---|
id | string | Database UUID (present for existing resources, omit for new) |
name | string | Job display name |
jobType | string | Job type (playwright, k6) |
cronSchedule | string | Cron expression |
alertConfig | object | Alert config with notificationProviders (UUIDs), alertOnFailure, etc. |
Validate & Print
# Validate config syntax and schema
supercheck config validate
# Print resolved configuration (with env var expansion)
supercheck config printMonitoring-as-Code Commands
# Preview changes between config and server state
supercheck diff
# Deploy config to Supercheck (create/update/delete resources)
supercheck deploy
supercheck deploy --dry-run # Preview without applying
supercheck deploy --no-delete # Skip deletions
supercheck deploy --force # Skip confirmation
# Tear down all managed resources
supercheck destroy
supercheck destroy --dry-run
supercheck destroy --forceResources are reconciled using the database id — the CLI compares your local config with the server state and creates, updates, or deletes resources as needed. Resources pulled from the cloud include their id (UUID); new resources omit it and are created on deploy.