zenstack/packages/cli
sanny-io 76febc90d4
Some checks failed
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
fix: invalid prisma schema with format args (#2677)
2026-05-22 08:33:41 -07:00
..
bin chore: migrate from tsup to tsdown (#2580) 2026-04-15 12:13:34 -07:00
scripts chore: migrate from tsup to tsdown (#2580) 2026-04-15 12:13:34 -07:00
src fix(cli): add missing opposite relation fields during db pull when multiple FKs target the same model (#2652) 2026-05-13 09:52:15 -07:00
test fix: invalid prisma schema with format args (#2677) 2026-05-22 08:33:41 -07:00
eslint.config.js chore: upgrade eslint (#36) 2025-06-21 23:26:56 +08:00
package.json [CI] Bump version 3.7.1 (#2678) 2026-05-22 08:31:58 -07:00
README.md docs: add README.md to all public packages 2026-03-22 21:51:13 -07:00
tsconfig.json feat: cli plugin support (#181) 2025-08-17 16:35:07 +08:00
tsdown.config.ts chore: upgrade to TypeScript 6 (#2629) 2026-04-29 20:41:27 -07:00
vitest.config.ts chore: unify vitest config and minor fixes in CLI (#133) 2025-08-04 16:43:02 +08:00

@zenstackhq/cli

The command-line interface for ZenStack. Provides commands for initializing projects, generating TypeScript code from ZModel schemas, managing database migrations, and etc.

Key Commands

  • zenstack init — Initialize ZenStack in an existing project
  • zenstack generate — Compile ZModel schema to TypeScript
  • zenstack db push — Sync schema to the database
  • zenstack db pull — Pull database schema changes into ZModel
  • zenstack migrate dev — Create and apply database migrations
  • zenstack migrate deploy — Deploy migrations to production
  • zenstack format — Format ZModel schema files
  • zenstack proxy|studio — Start a database proxy server for using studio

Installation

npm install -D @zenstackhq/cli

Learn More