| name | prepare-app |
| description | Starts development server for E2E testing. Detects package manager and verifies server startup. Triggers on keywords: prepare app, start server, dev server, start app |
| project-agnostic | true |
| allowed-tools | ["Bash","Read"] |
Prepare App Command
Start the development server for E2E testing.
Pre-Flight Checks
-
Check for package.json
- If missing: STOP with "No package.json found"
-
Check node_modules
- If missing: Run package manager install first (npm/pnpm/yarn install)
Execution
-
Start Development Server
- Run in background:
${DEV_SERVER_CMD:-pnpm dev}
- Wait 5 seconds for server startup
-
Verify Server Running
- Check if port ${DEFAULT_PORT:-5173} is responding
- If not responding after 10s: Report error
-
Report Status
- Confirm server is running
- Display URL:
http://localhost:${DEFAULT_PORT:-5173}/
Notes
- Server runs in background
- Use Ctrl+C in terminal to stop server
- Default port: 5173 (Vite default)
- Override with DEFAULT_PORT environment variable
- Override dev command with DEV_SERVER_CMD environment variable (e.g., "npm run dev")