The "init" command does the following things for you:
- Install Prisma if it's not already installed.
- Install the
zenstack
CLI package as a dev dependency. - Install the
@zenstackhq/runtime
package - used for enhancingPrismaClient
at the runtime. - Copy the
prisma/schema.prisma
file toschema.zmodel
if it exists; otherwise, create a new templateschema.zmodel
file.
You can always manually complete the steps above if you have a special project setup that the "init" command doesn't work with.
After the initialization, please remember that you should edit the schema.zmodel
moving forward. The prisma/schema.prisma
file will be automatically regenerated when you run zenstack generate
.