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_/playwright/**/*.pw.ts',
},
k6: {
testMatch: '_supercheck_/k6/**/*.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: ['local'],
},
},
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_/playwright/homepage-check.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"
export SUPERCHECK_TRIGGER_KEY="sck_trigger_..."
export SUPERCHECK_TOKEN="sck_live_..."
supercheck job trigger abc123 --waitProject Structure
_supercheck_/ Folder
Tests live in the _supercheck_/ folder, grouped by runner:
my-project/
├── _supercheck_/
│ ├── playwright/
│ │ ├── homepage-check.019a1234-abcd-7000-8000-000000000001.pw.ts # Playwright test (slug + UUID)
│ │ └── api-check.019a1234-abcd-7000-8000-000000000002.pw.ts # Playwright API test
│ ├── k6/
│ │ └── load-test.019a1234-abcd-7000-8000-000000000003.k6.ts # k6 performance test
├── supercheck.config.ts
└── package.jsonFile Naming Convention
| Extension | Runner | Example |
|---|---|---|
*.pw.ts | Playwright | _supercheck_/playwright/homepage-check.019a1234-abcd-7000-8000-000000000001.pw.ts |
*.k6.ts | k6 | _supercheck_/k6/load-test.019a1234-abcd-7000-8000-000000000003.k6.ts |
Test files pulled from the cloud use slug.{uuid}.pw.ts and slug.{uuid}.k6.ts. The UUID keeps paths stable across renames, while the slug makes files easy to identify locally.
Config Schema Reference
project
| Field | Type | Required | Description |
|---|---|---|---|
organization | string | Yes | Organization ID (UUID) |
project | string | Yes | Project ID (UUID) |
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 |
browser | string | Browser to use (default: chromium) |
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 runner type (playwright, k6) |
cronSchedule | string | Cron expression |
tests | string[] | Test file paths or IDs |
alertConfig | object | Alert config with notificationProviders (UUIDs), alertOnFailure, etc. |
monitors[]
| Field | Type | Description |
|---|---|---|
id | string | Database UUID (present for existing resources, omit for new) |
name | string | Monitor display name |
type | string | Monitor type (http_request, website, ping_host, port_check, synthetic_test) |
target | string | URL or host to monitor |
frequencyMinutes | number | Check interval in minutes |
enabled | boolean | Whether the monitor is active |
config | object | Monitor-specific config (method, timeoutSeconds, expectedStatusCodes, locationConfig) |
alertConfig | object | Alert config with notificationProviders (UUIDs), alertOnFailure, alertOnRecovery |
variables[]
| Field | Type | Description |
|---|---|---|
key | string | Variable name |
value | string | Variable value |
isSecret | boolean | Whether the value is encrypted |
description | string | Optional description |
tags[]
| Field | Type | Description |
|---|---|---|
id | string | Database UUID |
name | string | Tag name |
color | string | Hex color code |
notificationProviders[]
| Field | Type | Description |
|---|---|---|
id | string | Database UUID |
name | string | Provider display name |
type | string | Provider type (email, slack, webhook, telegram, discord, teams) |
config | object | Provider-specific configuration (e.g., webhookUrl for Slack) |
For webhook notification providers, config.bodyTemplate is part of the managed configuration and should be kept in source control with the rest of the provider config. supercheck pull exports it, supercheck diff reports edits to it, and supercheck deploy applies those edits as provider configuration changes.
Secret provider fields returned by the API as masked values, such as webhook URLs or headers, are ignored during diff comparison only when they are omitted from the local config. To keep configs safe to commit, supercheck pull strips those masked secret fields from the written config rather than writing placeholder values. When you later supercheck deploy, the server preserves the existing secret values for any omitted sensitive fields, so non-secret edits (for example, bodyTemplate changes) round-trip safely without overwriting real webhook URLs.
Pulled notification provider configs do not contain secret values. If you want to rotate a secret, add the new value to the config file before deploying; supercheck diff shows a redacted secret change and supercheck deploy sends the new value. You can also use supercheck notification update --config with the full replacement config.
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.