@@ -39,7 +39,7 @@ Out of scope for the current preview:
3939- Long flags use kebab-case.
4040- Boolean negation uses ` --no-<flag> ` .
4141- ` --json ` and non-interactive mode must not block on prompts.
42- - ` prisma.config.ts ` stores only the linked project id .
42+ - Public Beta does not read or write ` prisma.config.ts ` , ` .prisma/settings.json ` , or any repo config file for Project -> Branch -> App resolution .
4343- Remote commands do not silently change local context.
4444
4545## Context Resolution
@@ -48,18 +48,23 @@ Out of scope for the current preview:
4848
4949Commands resolve project context in this order:
5050
51- 1 . linked project id in ` prisma.config.ts `
52- 2 . explicit ` project link `
53- 3 . implicit creation by ` app deploy ` when no project is linked
51+ 1 . explicit ` --project <id-or-name> ` when present
52+ 2 . durable platform mapping when available
53+ 3 . remembered local project context, revalidated against platform data
54+ 4 . ` package.json ` name matched exactly against accessible project id, name, or slug
55+ 5 . unambiguous project creation for commands that are allowed to create projects
56+ 6 . prompt in interactive mode, or structured failure in ` --json ` / ` --no-interactive ` mode
5457
55- Only ` app deploy ` may create project context implicitly.
58+ ` --project ` is an escape hatch for ambiguous or unavailable automatic
59+ resolution, not a setup step. Only ` app deploy ` may create a missing project,
60+ and only when the inferred name is unambiguous.
5661
5762### App Selection
5863
5964Preview app commands that need an app resolve it in this order:
6065
61661 . ` --app <name> `
62- 2 . locally selected app for the linked project
67+ 2 . locally selected app for the resolved project
63683 . interactive select-or-create flow in TTY mode
64694 . ` USAGE_ERROR ` in non-interactive or ` --json ` mode when unresolved
6570
@@ -107,8 +112,7 @@ In `--json`, `result` uses this shape:
107112 "workspace" : {
108113 "id" : " ws_123" ,
109114 "name" : " Acme Inc"
110- },
111- "linkedProjectId" : " proj_123"
115+ }
112116}
113117```
114118
@@ -118,7 +122,6 @@ Rules:
118122- ` provider ` is ` github ` , ` google ` , or ` null `
119123- ` user ` contains the current user email or is ` null `
120124- ` workspace ` is the active workspace or ` null `
121- - ` linkedProjectId ` is the linked project id for the current repo or ` null `
122125- signed-out state is an empty auth state, not an error
123126
124127## ` prisma-cli auth login `
@@ -189,7 +192,8 @@ Behavior:
189192
190193- requires auth
191194- lists projects visible to the active workspace
192- - marks the locally linked project when one is present
195+ - does not resolve the current directory
196+ - does not mutate local state
193197
194198Examples:
195199
@@ -202,50 +206,35 @@ prisma-cli project list --json
202206
203207Purpose:
204208
205- - show the Prisma project linked to this directory
209+ - show the Prisma project resolved for this directory
206210
207211Behavior:
208212
209- - reads the linked project id from ` prisma.config.ts `
210- - requires auth when resolving remote project details
211- - fails with ` PROJECT_NOT_LINKED ` when no project is linked
213+ - requires auth
214+ - resolves project context without creating projects
215+ - does not prompt for project selection
216+ - does not mutate local state
217+ - ` --project <id-or-name> ` resolves only the explicit project
218+ - returns Workspace, Project, and ` resolution.projectSource `
219+ - fails with ` PROJECT_UNRESOLVED ` , ` PROJECT_NOT_FOUND ` , ` PROJECT_AMBIGUOUS ` , or ` LOCAL_STATE_STALE ` when resolution cannot continue safely
212220
213221Examples:
214222
215223``` bash
216224prisma-cli project show
217225prisma-cli project show --json
218- ```
219-
220- ## ` prisma-cli project link [project] `
221-
222- Purpose:
223-
224- - link this directory to a Prisma project
225-
226- Behavior:
227-
228- - writes only the project id to ` prisma.config.ts `
229- - prompts for a project when no project id is passed and prompting is allowed
230- - fails with ` USAGE_ERROR ` when no project can be selected non-interactively
231- - does not change active branch context
232-
233- Examples:
234-
235- ``` bash
236- prisma-cli project link
237- prisma-cli project link proj_123
226+ prisma-cli project show --project proj_123 --json
238227```
239228
240229## ` prisma-cli branch list `
241230
242231Purpose:
243232
244- - list active Platform branches linked to this project
233+ - list active Platform branches for the resolved project
245234
246235Behavior:
247236
248- - shows known remote branches for the linked project
237+ - shows known remote branches for the resolved project
249238- marks active context
250239- does not create remote state
251240- does not expose branch ` role ` or ` durability ` fields yet
@@ -266,7 +255,7 @@ Purpose:
266255Behavior:
267256
268257- reads local branch context
269- - shows linked project context when known
258+ - shows resolved project context when known
270259- does not mutate local or remote state
271260- does not expose branch ` role ` or ` durability ` fields yet
272261
@@ -347,7 +336,7 @@ prisma-cli app deploy --app hello-world --build-type tanstack-start
347336
348337## ` prisma-cli project env `
349338
350- Manage durable, platform-stored environment variables for the linked
339+ Manage durable, platform-stored environment variables for the resolved
351340project. Replaces the legacy ` prisma app update-env ` / `prisma app
352341list-env` workflow, which mutated env vars on a single Foundry version
353342and is now deprecated. The ` env ` namespace operates on the
@@ -373,9 +362,10 @@ Purpose:
373362
374363Behavior:
375364
376- - requires auth and a linked project
365+ - requires auth and a resolved project; accepts ` --project <id-or-name> ` as an explicit fallback
377366- KEY=VALUE is parsed from a single positional; KEY must match
378367 ` [A-Z_][A-Z0-9_]* `
368+ - KEY without ` =VALUE ` reads the value from the current process environment
379369- if a variable with the same key already exists in the scope, the
380370 command fails with a clear error directing to ` env update `
381371- the response carries metadata only — the value is never echoed back
@@ -385,6 +375,7 @@ Examples:
385375``` bash
386376prisma-cli project env add STRIPE_KEY=sk_test_xxx --role production
387377prisma-cli project env add STRIPE_KEY=sk_test_xxx --role preview
378+ API_URL=https://api.example prisma-cli project env add API_URL --project proj_123 --role preview
388379```
389380
390381### ` prisma-cli project env update KEY=VALUE --role <production|preview> `
@@ -396,9 +387,10 @@ Purpose:
396387
397388Behavior:
398389
399- - requires auth and a linked project
390+ - requires auth and a resolved project; accepts ` --project <id-or-name> ` as an explicit fallback
400391- KEY=VALUE is parsed from a single positional; KEY must match
401392 ` [A-Z_][A-Z0-9_]* `
393+ - KEY without ` =VALUE ` reads the value from the current process environment
402394- if no variable with the key exists in the scope, the command fails
403395 with a clear error directing to ` env add `
404396- the response carries metadata only — the value is never echoed back
@@ -418,7 +410,7 @@ Purpose:
418410
419411Behavior:
420412
421- - requires auth and a linked project
413+ - requires auth and a resolved project; accepts ` --project <id-or-name> ` as an explicit fallback
422414- defaults to ` --role production ` when ` --role ` is not supplied
423415- never prints values (never-reveal)
424416- emits ` key ` , ` id ` , ` last updated ` , and a ` scope ` annotation per row
@@ -438,7 +430,7 @@ Purpose:
438430
439431Behavior:
440432
441- - requires auth and a linked project
433+ - requires auth and a resolved project; accepts ` --project <id-or-name> ` as an explicit fallback
442434- looks the variable up by natural key in the scope and ` DELETE ` s it
443435- returns a focused error when no matching variable exists
444436
0 commit comments