Expect tests your app in a browser so you don't have to.
- Run
/expectinside Claude Code, Codex, and more - Spawns agents to simulating real logged-in users to find issues and regressions.
- No more writing Playwright by hand or token-hungry computer use tools.
- Get video recordings and GitHub Actions out of the box.
Open a terminal in your project directory and run:
npx expect-cli@latest initThis will guide you through a setup process. Once installed, you can run /expect inside Claude Code or Codex to start testing.
Instead of writing scripts, maintaining selectors, and wiring up assertions, Expect reads your code changes and tests them in a real browser automatically. It's like having giving your agent QA superpowers.
Your agent needs to verify its work, and general-purpose browser tools rely on screenshots and mouse coordinates.
Expect is purpose-built for testing: it uses Playwright for fast DOM automation, reads your code changes, generates a test plan, and runs it with your real cookies, then reports back what's broken so the agent can fix it.
Your coding agent calls /expect as a skill whenever it needs to validate its work in a real browser. You can also trigger it from CI by adding the GitHub Action to test every PR automatically before merge.
Yes. Use --ci or the add github-action command to set up a workflow that tests every PR. In CI mode it runs headless, skips cookie extraction, auto-approves the plan, and enforces a 30-minute timeout.
Coming soon.
Coming soon. Email aiden@million.dev if you have questions or ideas.
| Flag | Description | Default |
|---|---|---|
-m, --message <instruction> |
Natural language instruction for what to test | - |
-f, --flow <slug> |
Reuse a saved flow by its slug | - |
-y, --yes |
Run immediately without confirmation | - |
-a, --agent <provider> |
Agent provider (claude, codex, copilot, gemini, cursor, opencode, droid) |
auto-detect |
-t, --target <target> |
What to test: unstaged, branch, or changes |
changes |
-u, --url <urls...> |
Base URL(s) for the dev server (skips port picker) | - |
--headed |
Show a visible browser window during tests | - |
--no-cookies |
Skip system browser cookie extraction | - |
--ci |
Force CI mode: headless, no cookies, auto-yes, 30-min timeout | - |
--timeout <ms> |
Execution timeout in milliseconds | - |
--output <format> |
Output format: text or json |
text |
--verbose |
Enable verbose logging | - |
--replay-host <url> |
Website host for live replay viewer | https://expect.dev |
-v, --version |
Print version | - |
-h, --help |
Display help | - |
Expect works with the following coding agents. It auto-detects which agents are installed on your PATH. If multiple are available, it defaults to the first one found. Use -a <provider> to pick a specific agent.
| Agent | Flag | Install |
|---|---|---|
| Claude Code | -a claude |
npm install -g @anthropic-ai/claude-code |
| Codex | -a codex |
npm install -g @openai/codex |
| GitHub Copilot | -a copilot |
npm install -g @github/copilot |
| Gemini CLI | -a gemini |
npm install -g @google/gemini-cli |
| Cursor | -a cursor |
cursor.com |
| OpenCode | -a opencode |
npm install -g opencode-ai |
| Factory Droid | -a droid |
npm install -g droid |
Want to try it out? Check out our demo.
Find a bug? Head over to our issue tracker and we'll do our best to help. We love pull requests, too!
We expect all contributors to abide by the terms of our Code of Conduct.
→ Start contributing on GitHub
FSL-1.1-MIT © Million Software, Inc.