Skip to content

CLI reference

There are two CLIs:

  • marriska-runner — fire off a test or test set from your terminal or a CI job. Runs Playwright locally on the machine that invokes it, streams results back to Marriska, and writes an HTML report.
  • marriska-agent — a long-running daemon that connects over WebSocket and waits for tests dispatched from the cloud. Use this when you want to run from your laptop or a self-hosted runner without baking test execution into a CI workflow.

Each CLI is its own npm package.

Terminal window
npm install -g @marriska/runner # one-shot CI runner
npm install -g @marriska/agent # persistent local agent

Or use them without installing via npx:

Terminal window
npx @marriska/runner run --test-set "Smoke" --token $MARRISKA_TOKEN
npx @marriska/agent start --token $MARRISKA_TOKEN

After install, run npx playwright install chromium (or firefox / webkit) so Playwright has the browsers it needs.

Terminal window
marriska-runner <command> [options]
CommandDescription
runExecute a test or test set. Default if no command is given.
listList test sets in your org. With --tests, lists every test grouped by folder.
FlagTypeDescriptionDefault
--token <key>stringAPI key. Falls back to MARRISKA_TOKEN. Required.
--test-set <name-or-id>stringTest set to run.
--test <name-or-id>stringSingle test to run.
--browsers <list>stringComma-separated browsers.chromium
--api-url <url>stringAPI base URL. Falls back to MARRISKA_API_URL.https://api.marriska.com/api/v1
--headedflagShow the browser window during execution.headless
--parallelflagRun multiple browsers concurrently instead of sequentially.sequential
--ciflagCI mode — don’t auto-open the report; rely on exit code.off
--no-reportflagSkip HTML report generation entirely.off
--report-dir <dir>stringDirectory for the HTML report../marriska-reports
--testsflag(With list) show tests instead of test sets.off
-h, --helpflagPrint usage and exit.
-v, --versionflagPrint CLI version and exit.

You must pass either --test-set or --test to run. Listing alone is fine without either:

Terminal window
marriska-runner list
marriska-runner list --tests
Terminal window
# Run a single test set in Chromium, write HTML report to ./marriska-reports
marriska-runner run --test-set "Smoke" --token ak_live_...
# Run one test, all three browsers, in parallel, headed
marriska-runner run --test "Login flow" \
--browsers chromium,firefox,webkit \
--parallel --headed
# CI mode — don't open the report locally, exit code drives the build
marriska-runner run --test-set "Regression" --ci
# Skip the report entirely (smallest footprint)
marriska-runner run --test-set "Smoke" --no-report
CodeMeaning
0Run completed; all tests passed.
1At least one test failed, or Playwright browsers aren’t installed (run npx playwright install).
2Configuration / startup error — missing --token, bad flag, network error fetching the test, etc.

The runner exits as soon as the run finishes — it does not poll for schedule-driven re-runs.

A persistent agent that holds a WebSocket connection to Marriska and runs tests dispatched from the cloud Runner page. One agent per machine, typically.

Terminal window
marriska-agent start [options]
FlagTypeDescriptionDefault
--token <key>stringAPI key. Falls back to MARRISKA_TOKEN. Required.
--ws-url <url>stringWebSocket URL. Falls back to MARRISKA_WS_URL.wss://api.marriska.com/api/v1/ws/agent
--headedflagShow browser windows during execution.headless
--parallelflagRun multiple browsers concurrently per dispatched test.sequential
-h, --helpflagPrint usage and exit.
-v, --versionflagPrint agent version and exit.

When the agent starts, it:

  1. Detects which Playwright browsers are installed on the machine and reports them as capabilities.
  2. Connects over WebSocket and waits for dispatches from the cloud.
  3. Runs each dispatched test locally; streams step events back as the run progresses.
  4. Stays connected until you stop it with Ctrl+C (handles SIGINT and SIGTERM cleanly).

If no browsers are installed, the agent exits immediately with the suggestion npx playwright install chromium.

Terminal window
# Foreground, env var for the token
MARRISKA_TOKEN=ak_live_... marriska-agent start
# Inline token, headed (great for debugging visual flow)
marriska-agent start --token ak_live_... --headed
# Custom WebSocket URL (self-hosted / staging)
marriska-agent start --token ak_live_... --ws-url wss://staging.example.com/ws/agent
CodeMeaning
1Playwright browsers aren’t installed (or the agent crashed mid-run).
2Missing --token / startup error / unhandled exception.

There’s no 0 exit on a daemon — the agent is meant to run until you stop it.

VariableEquivalent flagUsed by
MARRISKA_TOKEN--tokenBoth runner and agent
MARRISKA_API_URL--api-urlRunner
MARRISKA_WS_URL--ws-urlAgent

The token is read once at startup. There’s no on-disk credential cache; in CI, set MARRISKA_TOKEN as a secret.