You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: create-playwright should ensure non-interactive setup for AI agents #39986
Allow specifying testDir non-interactively with create-playwright, for example via --test-dir=playwright.
This matters more now for AI agents running setup CLIs. If an agent is given explicit scaffold flags but still hits an interactive Where to put your end-to-end tests? prompt, the flow becomes brittle. Agents sometimes answer prompts incorrectly or fail to continue at all. A first-class --test-dir flag would let them use create-playwright as the source of truth instead of falling back to handwritten scaffolding.
Example
pnpm create playwright --test-dir=playwright
This would:
create and use the playwright test directory
skip the interactive Where to put your end-to-end tests? prompt
Motivation
Non-interactive scaffolding is increasingly important for AI agent workflows. When agents cannot complete official project generators deterministically, they often fall back to generating files from model knowledge instead. That tends to drift from current Playwright defaults and best practices.
Next.js recently made the same kind of change in create-next-app so explicit CLI flags can avoid interactive prompts and remain agent-friendly:
Adding --test-dir would move create-playwright in the same direction. It would also complement broader work around skipping prompts when options are provided, such as:
changed the title [-][Feature]: create-playwright --test-dir option for AI-agent-friendly non-interactive setup[/-][+][Feature]: create-playwright should ensure non-interactive setup for AI agents[/+]on Apr 2, 2026
Activity
[-][Feature]: create-playwright --test-dir option for AI-agent-friendly non-interactive setup[/-][+][Feature]: create-playwright should ensure non-interactive setup for AI agents[/+]Skn0tt commentedon Apr 2, 2026
Makes sense, I'll go through create-playwright and ensure it works non-interactively.
karlhorky commentedon Jun 26, 2026
This wasn't actually resolved by #39986 or microsoft/create-playwright#172
There may be an option over here: