Thanks for helping improve the Prisma CLI.
This repository uses document-driven development. Product behavior belongs in
docs/product first, and implementation should follow those docs. If behavior
is unclear, update the relevant product doc before changing the command surface.
Requirements:
- Node.js 22.12 or newer
- pnpm 10
Install dependencies:
pnpm installRun tests:
pnpm testBuild the CLI package:
pnpm build:cliRun the local source CLI:
pnpm prisma --helpThe public docs index lives at docs/README.md.
The architecture entrypoint lives at ARCHITECTURE.md.
Read these before changing CLI behavior:
docs/product/resource-model.mddocs/product/command-principles.mddocs/product/command-spec.mddocs/product/cli-style-guide.mddocs/product/output-conventions.mddocs/product/error-conventions.md
The CLI must preserve the unified command model:
- Group commands by developer workflow, not product ownership.
- Do not add
orm,postgres, orcomputenamespaces. - Keep the canonical command shape as
prisma <group> <action>. - Keep stdout for machine-readable data and stderr for human-oriented status.
Official beta releases use @prisma/cli and expose the prisma-cli binary.
The latest dist-tag points at the latest manually published beta.
The dev dist-tag points at the latest successful main build, published as
3.0.0-dev.<run_number>.<run_attempt>. Commit traceability comes from npm
provenance and the GitHub Actions run. Trusted same-repo pull requests receive
pkg.pr.new preview comments for testing exact unmerged commits. Fork pull
requests do not publish preview packages automatically. Preview publishing is
best-effort and requires the pkg.pr.new GitHub App to be installed for this
repository. Once that app is installed, set the repository variable
CLI_PR_PREVIEW_REQUIRED=true to make preview publishing failures block CI.
Do not publish from a local checkout unless the release owner has explicitly
asked you to do so. Release publishing is intended to happen through the
configured Publish CLI GitHub Actions workflow.
The initial public contribution posture is issues first. Issues and feedback are welcome. Pull requests should be tied to an existing issue or explicit maintainer agreement before significant implementation work starts.
Before opening a pull request:
- Keep docs, help text, output, and tests aligned.
- Add focused tests for user-visible behavior changes.
- Run
pnpm test. - Run
pnpm build:cliwhen touching package or build configuration.
Avoid adding undocumented aliases, shortcuts, or hidden behavior. The CLI should have one clear happy path and stable structured output for automation.
Please follow CODE_OF_CONDUCT.md in project spaces. Report security-sensitive
issues through SECURITY.md, not public GitHub issues.