#Run `prisma dev` programmatically

5 messages · Page 1 of 1 (latest)

terse heron
#

Is there a programmatic function to have run prisma dev (local postgres db) programmatically? Thanks.

jovial loomBOT
#

You selected the bot's instantaneous insights. Let me compile your answer right away!

terse heron
#

Run prisma dev programmatically

jovial loomBOT
# jovial loom You selected the bot's instantaneous insights. Let me compile your answer right ...

Short answer: No official programmatic API is documented to start prisma dev (the local Prisma Postgres server) from code.

What is available:

  • You can start it via the CLI: npx prisma dev. This launches a local Prisma Postgres instance you can connect to, and you can control ports/names via flags (e.g., --name, --port) (Prisma CLI dev; Local development guide).
  • You can stop or remove local instances via CLI subcommands: prisma dev stop and prisma dev rm (Prisma CLI dev).

Related context:

If you need to automate prisma dev today, invoke the CLI from your code (e.g., child_process/execa) and manage lifecycle with the available flags. The docs don’t provide an official Node API for this.

jovial loomBOT