Skip to main content

Commands

init

npx checksumai init
Initializes Checksum in your project. This creates the checksum/ folder containing:
  • checksum.config.ts — project configuration (base URL, browser settings, etc.)
  • playwright.config.ts — Playwright configuration pre-wired for Checksum
  • tsconfig.json — TypeScript configuration for the test directory
  • Login helper — a reusable authentication setup
  • Example test — a starter test file to verify everything works
Prerequisites: Install the runtime package first:
npm install @checksum-ai/runtime

test

npx checksumai test
Runs your Checksum tests locally using Playwright. Flags
FlagDescription
-g "pattern"Run only tests whose name matches the given pattern
Examples
# Run all tests
npx checksumai test

# Run tests matching "login"
npx checksumai test -g "login"

dotenv

npx checksumai dotenv --download --api-key=<KEY>
Downloads environment variables from Checksum cloud and saves them to a local .env file. This is useful for syncing secrets and configuration that your tests depend on without committing them to source control. Flags
FlagDescription
--downloadDownload the environment variables
--api-key=<KEY>Your Checksum API key

tsconfig

npx checksumai tsconfig
Adds or updates the tsconfig.json file inside the checksum/ directory. Run this if you need to reset or refresh the TypeScript configuration after an upgrade.

eslint

npx checksumai eslint
Adds an ESLint configuration to the checksum/ directory. When run, it will optionally install the required devDependencies:
  • eslint
  • typescript
  • typescript-eslint

show-report

npx checksumai show-report
Opens the HTML test report from your most recent local test run in your default browser.

postinstall

npx checksumai postinstall
Runs post-installation setup. This is typically called automatically after npm install and does not need to be run manually in most cases.

Configuration

The checksum.config.ts file in your checksum/ directory controls project-level settings such as the base URL, browser options, authentication flows, and more. For the full configuration reference, see Repo & CLI Setup.