noflake write

Scan your codebase, database schema, routes, and auth patterns. Generate a full Playwright E2E test suite powered by AI.

โœ… Available โ€” Requires Starter tier or above

Usage

npx noflake write [options]

Options

FlagDescriptionDefault
-c, --config <path>Path to noflake config file.noflakerc.json
--dry-runPreview the test plan without generating filesfalse
--max-retries <n>Max self-heal retries per test3
--visualEnable visual regression screenshots (Pro tier)false
--apiGenerate API endpoint tests (Pro tier)false
--perfAdd performance budget assertions (Pro tier)false

How it works

  1. Scan โ€” Detects your framework (Next.js, React, Vue, Svelte, Express), reads your database schema (Prisma, Drizzle, raw SQL), identifies auth patterns (NextAuth, Clerk, Supabase Auth, Lucia, Firebase), and maps all routes
  2. Plan โ€” Sends a condensed context to Claude and generates a test plan covering user flows, auth routes, CRUD operations, and edge cases
  3. Generate โ€” Creates Playwright test files in your testDir
  4. Verify โ€” Runs every generated test. If a test fails because the test itself is wrong, NoFlake sends the error back to Claude and retries (self-healing loop, up to maxRetries attempts)
  5. Save state โ€” Writes the test manifest, coverage map, and run history to .noflake/

Example (preview)

$ npx noflake write

๐Ÿ”ฅ NoFlake โ€” Write Tests

๐Ÿ” Scanning codebase...
โœ… Detected next project with 14 routes
  ๐Ÿ“Š Schema: prisma with 8 tables
  ๐Ÿ” Auth: next-auth

๐Ÿงช Generating tests...
  โœ… user-signup-flow
  โœ… user-login-flow
  โœ… dashboard-crud-operations
  โœ… settings-profile-update
  โœ… api-auth-guard
  โŒ billing-checkout โ†’ self-healing (attempt 1/3)
  โœ… billing-checkout โ†’ healed โœ“

  6 passed, 0 failed, 6 total
  State saved to .noflake/
Requires: An ANTHROPIC_API_KEY environment variable with a valid Anthropic API key, plus a Starter ($9/mo) tier or above. Visual, API, and performance flags require Pro ($39/mo) tier.
๐Ÿ”’ Safe by design: The write command reads your source code to understand your app, but only writes to tests/e2e/ and .noflake/. Your application source code is never modified.