You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/product/command-spec.md
+15-12Lines changed: 15 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,10 +80,8 @@ Commands resolve project context in this order:
80
80
2.`PRISMA_PROJECT_ID` when set for headless deploy/domain commands
81
81
3.`.prisma/local.json` project pin when present, revalidated against platform data
82
82
4. durable platform mapping when available
83
-
5. remembered local project context, revalidated against platform data
84
-
6.`package.json` name matched exactly against an existing accessible Project for non-mutating resolution
85
-
7. explicit setup choice from `project link`, `project create`, an interactive setup picker, `app deploy --project`, or `app deploy --create-project`
86
-
8. structured failure in `--json` / `--no-interactive` mode
83
+
5. explicit setup choice from `project link`, `project create`, an interactive setup picker, `app deploy --project`, or `app deploy --create-project`
84
+
6. structured failure when no explicit or durable Project binding exists
87
85
88
86
`--project` is an explicit Project choice. When used from an unbound directory
89
87
with `app deploy`, it writes `.prisma/local.json` after validation and before
@@ -93,10 +91,13 @@ suggest setup defaults, but they never authorize Project creation by themselves.
93
91
When `PRISMA_PROJECT_ID` is set, `app deploy` and `app domain` commands skip
94
92
`.prisma/local.json` reads and do not write a new pin.
95
93
96
-
`app deploy` is stricter than general inspection commands: it does not use
97
-
package-name matching or remembered local context as Project scope. Without a
98
-
pin, durable mapping, env var, or explicit Project flag, it enters explicit
99
-
setup or fails with `PROJECT_SETUP_REQUIRED`.
94
+
Project-scoped commands never use package-name matching, directory-name
95
+
matching, or remembered local context as selected Project scope. Local metadata
96
+
may suggest setup defaults and candidate Projects, but only explicit input or
97
+
durable state may select a Project. Without a pin, durable mapping, supported
98
+
env var, or explicit Project flag, Project-scoped commands fail with
99
+
`PROJECT_SETUP_REQUIRED`; `app deploy` may enter explicit interactive setup
100
+
before failing.
100
101
101
102
### App Selection
102
103
@@ -376,17 +377,19 @@ prisma-cli project list --json
376
377
377
378
Purpose:
378
379
379
-
- show the Prisma project resolved for this directory
380
+
- show this directory's Prisma Project binding
380
381
381
382
Behavior:
382
383
383
384
- requires auth
384
-
-resolves project context without creating projects
385
+
-inspects explicit or durable project context without creating projects
385
386
- does not prompt for project selection
386
387
- does not mutate local state
387
388
-`--project <id-or-name>` resolves only the explicit project
388
-
- returns Workspace, Project, and `resolution.projectSource`
389
-
- fails with `PROJECT_UNRESOLVED`, `PROJECT_NOT_FOUND`, `PROJECT_AMBIGUOUS`, or `LOCAL_STATE_STALE` when resolution cannot continue safely
389
+
- when bound, returns Workspace, Project, and `resolution.projectSource`
390
+
- when unbound, exits successfully with `project: null`, `resolution.projectSource: "unbound"`, a suggested Project name, matching Project candidates, and recovery commands
391
+
- package names and directory names only power unbound suggestions
392
+
- fails with `PROJECT_NOT_FOUND`, `PROJECT_AMBIGUOUS`, or `LOCAL_STATE_STALE` when explicit or durable binding validation cannot continue safely
0 commit comments