Back to Prisma1

`prisma init`

docs/1.5/04-Reference/07-CLI-Command-Reference/01-Database-Service/01-prisma-init.md

1.34.121.8 KB
Original Source

prisma init

Creates the local file structure for a new Prisma database service. If no --boilerplate option is provided, the command will trigger an interactive prompt allowing you to choose a preconfigured template for your service. There are two major options for such a template:

  • Minimal setup: database-only: Provides with you with a plain Prisma database service
  • GraphQL server/fullstack boilerplate: Bootstraps the foundation for a fully-fledged GraphQL app (backend-only or fullstack) based on GraphQL boilerplates

In any case, the bootstrapped Prisma service will at minimum contain these files:

If you provide a directory name as an argument to the command, the generated files will be placed inside a new directory with that name.

Usage

sh
prisma init DIRNAME [flags]

Flags

 -b, --boilerplate BOILERPLATE    Full URL or repo shorthand (e.g. `owner/repo`) to boilerplate GitHub repository

Examples

Create file structure for Prisma database service in current directory.
sh
prisma init
Create file structure for Prisma database service in directory called database.
sh
prisma init database
Bootstrap file for GraphQL server based on node-basic boilerplate in directory called node-app.
sh
prisma init node-app --boilerplate node-basic