diff --git a/AGENTS.md b/AGENTS.md index 5b6be3a2a6..5dfcdc8548 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -31,6 +31,7 @@ This is the Better Auth repository - a comprehensive authentication framework fo - Use `import type` for type-only imports - Use `node:` protocol for Node.js built-ins (e.g. `node:crypto`) - JSDoc comments for public APIs +- The Better Auth CLI package was renamed from `@better-auth/cli` to `auth`. Use `npx auth@latest` in docs and user-facing messages, while preserving historical references in changelogs and explanations of the rename. - Plugins should be as independent as possible. When working on a plugin, prefer modifying the plugin over changing core. ### URL Composition diff --git a/docs/content/docs/guides/1-7-upgrade-guide.mdx b/docs/content/docs/guides/1-7-upgrade-guide.mdx index 81205fc3a3..a494d8572c 100644 --- a/docs/content/docs/guides/1-7-upgrade-guide.mdx +++ b/docs/content/docs/guides/1-7-upgrade-guide.mdx @@ -137,7 +137,7 @@ Better Auth 1.7.0 through 1.7.2 added a required `issuer` column to the `account Regenerate instead of writing SQL. The generated `account` model drops both the field and the compound unique index, and your own tooling produces the migration. ```bash - npx @better-auth/cli@latest generate + npx auth@latest generate ``` diff --git a/packages/better-auth/src/plugins/jwt/multi-alg.test.ts b/packages/better-auth/src/plugins/jwt/multi-alg.test.ts index 67edf63e9b..8d7f2b3a56 100644 --- a/packages/better-auth/src/plugins/jwt/multi-alg.test.ts +++ b/packages/better-auth/src/plugins/jwt/multi-alg.test.ts @@ -435,7 +435,7 @@ describe("pinned-kid + signingAlgorithm against legacy null-alg rows", () => { /* ----------------------------------------------------------------------- * jwks schema persistence (alg, crv) — tripwire for downstream consumers - * that skipped `npx @better-auth/cli generate` after the schema bump. + * that skipped `npx auth generate` after the schema bump. * --------------------------------------------------------------------- */ describe("jwks.alg / jwks.crv persistence after createJwk", () => { diff --git a/packages/drizzle-adapter/src/relations-v2/index.ts b/packages/drizzle-adapter/src/relations-v2/index.ts index bdbdf7b91f..4f2bde6a26 100644 --- a/packages/drizzle-adapter/src/relations-v2/index.ts +++ b/packages/drizzle-adapter/src/relations-v2/index.ts @@ -687,7 +687,7 @@ export const drizzleAdapter = (db: DB, config: DrizzleAdapterConfig) => { for (const key in values) { if (!schema[key]) { throw new BetterAuthError( - `The field "${key}" does not exist in the "${model}" Drizzle schema. Please update your drizzle schema or re-generate using "npx @better-auth/cli@latest generate".`, + `The field "${key}" does not exist in the "${model}" Drizzle schema. Please update your drizzle schema or re-generate using "npx auth@latest generate".`, ); } } @@ -709,7 +709,7 @@ export const drizzleAdapter = (db: DB, config: DrizzleAdapterConfig) => { const queryModel = getQueryModel(model); if (!db.query || !queryModel) { logger.error( - `[# Drizzle Adapter]: The model "${model}" was not found in the query object. Please update your Drizzle schema to include relations or re-generate using "npx @better-auth/cli@latest generate".`, + `[# Drizzle Adapter]: The model "${model}" was not found in the query object. Please update your Drizzle schema to include relations or re-generate using "npx auth@latest generate".`, ); logger.info("Falling back to regular query"); } else { @@ -797,7 +797,7 @@ export const drizzleAdapter = (db: DB, config: DrizzleAdapterConfig) => { const queryModel = getQueryModel(model); if (!db.query || !queryModel) { logger.error( - `[# Drizzle Adapter]: The model "${model}" was not found in the query object. Please update your Drizzle schema to include relations or re-generate using "npx @better-auth/cli@latest generate".`, + `[# Drizzle Adapter]: The model "${model}" was not found in the query object. Please update your Drizzle schema to include relations or re-generate using "npx auth@latest generate".`, ); logger.info("Falling back to regular query"); } else {