@prisma/cli 8.0.0-rc.13-dev.92 → 8.0.0-rc.13-dev.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +264 -74
- package/package.json +7 -7
package/dist/cli.js
CHANGED
|
@@ -2522,6 +2522,7 @@ const authLoginCommand = defineCommand({
|
|
|
2522
2522
|
managesCredentials: true,
|
|
2523
2523
|
help: {
|
|
2524
2524
|
summary: "Log in to your Prisma platform account",
|
|
2525
|
+
description: "Opens a browser sign-in and stores a session for one workspace, the account-level container that holds your Projects. Run it again to add a session for another workspace; 'auth workspace use' switches between stored sessions. In CI or other non-interactive environments, skip login and set PRISMA_SERVICE_TOKEN instead.",
|
|
2525
2526
|
examples: ["auth login"]
|
|
2526
2527
|
},
|
|
2527
2528
|
handler: async (_args, ctx) => {
|
|
@@ -2612,6 +2613,7 @@ const authLogoutCommand = defineCommand({
|
|
|
2612
2613
|
managesCredentials: true,
|
|
2613
2614
|
help: {
|
|
2614
2615
|
summary: "Clear stored authentication credentials",
|
|
2616
|
+
description: "Ends every workspace session stored on this machine. To end just one and keep the others, use 'auth workspace logout' instead. A credential supplied via PRISMA_SERVICE_TOKEN is not stored here and stays in force.",
|
|
2615
2617
|
examples: ["auth logout"]
|
|
2616
2618
|
},
|
|
2617
2619
|
handler: async (_args, ctx) => {
|
|
@@ -2701,7 +2703,8 @@ function presentationsFor(spec, result) {
|
|
|
2701
2703
|
}
|
|
2702
2704
|
const authWhoamiCommand = defineCommand({
|
|
2703
2705
|
help: {
|
|
2704
|
-
summary: "Show
|
|
2706
|
+
summary: "Show who is signed in and which workspace commands target",
|
|
2707
|
+
description: "Shows which identity the CLI is acting as and which workspace its commands will target. Run it to check you are in the right workspace before creating or deleting resources, or to see whether a PRISMA_SERVICE_TOKEN credential is overriding your stored sessions.",
|
|
2705
2708
|
examples: ["auth whoami", "auth whoami --json"]
|
|
2706
2709
|
},
|
|
2707
2710
|
handler: async (_args, ctx) => {
|
|
@@ -2792,6 +2795,7 @@ const authWorkspaceListCommand = defineCommand({
|
|
|
2792
2795
|
managesCredentials: true,
|
|
2793
2796
|
help: {
|
|
2794
2797
|
summary: "List your workspace sessions",
|
|
2798
|
+
description: "Each 'auth login' stores one session per workspace. This lists the sessions on this machine and marks the current one, which every workspace-scoped command targets unless a PRISMA_SERVICE_TOKEN credential is set; that credential overrides stored sessions.",
|
|
2795
2799
|
examples: ["auth workspace list", "auth workspace list --json"]
|
|
2796
2800
|
},
|
|
2797
2801
|
handler: async (_args, ctx) => {
|
|
@@ -2855,6 +2859,7 @@ const authWorkspaceLogoutCommand = defineCommand({
|
|
|
2855
2859
|
}) } },
|
|
2856
2860
|
help: {
|
|
2857
2861
|
summary: "End one workspace session",
|
|
2862
|
+
description: "Removes the stored session for one workspace and leaves the others in place. To clear every session on this machine, use 'auth logout'.",
|
|
2858
2863
|
examples: ["auth workspace logout my-workspace"]
|
|
2859
2864
|
},
|
|
2860
2865
|
handler: async (args, ctx) => {
|
|
@@ -2937,7 +2942,8 @@ const authWorkspaceUseCommand = defineCommand({
|
|
|
2937
2942
|
placeholder: "id-or-name"
|
|
2938
2943
|
}) } },
|
|
2939
2944
|
help: {
|
|
2940
|
-
summary: "Make
|
|
2945
|
+
summary: "Make a workspace session current: commands target that workspace",
|
|
2946
|
+
description: "Switches which workspace subsequent commands target. This changes local CLI state only; nothing is created or modified on the platform. Run without an argument to pick from your stored sessions. A PRISMA_SERVICE_TOKEN credential, when set, overrides stored sessions: commands keep targeting its workspace regardless of the selection here.",
|
|
2941
2947
|
examples: ["auth workspace use", "auth workspace use my-workspace"]
|
|
2942
2948
|
},
|
|
2943
2949
|
handler: async (args, ctx) => {
|
|
@@ -4289,11 +4295,12 @@ function listPresentations$8(result) {
|
|
|
4289
4295
|
}
|
|
4290
4296
|
const branchListCommand = defineCommand({
|
|
4291
4297
|
help: {
|
|
4292
|
-
summary: "List Platform branches
|
|
4298
|
+
summary: "List a project's Platform branches",
|
|
4299
|
+
description: "A Branch maps to a Git branch of the connected repository. Each one is an isolated environment with its own services, databases, buckets, and environment variables: the production branch serves live traffic, every other branch is a preview.",
|
|
4293
4300
|
examples: ["branch list", "branch list --project my-app"]
|
|
4294
4301
|
},
|
|
4295
4302
|
args: { flags: { project: flag.string({
|
|
4296
|
-
brief: "Project id or name",
|
|
4303
|
+
brief: "Project id or name (default: the project this directory is linked to)",
|
|
4297
4304
|
placeholder: "id-or-name"
|
|
4298
4305
|
}) } },
|
|
4299
4306
|
needs: { credentials: true },
|
|
@@ -4486,11 +4493,11 @@ function bucketApiError(summary, response, error) {
|
|
|
4486
4493
|
/** Where a caller who is missing a bucket id finds one. */
|
|
4487
4494
|
const LIST_BUCKETS_COMMAND = `${CLI_NAME} bucket list`;
|
|
4488
4495
|
const projectFlag$3 = flag.string({
|
|
4489
|
-
brief: "Project id or name",
|
|
4496
|
+
brief: "Project id or name (default: the project this directory is linked to)",
|
|
4490
4497
|
placeholder: "id-or-name"
|
|
4491
4498
|
});
|
|
4492
4499
|
const branchFlag$2 = flag.string({
|
|
4493
|
-
brief: "Branch git name",
|
|
4500
|
+
brief: "Branch git name; use to target one branch's environment",
|
|
4494
4501
|
placeholder: "git-name"
|
|
4495
4502
|
});
|
|
4496
4503
|
const bucketPositional = positional.string({
|
|
@@ -4563,6 +4570,7 @@ const bucketCreateCommand = defineCommand({
|
|
|
4563
4570
|
} },
|
|
4564
4571
|
help: {
|
|
4565
4572
|
summary: "Create an object-store bucket",
|
|
4573
|
+
description: "Creates blob storage in a Branch of the project. A bucket holds no credentials of its own: mint them with 'bucket key create', which prints them once.",
|
|
4566
4574
|
examples: [
|
|
4567
4575
|
"bucket create",
|
|
4568
4576
|
"bucket create --name my-store",
|
|
@@ -4628,6 +4636,7 @@ const bucketDeleteCommand = defineCommand({
|
|
|
4628
4636
|
args: { positionals: { bucketId: bucketPositional } },
|
|
4629
4637
|
help: {
|
|
4630
4638
|
summary: "Delete a bucket and all its access keys",
|
|
4639
|
+
description: "Deletion is permanent: the stored objects are destroyed and every access key stops working. The exact bucket id is the consent token; pass it with --confirm to run non-interactively.",
|
|
4631
4640
|
examples: ["bucket delete bkt_123 --confirm bkt_123"]
|
|
4632
4641
|
},
|
|
4633
4642
|
needs: { credentials: true },
|
|
@@ -4707,17 +4716,18 @@ const bucketKeyCreateCommand = defineCommand({
|
|
|
4707
4716
|
positionals: { bucketId: bucketPositional },
|
|
4708
4717
|
flags: {
|
|
4709
4718
|
role: flag.enum({
|
|
4710
|
-
brief: "Access role
|
|
4719
|
+
brief: "Access role; read_write unless set, use read for consumers that only download",
|
|
4711
4720
|
values: ["read", "read_write"]
|
|
4712
4721
|
}),
|
|
4713
4722
|
name: flag.string({
|
|
4714
|
-
brief: "Key display name (auto-generated if omitted)",
|
|
4723
|
+
brief: "Key display name; use it to record which consumer holds the key (auto-generated if omitted)",
|
|
4715
4724
|
placeholder: "name"
|
|
4716
4725
|
})
|
|
4717
4726
|
}
|
|
4718
4727
|
},
|
|
4719
4728
|
help: {
|
|
4720
4729
|
summary: "Create a bucket access key and print its one-time credentials",
|
|
4730
|
+
description: "Mints S3-compatible credentials for one bucket, shown exactly once; store them now, nothing prints them again. Give each consumer its own key so one can be revoked without breaking the others, and grant read-only consumers --role read.",
|
|
4721
4731
|
examples: [
|
|
4722
4732
|
"bucket key create bkt_123",
|
|
4723
4733
|
"bucket key create bkt_123 --role read",
|
|
@@ -4788,6 +4798,7 @@ const bucketKeyDeleteCommand = defineCommand({
|
|
|
4788
4798
|
} },
|
|
4789
4799
|
help: {
|
|
4790
4800
|
summary: "Revoke and delete a bucket access key",
|
|
4801
|
+
description: "The key's credentials stop working immediately; anything still using them loses access to the bucket. The bucket and its other keys are untouched.",
|
|
4791
4802
|
examples: ["bucket key delete bkt_123 bkey_456"]
|
|
4792
4803
|
},
|
|
4793
4804
|
needs: { credentials: true },
|
|
@@ -4905,6 +4916,7 @@ const bucketKeyListCommand = defineCommand({
|
|
|
4905
4916
|
args: { positionals: { bucketId: bucketPositional } },
|
|
4906
4917
|
help: {
|
|
4907
4918
|
summary: "List access keys for a bucket",
|
|
4919
|
+
description: "Shows each key's id, name, and role. Key secrets print once, at 'bucket key create'; listing never reveals them.",
|
|
4908
4920
|
examples: ["bucket key list bkt_123", "bucket key list bkt_123 --json"]
|
|
4909
4921
|
},
|
|
4910
4922
|
needs: { credentials: true },
|
|
@@ -4979,7 +4991,8 @@ const bucketListCommand = defineCommand({
|
|
|
4979
4991
|
branch: branchFlag$2
|
|
4980
4992
|
} },
|
|
4981
4993
|
help: {
|
|
4982
|
-
summary: "List object-store buckets
|
|
4994
|
+
summary: "List a project's object-store buckets",
|
|
4995
|
+
description: "A bucket is blob storage for files and uploads. Buckets are branch-bound: each belongs to one Branch, the isolated environment for one Git branch.",
|
|
4983
4996
|
examples: [
|
|
4984
4997
|
"bucket list",
|
|
4985
4998
|
"bucket list --branch preview",
|
|
@@ -5162,7 +5175,7 @@ async function postFeedback(endpoint, body, signal) {
|
|
|
5162
5175
|
const feedbackCommand = defineCommand({
|
|
5163
5176
|
help: {
|
|
5164
5177
|
summary: "Send feedback to the Prisma CLI team",
|
|
5165
|
-
description: "Anonymous unless --email is passed. Every submission includes the CLI
|
|
5178
|
+
description: "Anonymous unless --email is passed. Every submission includes the CLI version, node version, and OS platform/arch, and nothing else.",
|
|
5166
5179
|
examples: ["feedback \"the deploy flow is great\"", "feedback \"please add X\" --email you@example.com"]
|
|
5167
5180
|
},
|
|
5168
5181
|
args: {
|
|
@@ -5282,7 +5295,7 @@ function formatGitConnectionDetail(status) {
|
|
|
5282
5295
|
/** Workspace, project and the source-repository client for the
|
|
5283
5296
|
* `git *` commands. */
|
|
5284
5297
|
const projectFlag$2 = flag.string({
|
|
5285
|
-
brief: "Project id or name",
|
|
5298
|
+
brief: "Project id or name (default: the project this directory is linked to)",
|
|
5286
5299
|
placeholder: "id-or-name"
|
|
5287
5300
|
});
|
|
5288
5301
|
async function resolveGitContext(ctx, explicitProject, commandName) {
|
|
@@ -5384,13 +5397,14 @@ function connectPresentations(result) {
|
|
|
5384
5397
|
const gitConnectCommand = defineCommand({
|
|
5385
5398
|
args: {
|
|
5386
5399
|
positionals: { gitUrl: positional.optionalString({
|
|
5387
|
-
brief: "GitHub repository URL",
|
|
5400
|
+
brief: "GitHub repository URL (default: this repository's origin)",
|
|
5388
5401
|
placeholder: "git-url"
|
|
5389
5402
|
}) },
|
|
5390
5403
|
flags: { project: projectFlag$2 }
|
|
5391
5404
|
},
|
|
5392
5405
|
help: {
|
|
5393
|
-
summary: "Connect
|
|
5406
|
+
summary: "Connect a project to a GitHub repository so every push deploys",
|
|
5407
|
+
description: "Turns on deploy-on-push: once connected, pushing a Git branch builds and deploys it to a matching Platform Branch, an isolated environment with its own services, databases, and buckets. If the Prisma GitHub App does not cover the repository yet, the command opens the install page and waits. Run without a URL to use this repository's origin remote.",
|
|
5394
5408
|
examples: [
|
|
5395
5409
|
"git connect",
|
|
5396
5410
|
"git connect git@github.com:prisma/prisma-cli.git",
|
|
@@ -5486,7 +5500,8 @@ function disconnectPresentations(result) {
|
|
|
5486
5500
|
const gitDisconnectCommand = defineCommand({
|
|
5487
5501
|
args: { flags: { project: projectFlag$2 } },
|
|
5488
5502
|
help: {
|
|
5489
|
-
summary: "Disconnect the GitHub repository
|
|
5503
|
+
summary: "Disconnect the GitHub repository: pushes stop deploying",
|
|
5504
|
+
description: "Stops deploy-on-push by removing the repository connection. Nothing already deployed changes: existing branches, services, and databases stay as they are.",
|
|
5490
5505
|
examples: ["git disconnect", "git disconnect --project proj_123"]
|
|
5491
5506
|
},
|
|
5492
5507
|
needs: { credentials: true },
|
|
@@ -5760,8 +5775,8 @@ function bothSwitchesError() {
|
|
|
5760
5775
|
}
|
|
5761
5776
|
const skillsSyncCommand = defineCommand({
|
|
5762
5777
|
help: {
|
|
5763
|
-
summary: "Copy the agent skills from installed Prisma packages into this project",
|
|
5764
|
-
description: "
|
|
5778
|
+
summary: "Copy the AI-agent instruction files (skills) from installed Prisma packages into this project",
|
|
5779
|
+
description: "Agent skills are instruction files that teach AI coding agents (Claude Code, Cursor, and others) how to use the installed Prisma packages. They ship inside the packages themselves, so they always describe the version in use. Sync copies them into the skill directories the agent harnesses read, and removes copies whose package is gone. It does nothing, and exits 0, when everything is already current.",
|
|
5765
5780
|
examples: ["skills sync", "skills sync --disable"]
|
|
5766
5781
|
},
|
|
5767
5782
|
needs: { config: skillsConfigSection },
|
|
@@ -6268,7 +6283,7 @@ function initPresentations(result, postinstall, config, skills) {
|
|
|
6268
6283
|
}
|
|
6269
6284
|
const initCommand = defineCommand({
|
|
6270
6285
|
help: {
|
|
6271
|
-
summary: "Prepare this repository for Prisma
|
|
6286
|
+
summary: "Prepare this repository for Prisma: config file, dev dependency, AI-agent skills",
|
|
6272
6287
|
description: "Runs locally and calls no platform API. Adds a postinstall script to package.json that keeps the Prisma agent skills in sync on every install, adds prisma to devDependencies at this CLI's exact version when no dependency field declares it, scaffolds a prisma.config.ts recording which agents to install skills for, then syncs the skills once now. Everything lands in the current directory; a prisma.config.ts or postinstall script that already exists is never edited. Rerunning is safe: each step reports what is already done.",
|
|
6273
6288
|
examples: [
|
|
6274
6289
|
"init",
|
|
@@ -6840,11 +6855,11 @@ async function readWorkspaceSubscription(client, workspaceId, signal) {
|
|
|
6840
6855
|
//#region src/commands/postgres/context.ts
|
|
6841
6856
|
/** Workspace, project and provider for the `postgres *` commands. */
|
|
6842
6857
|
const projectFlag$1 = flag.string({
|
|
6843
|
-
brief: "Project id or name",
|
|
6858
|
+
brief: "Project id or name (default: the project this directory is linked to)",
|
|
6844
6859
|
placeholder: "id-or-name"
|
|
6845
6860
|
});
|
|
6846
6861
|
const branchFlag$1 = flag.string({
|
|
6847
|
-
brief: "Branch git name",
|
|
6862
|
+
brief: "Branch git name; use to target one branch's environment",
|
|
6848
6863
|
placeholder: "git-name"
|
|
6849
6864
|
});
|
|
6850
6865
|
const databasePositional = positional.string({
|
|
@@ -7022,6 +7037,7 @@ const postgresBackupListCommand = defineCommand({
|
|
|
7022
7037
|
},
|
|
7023
7038
|
help: {
|
|
7024
7039
|
summary: "List backups for a database",
|
|
7040
|
+
description: "Backups are created automatically by the platform. Use the listed backup ids with 'postgres backup restore'.",
|
|
7025
7041
|
examples: ["postgres backup list db_123", "postgres backup list acme-production --limit 50"]
|
|
7026
7042
|
},
|
|
7027
7043
|
needs: { credentials: true },
|
|
@@ -7104,11 +7120,11 @@ const postgresBackupRestoreCommand = defineCommand({
|
|
|
7104
7120
|
}) },
|
|
7105
7121
|
flags: {
|
|
7106
7122
|
backup: flag.string({
|
|
7107
|
-
brief: "Backup to restore from",
|
|
7123
|
+
brief: "Backup to restore from, listed by 'postgres backup list'",
|
|
7108
7124
|
placeholder: "backup-id"
|
|
7109
7125
|
}),
|
|
7110
7126
|
sourceDatabase: flag.string({
|
|
7111
|
-
brief: "Database the backup belongs to
|
|
7127
|
+
brief: "Database the backup belongs to; use when restoring another database's backup into the target",
|
|
7112
7128
|
placeholder: "database"
|
|
7113
7129
|
}),
|
|
7114
7130
|
project: projectFlag$1,
|
|
@@ -7117,6 +7133,7 @@ const postgresBackupRestoreCommand = defineCommand({
|
|
|
7117
7133
|
},
|
|
7118
7134
|
help: {
|
|
7119
7135
|
summary: "Restore a database from a backup after exact id confirmation",
|
|
7136
|
+
description: "Replaces the target database's current state with the backup's contents; anything written since that backup is lost, so the exact target database id is the consent token. To restore another database's backup into this one, name where the backup came from with --source-database.",
|
|
7120
7137
|
examples: ["postgres backup restore db_123 --backup bkp_456 --confirm db_123"]
|
|
7121
7138
|
},
|
|
7122
7139
|
needs: { credentials: true },
|
|
@@ -7166,7 +7183,7 @@ const postgresConnectionCreateCommand = defineCommand({
|
|
|
7166
7183
|
positionals: { database: databasePositional },
|
|
7167
7184
|
flags: {
|
|
7168
7185
|
name: flag.string({
|
|
7169
|
-
brief: "Connection name",
|
|
7186
|
+
brief: "Connection name; use it to record which consumer holds the credential",
|
|
7170
7187
|
placeholder: "name"
|
|
7171
7188
|
}),
|
|
7172
7189
|
project: projectFlag$1,
|
|
@@ -7174,7 +7191,8 @@ const postgresConnectionCreateCommand = defineCommand({
|
|
|
7174
7191
|
}
|
|
7175
7192
|
},
|
|
7176
7193
|
help: {
|
|
7177
|
-
summary: "Create
|
|
7194
|
+
summary: "Create an additional connection URL for a database; printed exactly once",
|
|
7195
|
+
description: "Mints an additional credential for an existing database, shown exactly once. Give each consumer (an app, CI, a teammate) its own named connection, so its access can later be rotated or revoked without touching the others.",
|
|
7178
7196
|
examples: ["postgres connection create db_123", "postgres connection create db_123 --name readonly"]
|
|
7179
7197
|
},
|
|
7180
7198
|
needs: { credentials: true },
|
|
@@ -7212,6 +7230,7 @@ const postgresConnectionDeleteCommand = defineCommand({
|
|
|
7212
7230
|
}) } },
|
|
7213
7231
|
help: {
|
|
7214
7232
|
summary: "Delete a database connection after exact id confirmation",
|
|
7233
|
+
description: "Revokes the credential: anything still using its URL loses access to the database. The database itself and its other connections are untouched. The exact connection id is the consent token.",
|
|
7215
7234
|
examples: ["postgres connection delete conn_123 --confirm conn_123"]
|
|
7216
7235
|
},
|
|
7217
7236
|
needs: { credentials: true },
|
|
@@ -7324,6 +7343,7 @@ const postgresConnectionListCommand = defineCommand({
|
|
|
7324
7343
|
},
|
|
7325
7344
|
help: {
|
|
7326
7345
|
summary: "List database connection metadata without secret values",
|
|
7346
|
+
description: "Each connection is an independent credential for the same database, so one consumer's access can be rotated or revoked without breaking the others. Listing shows metadata only; connection URLs print once, at create or rotate, and never again.",
|
|
7327
7347
|
examples: ["postgres connection list db_123", "postgres connection list acme-preview --branch preview --json"]
|
|
7328
7348
|
},
|
|
7329
7349
|
needs: { credentials: true },
|
|
@@ -7350,6 +7370,7 @@ const postgresConnectionRotateCommand = defineCommand({
|
|
|
7350
7370
|
}) } },
|
|
7351
7371
|
help: {
|
|
7352
7372
|
summary: "Rotate connection credentials and print the new one-time connection URL",
|
|
7373
|
+
description: "Replaces the connection's credentials: the old URL stops working and the new one prints exactly once. Use it after a suspected leak or on a rotation schedule. The exact connection id is the consent token.",
|
|
7353
7374
|
examples: ["postgres connection rotate conn_123 --confirm conn_123"]
|
|
7354
7375
|
},
|
|
7355
7376
|
needs: { credentials: true },
|
|
@@ -7396,7 +7417,7 @@ const postgresCreateCommand = defineCommand({
|
|
|
7396
7417
|
}) },
|
|
7397
7418
|
flags: {
|
|
7398
7419
|
region: flag.string({
|
|
7399
|
-
brief: "Prisma Postgres region id",
|
|
7420
|
+
brief: "Prisma Postgres region id; set it when the data must live near a location",
|
|
7400
7421
|
placeholder: "region"
|
|
7401
7422
|
}),
|
|
7402
7423
|
project: projectFlag$1,
|
|
@@ -7405,6 +7426,7 @@ const postgresCreateCommand = defineCommand({
|
|
|
7405
7426
|
},
|
|
7406
7427
|
help: {
|
|
7407
7428
|
summary: "Create a Prisma Postgres database and print its one-time connection URL",
|
|
7429
|
+
description: "Creates a database in a Branch of the project and prints its connection URL exactly once; store it now, nothing prints it again. Mint further URLs for other consumers with 'postgres connection create'.",
|
|
7408
7430
|
examples: ["postgres create my-db", "postgres create my-db --branch feature/foo --region eu-central-1"]
|
|
7409
7431
|
},
|
|
7410
7432
|
needs: { credentials: true },
|
|
@@ -7496,6 +7518,7 @@ const postgresDeleteCommand = defineCommand({
|
|
|
7496
7518
|
},
|
|
7497
7519
|
help: {
|
|
7498
7520
|
summary: "Delete a database after exact id confirmation",
|
|
7521
|
+
description: "Deletion is permanent and destroys the data. The exact database id is the consent token; pass it with --confirm to run non-interactively.",
|
|
7499
7522
|
examples: ["postgres delete db_123 --confirm db_123"]
|
|
7500
7523
|
},
|
|
7501
7524
|
needs: { credentials: true },
|
|
@@ -7583,7 +7606,8 @@ const postgresListCommand = defineCommand({
|
|
|
7583
7606
|
branch: branchFlag$1
|
|
7584
7607
|
} },
|
|
7585
7608
|
help: {
|
|
7586
|
-
summary: "List Prisma Postgres databases
|
|
7609
|
+
summary: "List a project's Prisma Postgres databases",
|
|
7610
|
+
description: "Databases are branch-bound: each belongs to one Branch, the isolated environment for one Git branch. Without --branch, this lists databases across every branch of the project.",
|
|
7587
7611
|
examples: [
|
|
7588
7612
|
"postgres list",
|
|
7589
7613
|
"postgres list --branch feature/foo",
|
|
@@ -7704,6 +7728,7 @@ const postgresShowCommand = defineCommand({
|
|
|
7704
7728
|
},
|
|
7705
7729
|
help: {
|
|
7706
7730
|
summary: "Show database metadata without secret values",
|
|
7731
|
+
description: "Shows a database's name, branch, region, and status. Connection URLs are secrets printed once, by 'postgres create' or 'postgres connection rotate'; this command never reveals them.",
|
|
7707
7732
|
examples: ["postgres show db_123", "postgres show acme-preview --branch preview --json"]
|
|
7708
7733
|
},
|
|
7709
7734
|
needs: { credentials: true },
|
|
@@ -8546,12 +8571,13 @@ const projectCreateCommand = defineCommand({
|
|
|
8546
8571
|
placeholder: "name"
|
|
8547
8572
|
}) },
|
|
8548
8573
|
flags: { region: flag.string({
|
|
8549
|
-
brief: "Prisma Compute region
|
|
8574
|
+
brief: "Prisma Compute region for the project's infrastructure; set it when data or users must stay near a location",
|
|
8550
8575
|
placeholder: "region"
|
|
8551
8576
|
}) }
|
|
8552
8577
|
},
|
|
8553
8578
|
help: {
|
|
8554
|
-
summary: "Create a Project and link this directory",
|
|
8579
|
+
summary: "Create a Project and link this directory: commands run here target it",
|
|
8580
|
+
description: "Creates a Project in your workspace and links the current directory to it, so later commands resolve it without --project. A Project groups one product or codebase; its Branches are isolated environments, each with its own services, databases, and buckets. This is usually the first command after 'auth login' in a new repository.",
|
|
8555
8581
|
examples: ["project create my-app", "project create my-app --json"]
|
|
8556
8582
|
},
|
|
8557
8583
|
needs: { credentials: true },
|
|
@@ -8630,6 +8656,7 @@ const projectDeleteCommand = defineCommand({
|
|
|
8630
8656
|
}) } },
|
|
8631
8657
|
help: {
|
|
8632
8658
|
summary: "Delete a Project permanently after exact id confirmation",
|
|
8659
|
+
description: "Deletion is permanent: it destroys the project's databases and stops its deployed services. Because of that, the command asks for the exact project id as a consent token; pass it with --confirm to run non-interactively.",
|
|
8633
8660
|
examples: ["project delete proj_123 --confirm proj_123"]
|
|
8634
8661
|
},
|
|
8635
8662
|
needs: { credentials: true },
|
|
@@ -9297,19 +9324,19 @@ function serializeEnvList(result) {
|
|
|
9297
9324
|
/** Flags, scope resolution and presentation shared by the
|
|
9298
9325
|
* `project env *` commands. */
|
|
9299
9326
|
const roleFlag = flag.enum({
|
|
9300
|
-
brief: "Project
|
|
9327
|
+
brief: "Project-wide scope: production, or preview (shared by every preview branch)",
|
|
9301
9328
|
values: ["production", "preview"]
|
|
9302
9329
|
});
|
|
9303
9330
|
const projectFlag = flag.string({
|
|
9304
|
-
brief: "Project id or name",
|
|
9331
|
+
brief: "Project id or name (default: the project this directory is linked to)",
|
|
9305
9332
|
placeholder: "id-or-name"
|
|
9306
9333
|
});
|
|
9307
9334
|
const branchFlag = flag.string({
|
|
9308
|
-
brief: "
|
|
9335
|
+
brief: "Scope to one preview branch's override; use for values only that branch needs",
|
|
9309
9336
|
placeholder: "git-name"
|
|
9310
9337
|
});
|
|
9311
9338
|
const fileFlag = flag.string({
|
|
9312
|
-
brief: "Read KEY=VALUE assignments from a dotenv file",
|
|
9339
|
+
brief: "Read KEY=VALUE assignments from a dotenv file; use to import many variables at once",
|
|
9313
9340
|
placeholder: "path"
|
|
9314
9341
|
});
|
|
9315
9342
|
function requireEnvScope(flags, command) {
|
|
@@ -9462,7 +9489,8 @@ const projectEnvAddCommand = defineCommand({
|
|
|
9462
9489
|
}
|
|
9463
9490
|
},
|
|
9464
9491
|
help: {
|
|
9465
|
-
summary: "Create
|
|
9492
|
+
summary: "Create an environment variable in one scope: production, preview, or one branch",
|
|
9493
|
+
description: "Variables reach a service's environment when it deploys. Writes always name their scope so production is never targeted by accident: --role production, --role preview (shared by every preview branch), or --branch for one branch's override. The value comes from KEY=VALUE, from the current shell environment when only KEY is given, or from a dotenv file with --file.",
|
|
9466
9494
|
examples: [
|
|
9467
9495
|
"project env add STRIPE_KEY=sk_test_xxx --role production",
|
|
9468
9496
|
"project env add STRIPE_KEY=sk_test_xxx --role preview",
|
|
@@ -9578,7 +9606,8 @@ const projectEnvDeleteCommand = defineCommand({
|
|
|
9578
9606
|
}
|
|
9579
9607
|
},
|
|
9580
9608
|
help: {
|
|
9581
|
-
summary: "Delete an environment variable from
|
|
9609
|
+
summary: "Delete an environment variable from one scope: production, preview, or one branch",
|
|
9610
|
+
description: "Removes the variable from the named scope only; the same key in other scopes is untouched. Services lose the value on their next deploy.",
|
|
9582
9611
|
examples: [
|
|
9583
9612
|
"project env delete STRIPE_KEY --role production",
|
|
9584
9613
|
"project env delete STRIPE_KEY --role preview",
|
|
@@ -9656,13 +9685,14 @@ const projectEnvListCommand = defineCommand({
|
|
|
9656
9685
|
args: { flags: {
|
|
9657
9686
|
role: roleFlag,
|
|
9658
9687
|
branch: flag.string({
|
|
9659
|
-
brief: "
|
|
9688
|
+
brief: "Show what one preview branch resolves: the preview scope plus its overrides",
|
|
9660
9689
|
placeholder: "git-name"
|
|
9661
9690
|
}),
|
|
9662
9691
|
project: projectFlag
|
|
9663
9692
|
} },
|
|
9664
9693
|
help: {
|
|
9665
|
-
summary: "List environment
|
|
9694
|
+
summary: "List environment variables in a scope: names and ids, never values",
|
|
9695
|
+
description: "Values are write-only through the CLI: listing shows names, ids, and status, never values. Without a scope flag it shows an overview of every scope; --role narrows to the production or preview scope, and --branch shows what one preview branch resolves.",
|
|
9666
9696
|
examples: [
|
|
9667
9697
|
"project env list",
|
|
9668
9698
|
"project env list --role production",
|
|
@@ -9728,7 +9758,8 @@ const projectEnvUpdateCommand = defineCommand({
|
|
|
9728
9758
|
}
|
|
9729
9759
|
},
|
|
9730
9760
|
help: {
|
|
9731
|
-
summary: "Replace an existing environment variable's value
|
|
9761
|
+
summary: "Replace an existing environment variable's value",
|
|
9762
|
+
description: "Overwrites one variable's value in one scope; the variable must already exist there (use 'project env add' to create it). With --file, overwrites every variable the dotenv file lists. New values reach services on their next deploy.",
|
|
9732
9763
|
examples: [
|
|
9733
9764
|
"project env update STRIPE_KEY=sk_new_xxx --role production",
|
|
9734
9765
|
"project env update STRIPE_KEY=sk_new_xxx --role preview",
|
|
@@ -9877,7 +9908,8 @@ const projectLinkCommand = defineCommand({
|
|
|
9877
9908
|
placeholder: "id-or-name"
|
|
9878
9909
|
}) } },
|
|
9879
9910
|
help: {
|
|
9880
|
-
summary: "Link this directory to a Project",
|
|
9911
|
+
summary: "Link this directory to a Project: commands run here target it by default",
|
|
9912
|
+
description: "Records locally that this directory belongs to an existing Project, so later commands resolve it without --project. Linking itself changes local state only. Run without an argument to pick from your workspace's projects; that picker also offers creating a new Project, which does create one on the platform.",
|
|
9881
9913
|
examples: [
|
|
9882
9914
|
"project link",
|
|
9883
9915
|
"project link proj_123",
|
|
@@ -9958,6 +9990,7 @@ function listPresentations$1(result) {
|
|
|
9958
9990
|
const projectListCommand = defineCommand({
|
|
9959
9991
|
help: {
|
|
9960
9992
|
summary: "List all projects in your workspace",
|
|
9993
|
+
description: "A Project groups one product or codebase. It is the child of a workspace and the parent of Branches: isolated environments that hold your services, databases, and buckets.",
|
|
9961
9994
|
examples: ["project list", "project list --json"]
|
|
9962
9995
|
},
|
|
9963
9996
|
needs: { credentials: true },
|
|
@@ -10018,12 +10051,13 @@ const projectRenameCommand = defineCommand({
|
|
|
10018
10051
|
placeholder: "name"
|
|
10019
10052
|
}) },
|
|
10020
10053
|
flags: { project: flag.string({
|
|
10021
|
-
brief: "Project id or name",
|
|
10054
|
+
brief: "Project id or name (default: the project this directory is linked to)",
|
|
10022
10055
|
placeholder: "id-or-name"
|
|
10023
10056
|
}) }
|
|
10024
10057
|
},
|
|
10025
10058
|
help: {
|
|
10026
|
-
summary: "Rename
|
|
10059
|
+
summary: "Rename a Project",
|
|
10060
|
+
description: "Changes the display name of the linked project, or of the one named by --project. The project id stays the same, so existing links and automation keep working.",
|
|
10027
10061
|
examples: ["project rename \"Acme Dashboard v2\"", "project rename billing-api --project proj_123"]
|
|
10028
10062
|
},
|
|
10029
10063
|
needs: { credentials: true },
|
|
@@ -10153,11 +10187,12 @@ function showPresentations$1(result, cwd, env) {
|
|
|
10153
10187
|
}
|
|
10154
10188
|
const projectShowCommand = defineCommand({
|
|
10155
10189
|
args: { positionals: { project: positional.optionalString({
|
|
10156
|
-
brief: "Project id or name (default: the linked
|
|
10190
|
+
brief: "Project id or name (default: the project this directory is linked to)",
|
|
10157
10191
|
placeholder: "id-or-name"
|
|
10158
10192
|
}) } },
|
|
10159
10193
|
help: {
|
|
10160
|
-
summary: "Show this directory
|
|
10194
|
+
summary: "Show which Project this directory is linked to",
|
|
10195
|
+
description: "Reports which Project this directory is linked to, or that it is not linked, with next steps. Pass an id or name to inspect any project without changing the local link.",
|
|
10161
10196
|
examples: ["project show", "project show proj_123 --json"]
|
|
10162
10197
|
},
|
|
10163
10198
|
needs: { credentials: true },
|
|
@@ -10341,17 +10376,18 @@ const projectTransferCommand = defineCommand({
|
|
|
10341
10376
|
}) },
|
|
10342
10377
|
flags: {
|
|
10343
10378
|
toWorkspace: flag.string({
|
|
10344
|
-
brief: "
|
|
10379
|
+
brief: "Receiving workspace, when it is one of your own stored sessions",
|
|
10345
10380
|
placeholder: "id-or-name"
|
|
10346
10381
|
}),
|
|
10347
10382
|
recipientToken: flag.string({
|
|
10348
|
-
brief: "Access token for the receiving workspace",
|
|
10383
|
+
brief: "Access token for the receiving workspace, when you are not a member of it",
|
|
10349
10384
|
placeholder: "token"
|
|
10350
10385
|
})
|
|
10351
10386
|
}
|
|
10352
10387
|
},
|
|
10353
10388
|
help: {
|
|
10354
10389
|
summary: "Transfer a Project to another workspace after exact id confirmation",
|
|
10390
|
+
description: "Moves a project, with everything in it, out of the current workspace. Name the receiving workspace with --to-workspace when you are logged in to it too, or pass --recipient-token when someone else owns it. The exact project id is the consent token.",
|
|
10355
10391
|
examples: ["project transfer proj_123 --to-workspace \"Prisma Labs\" --confirm proj_123", "project transfer proj_123 --recipient-token <token> --confirm proj_123"]
|
|
10356
10392
|
},
|
|
10357
10393
|
needs: { credentials: true },
|
|
@@ -11549,6 +11585,7 @@ async function resolveServiceDomainTarget(ctx, options) {
|
|
|
11549
11585
|
const serviceCreateCommand = defineCommand({
|
|
11550
11586
|
help: {
|
|
11551
11587
|
summary: "Create a service in a project",
|
|
11588
|
+
description: "Registers a service on a Branch ahead of its first deploy. Deploying through a connected repository or 'deploy' creates services automatically, so reach for this only when a service must exist before anything has been deployed to it.",
|
|
11552
11589
|
examples: ["service create my-service", "service create my-service --region us-east-1 --branch main"]
|
|
11553
11590
|
},
|
|
11554
11591
|
args: {
|
|
@@ -11558,15 +11595,15 @@ const serviceCreateCommand = defineCommand({
|
|
|
11558
11595
|
}) },
|
|
11559
11596
|
flags: {
|
|
11560
11597
|
project: flag.string({
|
|
11561
|
-
brief: "Project id or name",
|
|
11598
|
+
brief: "Project id or name (default: the project this directory is linked to)",
|
|
11562
11599
|
placeholder: "id-or-name"
|
|
11563
11600
|
}),
|
|
11564
11601
|
region: flag.string({
|
|
11565
|
-
brief: "Prisma Compute region id",
|
|
11602
|
+
brief: "Prisma Compute region id; set it when the service must run near a location",
|
|
11566
11603
|
placeholder: "region"
|
|
11567
11604
|
}),
|
|
11568
11605
|
branch: flag.string({
|
|
11569
|
-
brief: "Branch
|
|
11606
|
+
brief: "Branch to create the service on (default: the default branch)",
|
|
11570
11607
|
placeholder: "branch"
|
|
11571
11608
|
})
|
|
11572
11609
|
}
|
|
@@ -11718,7 +11755,8 @@ function destroyProgressReporter(ctx, serviceName) {
|
|
|
11718
11755
|
//#region src/commands/service/delete.ts
|
|
11719
11756
|
const serviceDeleteCommand = defineCommand({
|
|
11720
11757
|
help: {
|
|
11721
|
-
summary: "Delete
|
|
11758
|
+
summary: "Delete a service from one branch",
|
|
11759
|
+
description: "Removes the service from the targeted Branch only: its versions stop serving and its URL goes away. The same service on other branches is untouched. Pass the confirmation token with --confirm to run non-interactively.",
|
|
11722
11760
|
examples: ["service delete my-service", "service delete my-service --confirm my-service"]
|
|
11723
11761
|
},
|
|
11724
11762
|
args: {
|
|
@@ -11789,11 +11827,11 @@ function domainTargetArgs() {
|
|
|
11789
11827
|
return {
|
|
11790
11828
|
flags: {
|
|
11791
11829
|
service: flag.string({
|
|
11792
|
-
brief: "Service id or name",
|
|
11830
|
+
brief: "Service id or name the domain belongs to",
|
|
11793
11831
|
placeholder: "name"
|
|
11794
11832
|
}),
|
|
11795
11833
|
project: flag.string({
|
|
11796
|
-
brief: "Project id or name",
|
|
11834
|
+
brief: "Project id or name (default: the project this directory is linked to)",
|
|
11797
11835
|
placeholder: "id-or-name"
|
|
11798
11836
|
}),
|
|
11799
11837
|
branch: flag.string({
|
|
@@ -11812,6 +11850,7 @@ function domainTargetArgs() {
|
|
|
11812
11850
|
const serviceDomainAddCommand = defineCommand({
|
|
11813
11851
|
help: {
|
|
11814
11852
|
summary: "Register a custom domain on the service's production branch",
|
|
11853
|
+
description: "Points a hostname you own at the service instead of its generated URL. After registering, create the DNS record the platform asks for, then 'service domain wait' blocks until verification and TLS provisioning finish.",
|
|
11815
11854
|
examples: ["service domain add shop.acme.com --service my-service"]
|
|
11816
11855
|
},
|
|
11817
11856
|
args: domainTargetArgs(),
|
|
@@ -11844,6 +11883,7 @@ const serviceDomainAddCommand = defineCommand({
|
|
|
11844
11883
|
const serviceDomainDeleteCommand = defineCommand({
|
|
11845
11884
|
help: {
|
|
11846
11885
|
summary: "Delete a custom domain from the service",
|
|
11886
|
+
description: "The hostname stops routing to the service immediately; the service itself and its generated URL keep working. Pass the hostname with --confirm to run non-interactively.",
|
|
11847
11887
|
examples: ["service domain delete shop.acme.com --service my-service", "service domain delete shop.acme.com --service my-service --confirm shop.acme.com"]
|
|
11848
11888
|
},
|
|
11849
11889
|
args: domainTargetArgs(),
|
|
@@ -11874,6 +11914,7 @@ const serviceDomainDeleteCommand = defineCommand({
|
|
|
11874
11914
|
const serviceDomainRetryCommand = defineCommand({
|
|
11875
11915
|
help: {
|
|
11876
11916
|
summary: "Retry custom domain DNS verification and TLS provisioning",
|
|
11917
|
+
description: "Run it after fixing what made the domain fail, typically a missing or wrong DNS record reported by 'service domain show'.",
|
|
11877
11918
|
examples: ["service domain retry shop.acme.com --service my-service"]
|
|
11878
11919
|
},
|
|
11879
11920
|
args: domainTargetArgs(),
|
|
@@ -11902,6 +11943,7 @@ const serviceDomainRetryCommand = defineCommand({
|
|
|
11902
11943
|
const serviceDomainShowCommand = defineCommand({
|
|
11903
11944
|
help: {
|
|
11904
11945
|
summary: "Show custom domain status and certificate details",
|
|
11946
|
+
description: "Reports where the domain is in its lifecycle: DNS verification, TLS certificate issuance, active, or failed with the fix to apply. Check here first when a domain is not serving.",
|
|
11905
11947
|
examples: ["service domain show shop.acme.com --service my-service"]
|
|
11906
11948
|
},
|
|
11907
11949
|
args: domainTargetArgs(),
|
|
@@ -11968,6 +12010,7 @@ const DURATION = /^(\d+)(ms|s|m|h)$/;
|
|
|
11968
12010
|
const serviceDomainWaitCommand = defineCommand({
|
|
11969
12011
|
help: {
|
|
11970
12012
|
summary: "Wait until a custom domain is active or failed",
|
|
12013
|
+
description: "Blocks while DNS verification and TLS provisioning run, then exits with the outcome; useful in scripts and CI after 'service domain add'.",
|
|
11971
12014
|
examples: ["service domain wait shop.acme.com --service my-service", "service domain wait shop.acme.com --service my-service --timeout 30m"]
|
|
11972
12015
|
},
|
|
11973
12016
|
args: {
|
|
@@ -12032,15 +12075,16 @@ const serviceDomainWaitCommand = defineCommand({
|
|
|
12032
12075
|
const serviceListCommand = defineCommand({
|
|
12033
12076
|
help: {
|
|
12034
12077
|
summary: "List the services in a project",
|
|
12078
|
+
description: "A service is one HTTP application (a frontend or a backend) deployed on a Branch of the project. Each deploy produces a service version; at most one version serves traffic at a time.",
|
|
12035
12079
|
examples: ["service list", "service list --project my-app --json"]
|
|
12036
12080
|
},
|
|
12037
12081
|
args: { flags: {
|
|
12038
12082
|
project: flag.string({
|
|
12039
|
-
brief: "Project id or name",
|
|
12083
|
+
brief: "Project id or name (default: the project this directory is linked to)",
|
|
12040
12084
|
placeholder: "id-or-name"
|
|
12041
12085
|
}),
|
|
12042
12086
|
branch: flag.string({
|
|
12043
|
-
brief: "Branch
|
|
12087
|
+
brief: "Branch the services live on (default: the default branch)",
|
|
12044
12088
|
placeholder: "branch"
|
|
12045
12089
|
})
|
|
12046
12090
|
} },
|
|
@@ -12303,6 +12347,7 @@ async function resolveLogsTarget(ctx, options) {
|
|
|
12303
12347
|
const serviceLogsCommand = defineSessionCommand({
|
|
12304
12348
|
help: {
|
|
12305
12349
|
summary: "Read logs for a version of the service",
|
|
12350
|
+
description: "Reads the live version's logs by default; point --version-id at any other version, such as a failed build being debugged. --follow keeps streaming new lines, and --tail or --from-start choose where reading starts.",
|
|
12306
12351
|
examples: [
|
|
12307
12352
|
"service logs my-service",
|
|
12308
12353
|
"service logs my-service --tail 500",
|
|
@@ -12325,7 +12370,7 @@ const serviceLogsCommand = defineSessionCommand({
|
|
|
12325
12370
|
placeholder: "name"
|
|
12326
12371
|
}),
|
|
12327
12372
|
versionId: flag.string({
|
|
12328
|
-
brief: "Service version id to read (default: the live version)",
|
|
12373
|
+
brief: "Service version id to read; use for a failed or stopped version (default: the live version)",
|
|
12329
12374
|
placeholder: "id"
|
|
12330
12375
|
}),
|
|
12331
12376
|
tail: flag.number({
|
|
@@ -12417,7 +12462,8 @@ const serviceOpenCommand = defineCommand({
|
|
|
12417
12462
|
//#region src/commands/service/show.ts
|
|
12418
12463
|
const serviceShowCommand = defineCommand({
|
|
12419
12464
|
help: {
|
|
12420
|
-
summary: "Show
|
|
12465
|
+
summary: "Show a service and the version currently serving traffic",
|
|
12466
|
+
description: "Shows the version serving traffic and the service's live URL, when the service has a live version; a service that has never deployed has none yet. Inspect other versions with 'service version list' and 'service version show'.",
|
|
12421
12467
|
examples: ["service show my-service", "service show my-service --branch feature-x"]
|
|
12422
12468
|
},
|
|
12423
12469
|
args: {
|
|
@@ -12465,6 +12511,7 @@ const serviceShowCommand = defineCommand({
|
|
|
12465
12511
|
const serviceVersionDeleteCommand = defineCommand({
|
|
12466
12512
|
help: {
|
|
12467
12513
|
summary: "Delete a service version and the artifact it holds",
|
|
12514
|
+
description: "Permanently removes the version and its built artifact, so it can no longer be started or rolled back to. Pass the exact version id with --confirm to run non-interactively.",
|
|
12468
12515
|
examples: ["service version delete cpv_123", "service version delete cpv_123 --confirm cpv_123"]
|
|
12469
12516
|
},
|
|
12470
12517
|
args: { positionals: { version: positional.string({
|
|
@@ -12510,6 +12557,7 @@ const serviceVersionDeleteCommand = defineCommand({
|
|
|
12510
12557
|
const serviceVersionListCommand = defineCommand({
|
|
12511
12558
|
help: {
|
|
12512
12559
|
summary: "List versions of the service",
|
|
12560
|
+
description: "Every deploy produces an immutable service version; at most one serves traffic at a time. Use the listed ids with 'service version' promote, rollback, start, stop, and delete.",
|
|
12513
12561
|
examples: ["service version list my-service", "service version list my-service --branch feature-x"]
|
|
12514
12562
|
},
|
|
12515
12563
|
args: {
|
|
@@ -12554,6 +12602,7 @@ const serviceVersionListCommand = defineCommand({
|
|
|
12554
12602
|
const serviceVersionPromoteCommand = defineCommand({
|
|
12555
12603
|
help: {
|
|
12556
12604
|
summary: "Promote a service version to production by rebuilding with production env vars",
|
|
12605
|
+
description: "The normal release path: take a version that proved itself on a preview branch, rebuild its source with production environment variables, and switch production traffic to the result. To undo a release, use 'service version rollback', which needs no rebuild.",
|
|
12557
12606
|
examples: ["service version promote cpv_123"]
|
|
12558
12607
|
},
|
|
12559
12608
|
args: { positionals: { version: positional.string({
|
|
@@ -12615,6 +12664,7 @@ const serviceVersionPromoteCommand = defineCommand({
|
|
|
12615
12664
|
const serviceVersionRollbackCommand = defineCommand({
|
|
12616
12665
|
help: {
|
|
12617
12666
|
summary: "Roll back production to a previous service version",
|
|
12667
|
+
description: "Returns production traffic to an already-built version without rebuilding, which makes it the fastest way out of a bad release. Defaults to the version before the live one; name an exact target with --to.",
|
|
12618
12668
|
examples: [
|
|
12619
12669
|
"service version rollback my-service",
|
|
12620
12670
|
"service version rollback my-service --to cpv_123",
|
|
@@ -12632,7 +12682,7 @@ const serviceVersionRollbackCommand = defineCommand({
|
|
|
12632
12682
|
placeholder: "name"
|
|
12633
12683
|
}),
|
|
12634
12684
|
to: flag.string({
|
|
12635
|
-
brief: "Version id to roll back to (default: the version before the live one)",
|
|
12685
|
+
brief: "Version id to roll back to; use when the last good version is further back (default: the version before the live one)",
|
|
12636
12686
|
placeholder: "version"
|
|
12637
12687
|
})
|
|
12638
12688
|
},
|
|
@@ -12709,6 +12759,7 @@ const serviceVersionRollbackCommand = defineCommand({
|
|
|
12709
12759
|
const serviceVersionShowCommand = defineCommand({
|
|
12710
12760
|
help: {
|
|
12711
12761
|
summary: "Show a service version in detail",
|
|
12762
|
+
description: "Version ids are globally unique, so the id alone is the complete target: no --project or --branch scope is needed.",
|
|
12712
12763
|
examples: ["service version show cpv_123"]
|
|
12713
12764
|
},
|
|
12714
12765
|
args: { positionals: { version: positional.string({
|
|
@@ -12862,6 +12913,7 @@ const skillsCommandFamily = defineCommandFamily({
|
|
|
12862
12913
|
list: defineCommand({
|
|
12863
12914
|
help: {
|
|
12864
12915
|
summary: "Show which Prisma agent skills are installed in this project",
|
|
12916
|
+
description: "Shows each skill, the package and version it came from, and whether the synced copies are current. Run 'skills sync' to bring stale copies up to date.",
|
|
12865
12917
|
examples: ["skills list", "skills list --json"]
|
|
12866
12918
|
},
|
|
12867
12919
|
needs: { config: skillsConfigSection },
|
|
@@ -12981,26 +13033,146 @@ const ormCommandFamily$1 = ormCommandFamily;
|
|
|
12981
13033
|
* text that belongs to them; both halves are spread in below. */
|
|
12982
13034
|
const telemetry = telemetryCommandGroup({ docsUrl: CLI_DOCS_URL });
|
|
12983
13035
|
const cliGroups = {
|
|
12984
|
-
auth: {
|
|
12985
|
-
|
|
12986
|
-
|
|
12987
|
-
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
|
|
12993
|
-
|
|
12994
|
-
|
|
12995
|
-
|
|
12996
|
-
|
|
12997
|
-
|
|
12998
|
-
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
|
|
13036
|
+
auth: {
|
|
13037
|
+
brief: "Manage authentication for the Prisma Platform. Sign in and out, inspect identity, switch workspaces",
|
|
13038
|
+
description: "Signing in opens a browser flow and stores a session for one workspace: the account-level container that holds your Projects, members, and billing. Commands act on the current session's workspace; log in once per workspace and switch with the 'workspace' subcommands. A PRISMA_SERVICE_TOKEN environment credential overrides stored sessions, which is the way to authenticate CI."
|
|
13039
|
+
},
|
|
13040
|
+
project: {
|
|
13041
|
+
brief: "Manage Prisma Platform projects. CRUD, link a directory, transfer ownership, manage environment variables",
|
|
13042
|
+
description: "A Project groups one product or codebase. It is the child of a workspace and the parent of Branches: isolated environments, one per Git branch, each holding its own services, databases, and buckets. 'Linking' connects a local directory to a Project: the link is stored locally, and every project-scoped command run in that directory targets the linked project unless --project names another. 'create' links automatically; 'link' points a directory at an existing Project; 'show' reports the link.",
|
|
13043
|
+
workflow: [
|
|
13044
|
+
{
|
|
13045
|
+
run: "project create my-app",
|
|
13046
|
+
brief: "Create a Project, link this directory"
|
|
13047
|
+
},
|
|
13048
|
+
{
|
|
13049
|
+
run: "git connect",
|
|
13050
|
+
brief: "Connect GitHub so every push deploys"
|
|
13051
|
+
},
|
|
13052
|
+
{
|
|
13053
|
+
run: "project env add KEY=value --role preview",
|
|
13054
|
+
brief: "Set env vars services get at deploy"
|
|
13055
|
+
}
|
|
13056
|
+
]
|
|
13057
|
+
},
|
|
13058
|
+
"project env": {
|
|
13059
|
+
brief: "Manage a project's environment variables. Add, update, list, and delete values per scope",
|
|
13060
|
+
description: "Variables live in scopes: production, preview (shared by every preview branch), or a single branch's override. Values reach services when they deploy, and are write-only afterwards: list shows metadata, never values."
|
|
13061
|
+
},
|
|
13062
|
+
postgres: {
|
|
13063
|
+
brief: "Manage Prisma Postgres databases. CRUD, usage metrics, backups, and connection credentials",
|
|
13064
|
+
description: "Databases are branch-bound: each belongs to a Branch, the isolated environment for one Git branch of a project, so commands take --branch to target one. Address a database by its id (db_...) or name. Connection URLs are secrets that print exactly once, at create or rotate; nothing shows them again. 'backup' restores platform-taken backups, and 'connection' manages per-consumer credentials.",
|
|
13065
|
+
workflow: [
|
|
13066
|
+
{
|
|
13067
|
+
run: "postgres create app-db",
|
|
13068
|
+
brief: "Create a database; its URL prints once"
|
|
13069
|
+
},
|
|
13070
|
+
{
|
|
13071
|
+
run: "postgres connection create app-db --name ci",
|
|
13072
|
+
brief: "Mint one credential per consumer"
|
|
13073
|
+
},
|
|
13074
|
+
{
|
|
13075
|
+
run: "postgres connection rotate conn_123",
|
|
13076
|
+
brief: "Replace a leaked credential"
|
|
13077
|
+
}
|
|
13078
|
+
]
|
|
13079
|
+
},
|
|
13080
|
+
"postgres backup": {
|
|
13081
|
+
brief: "Inspect and restore database backups. The platform takes them automatically",
|
|
13082
|
+
description: "The platform takes backups automatically; there is no backup-create command. Restore replaces a database's current state with a backup's contents after exact id confirmation."
|
|
13083
|
+
},
|
|
13084
|
+
"postgres connection": {
|
|
13085
|
+
brief: "Manage database connection credentials. Create, rotate, and revoke per-consumer connection URLs",
|
|
13086
|
+
description: "A connection is one independent credential (a connection URL) for one database. Give each consumer (an app, CI, a teammate) its own, so one can be rotated or revoked without breaking the others. URLs print once, at create or rotate; list shows metadata only."
|
|
13087
|
+
},
|
|
13088
|
+
bucket: {
|
|
13089
|
+
brief: "Manage S3-compatible object-store buckets for a project. CRUD operations and access keys",
|
|
13090
|
+
description: "A bucket is blob storage for files and uploads, bound to one Branch of a project and reachable through the standard S3 API. Access goes through S3-compatible keys minted per consumer with 'bucket key create', which prints credentials (endpoint, key id, secret) exactly once.",
|
|
13091
|
+
workflow: [{
|
|
13092
|
+
run: "bucket create --name uploads",
|
|
13093
|
+
brief: "Create a bucket in the branch"
|
|
13094
|
+
}, {
|
|
13095
|
+
run: "bucket key create bkt_123",
|
|
13096
|
+
brief: "Mint S3 credentials, shown once"
|
|
13097
|
+
}]
|
|
13098
|
+
},
|
|
13099
|
+
"bucket key": {
|
|
13100
|
+
brief: "Manage a bucket's access keys. Create, list, and revoke per-consumer S3 credentials",
|
|
13101
|
+
description: "A key is one consumer's S3-compatible credentials for one bucket, with role read or read_write. Secrets print once at create; delete revokes access immediately."
|
|
13102
|
+
},
|
|
13103
|
+
branch: {
|
|
13104
|
+
brief: "View Platform branches: the isolated environment behind each Git branch",
|
|
13105
|
+
description: "A Branch maps to a Git branch of the connected repository. Each is an isolated environment with its own services, databases, buckets, and environment variables: the production branch serves live traffic, every other branch is a preview."
|
|
13106
|
+
},
|
|
13107
|
+
git: {
|
|
13108
|
+
brief: "Manage the GitHub connection that deploys on push. Connect or disconnect a repository",
|
|
13109
|
+
description: "Connecting a GitHub repository turns on deploy-on-push: pushing a Git branch builds and deploys it to a matching Platform Branch. Disconnecting stops push deploys without touching anything already deployed."
|
|
13110
|
+
},
|
|
13111
|
+
service: {
|
|
13112
|
+
brief: "Manage deployed services. Logs, versions, promote and rollback releases, custom domains",
|
|
13113
|
+
description: "A service is one HTTP application (a frontend or a backend) deployed on a Branch. Every deploy produces an immutable service version; at most one serves traffic at a time. The 'version' subcommands move which one that is: promote releases a preview build into production, rollback returns production to a previous version without rebuilding. 'logs' reads and streams output, and 'domain' attaches hostnames you own.",
|
|
13114
|
+
workflow: [
|
|
13115
|
+
{
|
|
13116
|
+
run: "service logs my-api --follow",
|
|
13117
|
+
brief: "Stream the live version's logs"
|
|
13118
|
+
},
|
|
13119
|
+
{
|
|
13120
|
+
run: "service version promote cpv_123",
|
|
13121
|
+
brief: "Release a preview build to production"
|
|
13122
|
+
},
|
|
13123
|
+
{
|
|
13124
|
+
run: "service version rollback my-api",
|
|
13125
|
+
brief: "Put production back on the previous version"
|
|
13126
|
+
}
|
|
13127
|
+
]
|
|
13128
|
+
},
|
|
13129
|
+
"service domain": {
|
|
13130
|
+
brief: "Manage custom domains for a service. Register hostnames, drive DNS and TLS verification, inspect status",
|
|
13131
|
+
description: "Custom domains point hostnames you own at a service's production branch. After add, create the DNS record the platform reports; wait and retry drive DNS verification and TLS provisioning to done.",
|
|
13132
|
+
workflow: [
|
|
13133
|
+
{
|
|
13134
|
+
run: "service domain add shop.acme.com --service my-api",
|
|
13135
|
+
brief: "Register the hostname"
|
|
13136
|
+
},
|
|
13137
|
+
{
|
|
13138
|
+
run: "service domain wait shop.acme.com --service my-api",
|
|
13139
|
+
brief: "Block until active or failed"
|
|
13140
|
+
},
|
|
13141
|
+
{
|
|
13142
|
+
run: "service domain show shop.acme.com --service my-api",
|
|
13143
|
+
brief: "Inspect status and certificate"
|
|
13144
|
+
}
|
|
13145
|
+
]
|
|
13146
|
+
},
|
|
13147
|
+
"service version": {
|
|
13148
|
+
brief: "Manage a service's deploy versions. List, inspect, promote, roll back, start, stop, delete",
|
|
13149
|
+
description: "Every deploy produces an immutable version; at most one serves traffic at a time on each branch. List and show inspect them. Promote and rollback choose which version serves traffic; start, stop, and delete drive one version's lifecycle."
|
|
13150
|
+
},
|
|
13151
|
+
"auth workspace": {
|
|
13152
|
+
brief: "Manage stored workspace sessions. List them, switch the current one, end one",
|
|
13153
|
+
description: "One session is stored per workspace you log in to. List them, switch the current one, or end one without touching the others."
|
|
13154
|
+
},
|
|
13155
|
+
contract: {
|
|
13156
|
+
brief: "Author your data contract: the PSL source of your data model. Emit, infer, format",
|
|
13157
|
+
description: "A contract is the declarative description of your application's data model, authored in PSL (Prisma Schema Language). Migrations are planned from it, and live databases are verified and signed against it. Emit generates its artifacts, infer derives a contract from an existing database, and format normalizes the source."
|
|
13158
|
+
},
|
|
13159
|
+
db: {
|
|
13160
|
+
brief: "Run contract operations against a live database. Verify, sign, update, migrate",
|
|
13161
|
+
description: "These commands run against a live database, addressed with --db <url>. Verify checks the database against the contract (the PSL description of your data model), sign marks it as matching, and update and migrate advance its schema."
|
|
13162
|
+
},
|
|
13163
|
+
migration: {
|
|
13164
|
+
brief: "Manage on-disk migrations derived from contract changes. Plan, inspect, check, track history",
|
|
13165
|
+
description: "A migration is an on-disk package describing one schema change, derived from edits to your contract (the PSL description of your data model). Plan writes one; the rest inspect, check integrity, and track what has run where. Apply them with 'db migrate'."
|
|
13166
|
+
},
|
|
13167
|
+
"migration ref": {
|
|
13168
|
+
brief: "Manage refs: named pointers to contracts. Set, list, delete",
|
|
13169
|
+
description: "A ref is a named pointer to a contract, letting commands target a contract by a stable name. Set, list, and delete refs here."
|
|
13170
|
+
},
|
|
13002
13171
|
orm: { brief: "Initialize a Prisma ORM project" },
|
|
13003
|
-
skills: {
|
|
13172
|
+
skills: {
|
|
13173
|
+
brief: "Manage Prisma skills for AI coding agents. Sync and list the instruction files",
|
|
13174
|
+
description: "Agent skills are instruction files that teach AI coding agents (Claude Code, Cursor, and others) how to use the installed Prisma packages. They ship inside the packages; sync copies them into the directories the agent harnesses read."
|
|
13175
|
+
},
|
|
13004
13176
|
...telemetry.groups
|
|
13005
13177
|
};
|
|
13006
13178
|
const mountedCommands = {
|
|
@@ -13103,7 +13275,25 @@ function buildCli() {
|
|
|
13103
13275
|
commands: mountedCommands,
|
|
13104
13276
|
help: {
|
|
13105
13277
|
tagline: "The Prisma Developer Platform, from your terminal",
|
|
13106
|
-
description: "Deploy your app with isolated infrastructure for every branch.",
|
|
13278
|
+
description: "Deploy your app with isolated infrastructure for every branch: a Project groups one product, and each of its Branches maps to a Git branch with its own services, databases, and buckets. The production branch serves live traffic; every other branch is a preview.",
|
|
13279
|
+
workflow: [
|
|
13280
|
+
{
|
|
13281
|
+
run: "auth login",
|
|
13282
|
+
brief: "Sign in to your Prisma workspace"
|
|
13283
|
+
},
|
|
13284
|
+
{
|
|
13285
|
+
run: "project create my-app",
|
|
13286
|
+
brief: "Create a Project, link this directory"
|
|
13287
|
+
},
|
|
13288
|
+
{
|
|
13289
|
+
run: "git connect",
|
|
13290
|
+
brief: "Connect GitHub so every push deploys"
|
|
13291
|
+
},
|
|
13292
|
+
{
|
|
13293
|
+
run: "deploy",
|
|
13294
|
+
brief: "Or build and deploy straight from this machine"
|
|
13295
|
+
}
|
|
13296
|
+
],
|
|
13107
13297
|
examples: [
|
|
13108
13298
|
"auth login",
|
|
13109
13299
|
"project list",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/cli",
|
|
3
|
-
"version": "8.0.0-rc.13-dev.
|
|
3
|
+
"version": "8.0.0-rc.13-dev.93",
|
|
4
4
|
"description": "Command-line interface for the Prisma Developer Platform.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@manypkg/tools": "^2.1.2",
|
|
43
43
|
"@prisma/cli-engine": "0.3.0",
|
|
44
|
-
"@prisma/composer-cli": "0.17.0-dev.
|
|
44
|
+
"@prisma/composer-cli": "0.17.0-dev.2",
|
|
45
45
|
"@prisma/compute-sdk": "0.42.0",
|
|
46
46
|
"@prisma/management-api-sdk": "1.69.0",
|
|
47
|
-
"@prisma/orm-toolchain": "8.0.0-rc.8-dev.
|
|
47
|
+
"@prisma/orm-toolchain": "8.0.0-rc.8-dev.18",
|
|
48
48
|
"@vercel/detect-agent": "^1.2.3",
|
|
49
49
|
"better-result": "^2.9.2",
|
|
50
50
|
"dotenv": "^17.4.2",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"open": "^11.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@prisma/composer": "0.17.0-dev.
|
|
55
|
+
"@prisma/composer": "0.17.0-dev.2",
|
|
56
56
|
"@prisma/credentials-store": "^7.8.0",
|
|
57
|
-
"@repo/cli-conformance": "8.0.0-rc.13-dev.
|
|
58
|
-
"@repo/cli-telemetry": "8.0.0-rc.13-dev.
|
|
59
|
-
"@repo/tsconfig": "8.0.0-rc.13-dev.
|
|
57
|
+
"@repo/cli-conformance": "8.0.0-rc.13-dev.93",
|
|
58
|
+
"@repo/cli-telemetry": "8.0.0-rc.13-dev.93",
|
|
59
|
+
"@repo/tsconfig": "8.0.0-rc.13-dev.93",
|
|
60
60
|
"@types/node": "^22.19.19",
|
|
61
61
|
"tsdown": "^0.21.10",
|
|
62
62
|
"tsx": "^4.22.4",
|