fix(cli): add Better-Auth + Convex setup instructions#831
Conversation
|
@Noisemaker111 is attempting to deploy a commit to the Better T Stack Team on Vercel. A member of the Team first needs to authorize it. |
|
Caution Review failedThe pull request is closed. WalkthroughAdds an internal helper to generate Better Auth + Convex post-install instructions (including BETTER_AUTH_SECRET and conditional SITE_URL), injects its output into the post-install display when applicable, and reorders two internal warnings. Public API signatures remain unchanged. Changes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Users were running from project root which fails because the convex CLI is only available in packages/backend. This adds clear instructions to the post-installation output showing how to set BETTER_AUTH_SECRET and SITE_URL from the correct directory. Closes #XXXX
5d98b9a to
ae542e3
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| `${pc.white(` ${cmd} convex env set BETTER_AUTH_SECRET=$(openssl rand -base64 32)`)}\n` + | ||
| (hasWeb ? `${pc.white(` ${cmd} convex env set SITE_URL http://localhost:${webPort}`)}\n` : "") | ||
| ); | ||
| } |
There was a problem hiding this comment.
Wrong package runner command for pnpm and bun
Medium Severity
The getBetterAuthConvexInstructions function generates incorrect commands for pnpm and bun package managers. The pattern packageManager === "npm" ? "npx" : packageManager produces pnpm convex env set and bun convex env set, but pnpm requires pnpm dlx or pnpm exec to run binaries, and bun requires bunx. The codebase already has getPackageExecutionCommand in package-runner.ts that handles this correctly. This defeats the PR's purpose since pnpm/bun users will still encounter errors when following the setup instructions.
Closes #828
Users running
npx convex env setfrom project root got'convex' is not founderror because the Convex CLI is only available inpackages/backend. This adds clear instructions in the post-installation output showing how to setBETTER_AUTH_SECRETandSITE_URLfrom the correct directory.Changes
getBetterAuthConvexInstructions()function inpost-installation.tscd packages/backendnpx convex env set BETTER_AUTH_SECRET=$(openssl rand -base64 32)npx convex env set SITE_URL http://localhost:3001Before
Users had no guidance on where to run convex commands from.
After
Post-installation output now clearly shows:
Summary by CodeRabbit
Note
Adds post-install guidance for Better Auth + Convex setups and integrates it into the CLI output.
getBetterAuthConvexInstructions()generates env setup steps (cd packages/backend,convex env set BETTER_AUTH_SECRET, conditionalSITE_URLusing detectedwebPortand package manager)better-auth; included in final post-install message before warningswebPort; preserve existing warnings and other instructionsWritten by Cursor Bugbot for commit 2e8d385. This will update automatically on new commits. Configure here.