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.
Installation
Section titled “Installation”Each CLI is its own npm package.
npm install -g @marriska/runner # one-shot CI runnernpm install -g @marriska/agent # persistent local agentOr use them without installing via npx:
npx @marriska/runner run --test-set "Smoke" --token $MARRISKA_TOKENnpx @marriska/agent start --token $MARRISKA_TOKENAfter install, run npx playwright install chromium (or firefox /
webkit) so Playwright has the browsers it needs.
marriska-runner
Section titled “marriska-runner”marriska-runner <command> [options]Commands
Section titled “Commands”| Command | Description |
|---|---|
run | Execute a test or test set. Default if no command is given. |
list | List test sets in your org. With --tests, lists every test grouped by folder. |
Options
Section titled “Options”| Flag | Type | Description | Default |
|---|---|---|---|
--token <key> | string | API key. Falls back to MARRISKA_TOKEN. Required. | — |
--test-set <name-or-id> | string | Test set to run. | — |
--test <name-or-id> | string | Single test to run. | — |
--browsers <list> | string | Comma-separated browsers. | chromium |
--api-url <url> | string | API base URL. Falls back to MARRISKA_API_URL. | https://api.marriska.com/api/v1 |
--headed | flag | Show the browser window during execution. | headless |
--parallel | flag | Run multiple browsers concurrently instead of sequentially. | sequential |
--ci | flag | CI mode — don’t auto-open the report; rely on exit code. | off |
--no-report | flag | Skip HTML report generation entirely. | off |
--report-dir <dir> | string | Directory for the HTML report. | ./marriska-reports |
--tests | flag | (With list) show tests instead of test sets. | off |
-h, --help | flag | Print usage and exit. | — |
-v, --version | flag | Print CLI version and exit. | — |
You must pass either --test-set or --test to run. Listing alone is
fine without either:
marriska-runner listmarriska-runner list --testsExamples
Section titled “Examples”# Run a single test set in Chromium, write HTML report to ./marriska-reportsmarriska-runner run --test-set "Smoke" --token ak_live_...
# Run one test, all three browsers, in parallel, headedmarriska-runner run --test "Login flow" \ --browsers chromium,firefox,webkit \ --parallel --headed
# CI mode — don't open the report locally, exit code drives the buildmarriska-runner run --test-set "Regression" --ci
# Skip the report entirely (smallest footprint)marriska-runner run --test-set "Smoke" --no-reportExit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 | Run completed; all tests passed. |
1 | At least one test failed, or Playwright browsers aren’t installed (run npx playwright install). |
2 | Configuration / 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.
marriska-agent
Section titled “marriska-agent”A persistent agent that holds a WebSocket connection to Marriska and runs tests dispatched from the cloud Runner page. One agent per machine, typically.
marriska-agent start [options]Options
Section titled “Options”| Flag | Type | Description | Default |
|---|---|---|---|
--token <key> | string | API key. Falls back to MARRISKA_TOKEN. Required. | — |
--ws-url <url> | string | WebSocket URL. Falls back to MARRISKA_WS_URL. | wss://api.marriska.com/api/v1/ws/agent |
--headed | flag | Show browser windows during execution. | headless |
--parallel | flag | Run multiple browsers concurrently per dispatched test. | sequential |
-h, --help | flag | Print usage and exit. | — |
-v, --version | flag | Print agent version and exit. | — |
Behavior
Section titled “Behavior”When the agent starts, it:
- Detects which Playwright browsers are installed on the machine and reports them as capabilities.
- Connects over WebSocket and waits for dispatches from the cloud.
- Runs each dispatched test locally; streams step events back as the run progresses.
- Stays connected until you stop it with Ctrl+C (handles
SIGINTandSIGTERMcleanly).
If no browsers are installed, the agent exits immediately with the
suggestion npx playwright install chromium.
Examples
Section titled “Examples”# Foreground, env var for the tokenMARRISKA_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/agentExit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
1 | Playwright browsers aren’t installed (or the agent crashed mid-run). |
2 | Missing --token / startup error / unhandled exception. |
There’s no 0 exit on a daemon — the agent is meant to run until you
stop it.
Environment variables
Section titled “Environment variables”| Variable | Equivalent flag | Used by |
|---|---|---|
MARRISKA_TOKEN | --token | Both runner and agent |
MARRISKA_API_URL | --api-url | Runner |
MARRISKA_WS_URL | --ws-url | Agent |
The token is read once at startup. There’s no on-disk credential cache;
in CI, set MARRISKA_TOKEN as a secret.
See also
Section titled “See also”- Running tests in GitHub Actions — practical CI walkthrough using
marriska-runner - Setting up the local agent — installing and connecting
marriska-agent - API keys — creating and rotating the token both CLIs need
- Cloud vs local execution — when to use which