Lifecycle
lifecycle runs in order: setup → start → wait → capture → teardown.
setupruns before capture (build steps, fixtures).startruns as background processes for long-lived dev servers.waitgates readiness before capture —wait.commandandwait.urlare polled until they succeed orwait.timeoutMselapses.captureis the list of targets to snapshot.teardownruns after capture; backgroundstartprocesses are then stopped.
setup, start, and teardown are arrays of shell command strings; capture is an array of target objects.
json
{
"lifecycle": {
"setup": ["npm run build"],
"start": ["npm run preview"],
"wait": { "url": "http://localhost:4173", "timeoutMs": 30000 },
"capture": [
{ "kind": "terminal", "name": "cli-help", "command": "my-app --help" }
],
"teardown": []
}
}Each capture target has a kind (terminal, web, check, performance, desktop, api, game), a unique name, and kind-specific options documented under Capture types. The full field tables live in the schema.