Supercheck LogoSupercheck

Configuration

supercheck.config.ts reference and project structureEdit

The CLI uses a TypeScript configuration file with full IntelliSense via defineConfig().

FilePurpose
./supercheck.config.tsProject configuration (checked into the repo)
./supercheck.config.local.tsLocal 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.

The CLI rejects unknown keys in typed configuration sections so misspellings surface during config validate or a sync operation. Provider-specific config maps remain extensible.

Full Example

Precedence

Settings resolve in this order, highest priority first:

#SourceExamples
1CLI flags--url, --config
2Environment variablesSUPERCHECK_URL, SUPERCHECK_ORG, SUPERCHECK_PROJECT
3supercheck.config.local.tsLocal overrides (deep-merged)
4supercheck.config.tsProject defaults

To use a specific file (.ts, .js or .mjs): supercheck deploy --config ./configs/staging.config.ts

Project Structure

Tests live in _supercheck_/, 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
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.

Test metadata annotations

supercheck pull writes // @title, // @priority (low, medium, high) and // @tags (comma-separated tag names) in the header of each test script: the leading run of // lines, or inside a multi-line JSDoc block at the very top (a single-line /** ... */ header is left alone). @priority and @tags elsewhere in the script are ignored; @title is read from the first match anywhere. They are local metadata: the CLI strips them before comparing or sending the script, including with test create --file and test update --file. deploy applies @priority (any letter case) and @tags; if an annotation is absent, the remote value is left alone. To remove all tags from a test, use supercheck test tag remove.

// @title Homepage Check
// @priority high
// @tags smoke, web

Validate and Deploy

Validate with supercheck config validate, preview with supercheck diff, apply with supercheck deploy (see Monitoring-as-Code for every flag).

BehaviorDetail
IdentityResources reconcile by database id. Pulled resources carry it; new ones omit it and are created
PruningRemote resources absent from config are kept. diff --delete previews pruning, deploy --delete applies it, including resources created outside this config
Context checkThe CLI verifies the configured organization and project against the authenticated context before syncing
Reviewdiff includes notification provider settings such as webhook bodyTemplate

Schema Reference

Deployment State

Successful deploys record server-assigned IDs for created resources, and the current names of updated or unchanged managed resources, in supercheck.state.json. Commit and share this file with CI so later deployments manage the same resources. Do not commit the temporary supercheck.state.json.lock.

On this page