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.
If you’re using an AI coding agent (e.g., Claude Code, Cursor), install the Stably CLI skill for the best experience:
npx skills add https://github.com/stablyai/agent-skills --skill stably-cli

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
Diagnose failures and apply AI fixes automatically. The run ID is auto-detected from your last stably test run.

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