ZenStack CLI Reference
Usageβ
zenstack [options] [command]
ΞΆ ZenStack is a Prisma power pack for building full-stack apps.
Documentation: https://zenstack.dev.
Options:
-v --version display CLI version
-h, --help display help for command
Commands:
info [path] Get information of installed ZenStack and related packages.
init [options] [path] Initialize an existing project for ZenStack.
generate [options] Generates RESTful API and Typescript client for your data model.
help [command] display help for command
Sub Commandsβ
initβ
Initializes an existing project to use ZenStack.
zenstack init [options] [path]
Argumentsβ
Name | Description | Default |
---|---|---|
path | Project path | current folder |
Optionsβ
Name | Description | Default |
---|---|---|
--prisma | location of Prisma schema file to bootstrap from | <project path>/prisma/schema.prisma |
-p, --package-manager | package manager to use: "npm", "yarn", or "pnpm" | auto detect |
--no-version-check | do not check for new versions of ZenStack | false |
Examplesβ
Initialize current folder with default settings.
npx zenstack init
Initialize "myapp" folder with custom package manager and schema location.
npx zenstack init -p pnpm --prisma prisma/my.schema myapp
generateβ
Generates Prisma schema and other artifacts as specified by "plugin"s in ZModel.
zenstack generate [options]
Argumentsβ
Name | Description | Default |
---|---|---|
path | Project path | current folder |
Optionsβ
Name | Description | Default |
---|---|---|
--schema | schema file (with extension .zmodel) | ./schema.zmodel |
-p, --package-manager | package manager to use: "npm", "yarn", or "pnpm" | auto detect |
-o, --output <path> | default output directory for TS/JS files generated by built-in plugins | node_modules/.zenstack |
--no-default-plugins | do not automatically run built-in plugins | false |
--no-compile | do not compile the output of built-in plugins | false |
--no-version-check | do not check for new versions of ZenStack | false |
Examplesβ
Generate with default settings.
npx zenstack generate
Generate with custom package manager and schema location.
npx zenstack generate -p pnpm --schema src/my.zmodel
infoβ
Get information of installed ZenStack and related packages.
zenstack info [options] [path]
Argumentsβ
Name | Description | Default |
---|---|---|
path | Project path | current folder |