Skip to content

millionco/expect

Repository files navigation

Expect

version downloads

Expect tests your app in a browser so you don't have to.

  • Run /expect inside 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.

Install

Open a terminal in your project directory and run:

npx expect-cli@latest init

This will guide you through a setup process. Once installed, you can run /expect inside Claude Code or Codex to start testing.

FAQ

1. How is this different from Puppeteer / Playwright / Cypress?

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.

2. How is this different from coding agents or computer-use tools?

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.

3. How does it fit into my workflow?

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.

5. Does it work in CI?

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.

6. Can this do mobile / desktop testing?

Coming soon.

7. Is there a cloud or enterprise version?

Coming soon. Email aiden@million.dev if you have questions or ideas.

Options

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 -

Supported Agents

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

Resources & Contributing Back

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

License

FSL-1.1-MIT © Million Software, Inc.

About

Expect tests your app in a browser so you don't have to.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors

Languages