Configuration

NoFlake is configured via a .noflakerc.json file in your project root. Created automatically by noflake init.

Full config reference

{
  "baseUrl": "http://localhost:3000",
  "testDir": "tests/e2e",
  "maxRetries": 3,
  "model": "claude-sonnet-4-20250514",
  "auth": {
    "strategy": "auto",
    "loginUrl": "/login",
    "testUser": {
      "email": "test@example.com",
      "password": "testpassword"
    }
  },
  "ignore": ["**/admin/**", "**/internal/**"]
}

Options

KeyTypeDefaultDescription
baseUrlstringhttp://localhost:3000The URL where your dev server runs. Used by Playwright for navigation.
testDirstringtests/e2eDirectory where generated test files are written.
maxRetriesnumber3Max self-healing attempts per test during generation.
modelstringclaude-sonnet-4-20250514The Anthropic model used for test generation.
auth.strategystringautoAuth detection strategy. auto detects your auth provider automatically.
auth.loginUrlstring/loginPath to your login page for auth flow tests.
auth.testUserobjectCredentials for a test user. Used during E2E auth flows.
ignorestring[][]Glob patterns for routes/files to exclude from test generation.

Auth strategies

When set to auto, NoFlake scans your dependencies to detect:

  • NextAuth / Auth.js — Detected via next-auth package
  • Clerk — Detected via @clerk/nextjs
  • Supabase Auth — Detected via @supabase/supabase-js
  • Lucia — Detected via lucia package
  • Firebase — Detected via firebase package
Security tip:Don't commit real credentials in your config. Use environment variables or a separate .env.test file for test user credentials, and add .noflakerc.json to your .gitignore if it contains sensitive data.