npx @better-auth/cli generate should read the path of prisma schema from package.json by default #780

Closed
opened 2026-03-13 08:03:58 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @davidaragundy on GitHub (Mar 4, 2025).

Is this suited for github?

  • Yes, this is suited for github

I have my prisma schema in a custom location, and prisma lets you add a prop to the package.json for that purpose:

  "prisma": {
    "schema": "src/shared/lib/prisma/schema.prisma",
  },

The command npx @better-auth/cli generate generates the prisma schema in /prisma/schema.prisma by default

Describe the solution you'd like

The command npx @better-auth/cli generate should read the prisma.schema prop from the package.json by default, and if it is not set then use /prisma/schema.prisma

Describe alternatives you've considered

Using the --output flag:

npx @better-auth/cli generate --output ./src/shared/lib/prisma/schema.prisma

Additional context

No response

Originally created by @davidaragundy on GitHub (Mar 4, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. I have my prisma schema in a custom location, and prisma lets you add a prop to the `package.json` for that purpose: ```json filename="package.json" "prisma": { "schema": "src/shared/lib/prisma/schema.prisma", }, ``` The command `npx @better-auth/cli generate` generates the prisma schema in `/prisma/schema.prisma` by default ### Describe the solution you'd like The command `npx @better-auth/cli generate` should read the `prisma.schema` prop from the `package.json` by default, and if it is not set then use `/prisma/schema.prisma` ### Describe alternatives you've considered Using the `--output` flag: ```bash npx @better-auth/cli generate --output ./src/shared/lib/prisma/schema.prisma ``` ### Additional context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#780