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" --api-key $MARRISKA_API_KEY
npx @marriska/agent --api-key $MARRISKA_API_KEY

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.
loginStore an API key in the OS keychain so later commands don’t need --api-key.
logoutClear the stored API key from the keychain.

marriska-agent exposes the same login and logout commands.

FlagTypeDescriptionDefault
--api-key <key>stringAPI key. Falls back to MARRISKA_API_KEY, then the keychain. Required if none stored.
--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" --api-key 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 --api-key, 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
--api-key <key>stringAPI key. Falls back to MARRISKA_API_KEY, then the keychain. Required if none stored.
--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 API key
MARRISKA_API_KEY=ak_live_... marriska-agent
# Inline key, headed (great for debugging visual flow)
marriska-agent --api-key ak_live_... --headed
# Custom WebSocket URL (self-hosted / staging)
marriska-agent --api-key ak_live_... --ws-url wss://staging.example.com/ws/agent
CodeMeaning
1Playwright browsers aren’t installed (or the agent crashed mid-run).
2Missing --api-key / 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_API_KEY--api-keyBoth runner and agent
MARRISKA_API_URL--api-urlRunner
MARRISKA_WS_URL--ws-urlAgent

--token and MARRISKA_TOKEN are still accepted as deprecated aliases of --api-key / MARRISKA_API_KEY, but they print a deprecation warning — use the --api-key forms.

The API key is resolved in this order: the --api-key flag, then the MARRISKA_API_KEY env var, then the OS keychain (via keytar), then ~/.config/marriska/credentials (mode 0600). In CI, set MARRISKA_API_KEY as a secret.