Skip to main content

Prerequisites

  • Node 20+ and npm
  • Playwright available in the project (npx playwright install if you’re starting fresh)
  • Stably account: Signup at app.stably.ai or grab an API key from Settings → API Keys

Installation

Install the Stably CLI globally:
npm install -g stably
Verify the installation:
stably --version
You can also use npx stably without global installation if you prefer. The commands below will work with both approaches. To see all available commands, run stably --help.

Step-by-step

1

Initialize your project

stably init
Set up Playwright and the Stably SDK in your project. If you’re not logged in, authentication will be handled automatically via browser. The AI agent will install dependencies, configure playwright.config.ts, and set up the Stably reporter.
2

Create tests with AI

stably create [prompt]
Create tests from a prompt, or omit the prompt to automatically analyze:
  • PR changes — when running in CI with PR context
  • Git diffs — changes against origin/HEAD when running locally
3

Run tests locally

stably test
Stably executes your test suite and provides detailed results with run IDs for any failures.
4

Fix failing tests

stably fix [runId]
Diagnose failures and apply AI fixes automatically. Use the run ID from failed test executions.

What you get

  • Playwright and Stably SDK configured in your project
  • Playwright tests created with AI assistance, ready for version control
  • Automated fixes for test failures, locally or in the cloud

Next steps

CLI guide

Explore commands, agent workflows, and maintenance tools