Supercheck LogoSupercheck

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

supercheck.config.ts
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):

  1. CLI flags--url, --config, etc.
  2. Environment variablesSUPERCHECK_URL, SUPERCHECK_ORG, SUPERCHECK_PROJECT
  3. supercheck.config.local.ts — Local overrides (deep-merged)
  4. supercheck.config.ts — Project defaults

Config Path Override

# Use a specific config file
supercheck deploy --config ./configs/staging.config.ts

Supported 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 whoami

If 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 --wait

Project 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.json

File Naming Convention

ExtensionRunnerExample
*.pw.tsPlaywright_supercheck_/playwright/homepage-check.019a1234-abcd-7000-8000-000000000001.pw.ts
*.k6.tsk6_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

FieldTypeRequiredDescription
organizationstringYesOrganization ID (UUID)
projectstringYesProject ID (UUID)

api

FieldTypeDefaultDescription
baseUrlstringhttps://app.supercheck.ioAPI base URL

tests.playwright

FieldTypeDescription
testMatchstringGlob pattern for Playwright test files
browserstringBrowser to use (default: chromium)

tests.k6

FieldTypeDescription
testMatchstringGlob pattern for k6 test files

jobs[]

FieldTypeDescription
idstringDatabase UUID (present for existing resources, omit for new)
namestringJob display name
jobTypestringJob runner type (playwright, k6)
cronSchedulestringCron expression
testsstring[]Test file paths or IDs
alertConfigobjectAlert config with notificationProviders (UUIDs), alertOnFailure, etc.

monitors[]

FieldTypeDescription
idstringDatabase UUID (present for existing resources, omit for new)
namestringMonitor display name
typestringMonitor type (http_request, website, ping_host, port_check, synthetic_test)
targetstringURL or host to monitor
frequencyMinutesnumberCheck interval in minutes
enabledbooleanWhether the monitor is active
configobjectMonitor-specific config (method, timeoutSeconds, expectedStatusCodes, locationConfig)
alertConfigobjectAlert config with notificationProviders (UUIDs), alertOnFailure, alertOnRecovery

variables[]

FieldTypeDescription
keystringVariable name
valuestringVariable value
isSecretbooleanWhether the value is encrypted
descriptionstringOptional description

tags[]

FieldTypeDescription
idstringDatabase UUID
namestringTag name
colorstringHex color code

notificationProviders[]

FieldTypeDescription
idstringDatabase UUID
namestringProvider display name
typestringProvider type (email, slack, webhook, telegram, discord, teams)
configobjectProvider-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 print

Monitoring-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 --force

Resources 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.

On this page