Discovery-first Bun + Playwright CLI template for web apps that require interactive browser login and 2FA.
packages/any-web-app-api-client: session persistence, login capture, endpoint discovery, generic authenticated fetch clientpackages/any-web-app-cli: Commander-based CLI withlogin,discover,fetch, andschemaTEMPLATE_INSTRUCTIONS.md: rename checklist, auth bootstrap workflow, and endpoint promotion guide
- Replace the placeholder name
any-web-appeverywhere it should become your product/app name. - Update the URLs in
packages/any-web-app-api-client/src/constants.ts. - Run
bun install. - Run
bun run any-web-app-cli login. - Run
bun run any-web-app-cli discover. - Promote useful discovered endpoints into typed client methods and first-class CLI commands.
bun run any-web-app-cli login
bun run any-web-app-cli discover
bun run any-web-app-cli fetch /api/example --output json
bun run any-web-app-cli schema- The template is intentionally generic. It does not guess your domain-specific commands.
- The login auto-save heuristics are conservative; adjust
packages/any-web-app-api-client/src/login.tsfor the target app if needed. - If the target app stores auth in
indexedDBor service workers instead of cookies/storage, extend the session/bootstrap helpers before building typed commands.