Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,10 @@ The architecture entrypoint lives at `ARCHITECTURE.md`.

Read these before changing CLI behavior:

1. `docs/product/resource-model.md`
2. `docs/product/command-principles.md`
3. `docs/product/command-spec.md`
4. `docs/product/cli-style-guide.md`
5. `docs/product/output-conventions.md`
6. `docs/product/error-conventions.md`
1. `docs/product/command-principles.md`
2. `docs/product/cli-style-guide.md`
3. `docs/product/output-conventions.md`
4. `docs/product/error-conventions.md`

The CLI must preserve the unified command model:

Expand Down
54 changes: 20 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,33 @@

Beta of the unified Prisma CLI.

This repository contains the unified Prisma command-line experience. The current
implementation focuses on app deployment workflows while preserving the
long-term command model for Prisma projects, branches, schemas, databases, and
apps.
This repository contains the unified Prisma command-line experience: one
binary for the ORM, Composer, and the Prisma Developer Platform — projects,
branches, services, deployments, environment variables, and the Prisma ORM
schema and migration workflow.

Official beta releases use the primary `@prisma/cli` package line. The package
exposes a `prisma-cli` binary so it can coexist with the existing `prisma`
executable.
The 8.0.0 release candidates publish as `prisma` (binary `prisma`) and
`@prisma/cli` (binary `prisma-cli`) on the `next` dist-tag.

## Install

```bash
pnpm add -D @prisma/cli
pnpm add -D @prisma/cli@next
pnpm prisma-cli --help
```

Example workflow:

```bash
pnpm prisma-cli auth login
pnpm prisma-cli app deploy --env DATABASE_URL=postgresql://example
pnpm prisma-cli project create my-app
pnpm prisma-cli git connect git@github.com:owner/repo.git
pnpm prisma-cli project env add --file .env --role preview
pnpm prisma-cli project env list --role preview
```

If you want local project scripts that look like the future command shape, add:

```json
{
"scripts": {
"prisma": "prisma-cli"
}
}
```

Then run:

```bash
pnpm prisma app deploy
```
Deployments start from pushing the connected repository, the Console, or
`prisma-cli composer deploy` — there is no standalone deploy command.

## Local Development

Expand Down Expand Up @@ -98,10 +85,11 @@ The canonical command shape is:
prisma <group> <action>
```

The beta package includes app build, run, deploy, environment-variable,
deployment inspection, promotion, rollback, and removal commands. The product
model intentionally keeps room for future schema, database, and migration
workflows without introducing product-specific namespaces.
The package includes project, environment-variable, service and deployment
inspection, promotion, rollback, and removal commands, plus the Prisma ORM
(`contract`, `db`, `migrate`, `migration`, `orm init`) and Composer
workflows, and the `postgres` and `bucket` resource groups. The product
model intentionally avoids product-specific namespaces.
Comment thread
coderabbitai[bot] marked this conversation as resolved.

## Documentation

Expand All @@ -111,12 +99,10 @@ Product behavior is defined in `docs/product`.

Start here when changing command behavior:

1. `docs/product/resource-model.md`
2. `docs/product/command-principles.md`
3. `docs/product/command-spec.md`
4. `docs/product/cli-style-guide.md`
5. `docs/product/output-conventions.md`
6. `docs/product/error-conventions.md`
1. `docs/product/command-principles.md`
2. `docs/product/cli-style-guide.md`
3. `docs/product/output-conventions.md`
4. `docs/product/error-conventions.md`

See `CONTRIBUTING.md` for local development and contribution guidance.
See `ARCHITECTURE.md` for the short architecture entrypoint.
Expand Down
10 changes: 4 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ without inventing behavior outside the product model.

Read these in order before changing command behavior:

1. [Resource model](product/resource-model.md)
2. [Command principles](product/command-principles.md)
3. [Command spec](product/command-spec.md)
4. [CLI style guide](product/cli-style-guide.md)
5. [Output conventions](product/output-conventions.md)
6. [Error conventions](product/error-conventions.md)
1. [Command principles](product/command-principles.md)
2. [CLI style guide](product/cli-style-guide.md)
3. [Output conventions](product/output-conventions.md)
4. [Error conventions](product/error-conventions.md)

For local development, continue with:

Expand Down
6 changes: 3 additions & 3 deletions docs/architecture/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ implementation.

Local state boundaries are also explicit:

- `prisma.config.ts` stores the linked project id.
- `.prisma/local.json` stores the linked project ID (a gitignored local pin, not a committed config file).
- Active branch and app selection are local CLI state.
- Secret values must not be printed in human output or structured output.

Expand All @@ -65,5 +65,5 @@ The beta package should remain small and predictable:
- `production` is a protected durable branch and requires explicit intent.
- Every other named branch is preview by default.

See [resource model](../product/resource-model.md) and
[command spec](../product/command-spec.md) for the authoritative rules.
The mounted command tree in `packages/cli/src/cli.ts` is the
authoritative command surface.
12 changes: 4 additions & 8 deletions docs/onboarding/common-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ Use this playbook when making common changes to the CLI.
## Add Or Change A Command

1. Update the source-of-truth product docs first:
- [command spec](../product/command-spec.md)
- [command principles](../product/command-principles.md)
- [resource model](../product/resource-model.md), when resources or resolution rules change
2. Add or update the command in `packages/cli/src/commands/<group>/` and mount it in
`packages/cli/src/cli.ts`.
`packages/cli/src/cli.ts` (the mounted tree is the authoritative command surface).
3. Put product rules and resource resolution in the operation layer
(`packages/cli/src/controllers`, `packages/cli/src/lib`).
4. Update the handler's presentation blocks when output shape changes.
Expand All @@ -33,11 +31,9 @@ Use this playbook when making common changes to the CLI.

## Change Resource Resolution

1. Update [resource model](../product/resource-model.md).
2. Update [command spec](../product/command-spec.md).
3. Keep `local` local-only.
4. Keep `production` protected and durable.
5. Preserve `workspace -> project -> branch -> { app, database }`.
1. Keep `local` local-only.
2. Keep `production` protected and durable.
3. Preserve `workspace -> project -> branch -> { service, database, bucket }`.

## Update Publish Preparation

Expand Down
12 changes: 5 additions & 7 deletions docs/onboarding/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pnpm install
```bash
pnpm prisma-cli --help
pnpm prisma-cli auth whoami
pnpm prisma-cli app deploy --help
pnpm prisma-cli service --help
```

The root `prisma-cli` script runs the TypeScript source entrypoint through `tsx`.
Expand All @@ -27,12 +27,10 @@ The root `prisma-cli` script runs the TypeScript source entrypoint through `tsx`

Before changing behavior, read:

1. [Resource model](../product/resource-model.md)
2. [Command principles](../product/command-principles.md)
3. [Command spec](../product/command-spec.md)
4. [CLI style guide](../product/cli-style-guide.md)
5. [Output conventions](../product/output-conventions.md)
6. [Error conventions](../product/error-conventions.md)
1. [Command principles](../product/command-principles.md)
2. [CLI style guide](../product/cli-style-guide.md)
3. [Output conventions](../product/output-conventions.md)
4. [Error conventions](../product/error-conventions.md)

## Test And Build

Expand Down
Loading
Loading