[PR #7964] [MERGED] feat: auth cli #15902

Closed
opened 2026-04-13 10:17:59 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7964
Author: @jslno
Created: 2/13/2026
Status: Merged
Merged: 2/15/2026
Merged by: @himself65

Base: canaryHead: auth-cli


📝 Commits (10+)

  • 979cbd0 feat(cli): init command refactor (#7832)
  • 9788d2a refactor: move @better-auth/cli to auth
  • 18717ce chore: refactor login command
  • fcbe0a3 chore: cleanup
  • 86cbb9e feat: prompt for infra
  • abdcc4f chore: fix linting
  • 2615195 chore: lockfile only
  • 26c75df chore: bump fumadocs to fix postinstall
  • 9e894a5 Merge remote-tracking branch 'upstream/canary' into auth-cli
  • 919bf06 chore: replace remix with react-router

📊 Changes

90 files changed (+12505 additions, -2346 deletions)

View changed files

📝 .github/ISSUE_TEMPLATE/bug_report.yml (+1 -1)
📝 docs/app/v1/page.tsx (+1 -1)
📝 docs/content/blogs/0-supabase-auth-to-planetscale-migration.mdx (+2 -2)
📝 docs/content/blogs/1-4.mdx (+2 -2)
📝 docs/content/changelogs/1-2.mdx (+1 -1)
📝 docs/content/changelogs/1.0.mdx (+3 -3)
📝 docs/content/docs/adapters/drizzle.mdx (+2 -2)
📝 docs/content/docs/adapters/mssql.mdx (+2 -2)
📝 docs/content/docs/adapters/mysql.mdx (+2 -2)
📝 docs/content/docs/adapters/postgresql.mdx (+3 -3)
📝 docs/content/docs/adapters/prisma.mdx (+2 -2)
📝 docs/content/docs/adapters/sqlite.mdx (+2 -2)
📝 docs/content/docs/basic-usage.mdx (+2 -2)
📝 docs/content/docs/concepts/cli.mdx (+8 -8)
📝 docs/content/docs/concepts/database.mdx (+5 -5)
📝 docs/content/docs/concepts/rate-limit.mdx (+2 -2)
📝 docs/content/docs/guides/auth0-migration-guide.mdx (+2 -2)
📝 docs/content/docs/guides/clerk-migration-guide.mdx (+2 -2)
📝 docs/content/docs/guides/supabase-migration-guide.mdx (+2 -2)
📝 docs/content/docs/guides/workos-migration-guide.mdx (+2 -2)

...and 70 more files

📄 Description

Downstream #7832


Summary by cubic

Renamed the Better Auth CLI to “auth” and rebuilt the init flow with modular generators to scaffold server and client across frameworks/adapters, with smarter env/config discovery and installs. Updated docs and messages to the new CLI name; the init flow now supports presets for both React Router v7 and Remix.

  • New Features

    • Interactive init detects framework, database adapter, and package manager; scaffolds auth server/client, route handlers, and plugins.
    • Modular configs for databases, frameworks (includes React Router v7 and Remix), and social providers, with env prompts and automatic .env updates.
    • Generates auth and auth-client files with framework-specific imports and config path detection.
    • Improved package manager detection (env UA, lockfiles, monorepos) with correct install flags, including pnpm catalog.
    • Added utilities and tests for env handling, framework detection, imports grouping, plugin/auth config generation, package managers, and installer.
    • Updated warnings and adapter error messages to reference npx auth commands.
  • Migration

    • Use npx auth instead of npx @better-auth/cli for all commands (init, generate, migrate, secret, info, login, mcp). Scripts and docs updated.

Written for commit 80c72c7766. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/7964 **Author:** [@jslno](https://github.com/jslno) **Created:** 2/13/2026 **Status:** ✅ Merged **Merged:** 2/15/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `auth-cli` --- ### 📝 Commits (10+) - [`979cbd0`](https://github.com/better-auth/better-auth/commit/979cbd034bb54c82e917766a0fc26cfc78f0dc02) feat(cli): `init` command refactor (#7832) - [`9788d2a`](https://github.com/better-auth/better-auth/commit/9788d2aa1a446fceebd074b7beab65b28c95bc55) refactor: move `@better-auth/cli` to `auth` - [`18717ce`](https://github.com/better-auth/better-auth/commit/18717ce2ca4a7a132afc9bf43db772ad7cce4f04) chore: refactor login command - [`fcbe0a3`](https://github.com/better-auth/better-auth/commit/fcbe0a37f75efc5fef758a7f556d18c838f064ac) chore: cleanup - [`86cbb9e`](https://github.com/better-auth/better-auth/commit/86cbb9ec0697020ef18cb66a1e884fa1fe33b458) feat: prompt for infra - [`abdcc4f`](https://github.com/better-auth/better-auth/commit/abdcc4fe8df8099ad73c71c84456e32797703233) chore: fix linting - [`2615195`](https://github.com/better-auth/better-auth/commit/2615195c9b015aa59e9d4bc47f761da02e52b3fb) chore: lockfile only - [`26c75df`](https://github.com/better-auth/better-auth/commit/26c75df3a15f988376170f381793a44e681400b5) chore: bump fumadocs to fix postinstall - [`9e894a5`](https://github.com/better-auth/better-auth/commit/9e894a52ac2981d0c1603f4d3ed60a6fe43dd908) Merge remote-tracking branch 'upstream/canary' into auth-cli - [`919bf06`](https://github.com/better-auth/better-auth/commit/919bf066044cf4b2477a15a57d8d587b0e17f6ea) chore: replace remix with react-router ### 📊 Changes **90 files changed** (+12505 additions, -2346 deletions) <details> <summary>View changed files</summary> 📝 `.github/ISSUE_TEMPLATE/bug_report.yml` (+1 -1) 📝 `docs/app/v1/page.tsx` (+1 -1) 📝 `docs/content/blogs/0-supabase-auth-to-planetscale-migration.mdx` (+2 -2) 📝 `docs/content/blogs/1-4.mdx` (+2 -2) 📝 `docs/content/changelogs/1-2.mdx` (+1 -1) 📝 `docs/content/changelogs/1.0.mdx` (+3 -3) 📝 `docs/content/docs/adapters/drizzle.mdx` (+2 -2) 📝 `docs/content/docs/adapters/mssql.mdx` (+2 -2) 📝 `docs/content/docs/adapters/mysql.mdx` (+2 -2) 📝 `docs/content/docs/adapters/postgresql.mdx` (+3 -3) 📝 `docs/content/docs/adapters/prisma.mdx` (+2 -2) 📝 `docs/content/docs/adapters/sqlite.mdx` (+2 -2) 📝 `docs/content/docs/basic-usage.mdx` (+2 -2) 📝 `docs/content/docs/concepts/cli.mdx` (+8 -8) 📝 `docs/content/docs/concepts/database.mdx` (+5 -5) 📝 `docs/content/docs/concepts/rate-limit.mdx` (+2 -2) 📝 `docs/content/docs/guides/auth0-migration-guide.mdx` (+2 -2) 📝 `docs/content/docs/guides/clerk-migration-guide.mdx` (+2 -2) 📝 `docs/content/docs/guides/supabase-migration-guide.mdx` (+2 -2) 📝 `docs/content/docs/guides/workos-migration-guide.mdx` (+2 -2) _...and 70 more files_ </details> ### 📄 Description Downstream #7832 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Renamed the Better Auth CLI to “auth” and rebuilt the init flow with modular generators to scaffold server and client across frameworks/adapters, with smarter env/config discovery and installs. Updated docs and messages to the new CLI name; the init flow now supports presets for both React Router v7 and Remix. - **New Features** - Interactive init detects framework, database adapter, and package manager; scaffolds auth server/client, route handlers, and plugins. - Modular configs for databases, frameworks (includes React Router v7 and Remix), and social providers, with env prompts and automatic .env updates. - Generates auth and auth-client files with framework-specific imports and config path detection. - Improved package manager detection (env UA, lockfiles, monorepos) with correct install flags, including pnpm catalog. - Added utilities and tests for env handling, framework detection, imports grouping, plugin/auth config generation, package managers, and installer. - Updated warnings and adapter error messages to reference npx auth commands. - **Migration** - Use npx auth instead of npx @better-auth/cli for all commands (init, generate, migrate, secret, info, login, mcp). Scripts and docs updated. <sup>Written for commit 80c72c77665ac7fd0d4eaf13a4a56d68d9ef2b9d. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 10:17:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#15902