Skip to main content

Command line

Run commands with your package manager's runner, such as npx intelliwright test, pnpm exec intelliwright test, yarn intelliwright test or bunx intelliwright test.

CommandWhat it does
intelliwright testRuns tests, or with --ui, opens UI mode.
intelliwright initSets up Intelliwright in a project.
intelliwright installDownloads browsers.
intelliwright show-reportServes the last HTML report.

intelliwright --version prints the version, and --help after any command lists its options.

intelliwright test​

npx intelliwright test [filters...] [options]

Filters are test files or folders. Add :line to run the test or describe that starts on that line. A filter that isn't an existing path matches test files whose path contains it.

OptionWhat it does
-c, --config <file>Uses this config file.
-t, --tag <expression>Runs tests whose tags match, such as "@smoke and not @slow".
-g, --grep <regex>Runs tests whose full title matches.
--grep-invert <regex>Skips tests whose full title matches.
-s, --suite <name>Runs a named suite from the config.
--listLists the matching tests without running them.
--last-failedRuns only the tests that failed in the previous run.
--headedShows the browser while tests run.
-j, --workers <count>Number of worker processes, at least 1.
--retries <count>Extra attempts for failing tests.
--timeout <ms>Milliseconds per test. 0 means no limit.
--reporter <names>Comma-separated reporters: terminal, html, json, junit.
--base-url <url>Runs against this URL instead of the config's baseURL.
--update-cacheResolves every AI action again instead of using cached locators.
--uiOpens UI mode, a page where you run one test, a file or every listed test, and see steps, errors, screenshots and AI decisions as they happen. The filters decide which tests are listed, and saving a test file reloads the list. It can't be combined with --list, and it ignores --reporter.
--port <port>With --ui, the port to serve on. Defaults to 9324. When it's taken, a free port is used.
--host <host>With --ui, the host to serve on. Defaults to localhost.
--no-openWith --ui, doesn't open the browser.

Exit codes: 0 when every test passed, was skipped, or was flaky; 1 when a test failed, a file failed to load, no tests matched, or the config is invalid; 130 when interrupted. UI mode runs until you close its page or press Ctrl+C, and then exits with 0.

See Running and selecting tests.

intelliwright init​

npx intelliwright init [options]

Creates intelliwright.config.ts, e2e/pages/home.page.ts, e2e/fixtures.ts and e2e/home.e2e.ts (.mjs in JavaScript projects), adds entries to .gitignore, and installs the agent skill. Files that already exist are kept. It never writes an API key.

OptionWhat it does
--provider <name>The Jev provider: typesafe, vercel, openrouter, cloudflare or auto. Without it, init asks.
-y, --yesAsks nothing and uses auto, which picks the first provider key found in the environment.
--no-skillDoesn't install the skill into .cursor/skills and .claude/skills.

When the input isn't a terminal, init asks nothing, as with --yes.

intelliwright install​

npx intelliwright install [browsers...] [options]

Downloads browsers for the version of Playwright that Intelliwright uses. With no browser named, it installs chromium. Name chromium, firefox, webkit or chromium-headless-shell to install those instead. Other options go to Playwright's installer, such as --with-deps to also install system libraries on Linux, or --force to reinstall.

intelliwright show-report​

npx intelliwright show-report [folder] [options]

Serves an HTML report over HTTP and opens it in your browser, until you press Ctrl+C. The folder defaults to intelliwright-report.

OptionDefaultWhat it does
--port <port>9323The port to serve on. When it's taken, a free port is used.
--host <host>localhostThe host to serve on.
--no-openDoesn't open the browser.

Environment variables​

VariableEffect
TYPESAFE_API_KEY, AI_GATEWAY_API_KEY, VERCEL_OIDC_TOKEN, OPENROUTER_API_KEY, CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_IDJev provider keys. See Providers.
CIWhen set, the HTML report never opens by itself.
NO_COLORTurns off colors in the terminal.
FORCE_COLORTurns colors on, even when the output isn't a terminal. 0 or false turns them off.