Commands
This document describes the Prisma Data Platform's integrated Prisma CLI commands, arguments, and options.
Getting startedβ
To get started, ensure you have the Prisma CLI updated to version 5.10.0
or later. This is necessary to access the Platform through the Prisma CLI.
π‘ When using commands, always start with prisma platform
and include the --early-access
flag to enable the use of the Prisma Data Platform whilst still in early access.
Authenticationβ
platform
β
auth login
β
Opens a browser window that allows you to log into your Prisma Data Platform account or create a new one.
npx prisma platform auth login --early-access
auth logout
β
Logs out of your Prisma Data Platform account.
npx prisma platform auth logout --early-access
auth show
β
Displays information about the currently authenticated user.
npx prisma platform auth show --early-access
Workspace Managementβ
platform
β
workspace show
β
Lists all workspaces available to your account.
npx prisma platform workspace show --early-access
Project Managementβ
platform
β
project show
β
Lists all projects within the specified workspace.
npx prisma platform project show \
--workspace $INSERT_WORKSPACE_ID \
--early-access
Argumentsβ
Argument | Type | Required | Description |
---|---|---|---|
--workspace -w | string | yes | The workspace id. Hint: You can view your workspace ids with the workspace show command. |
project create
β
Creates a new project within the specified workspace.
npx prisma platform project create \
--workspace $INSERT_WORKSPACE_ID \
--name "INSERT_PROJECT_NAME" \
--early-access
Argumentsβ
Argument | Type | Required | Description |
---|---|---|---|
--workspace -w | string | yes | The workspace id .Hint: You can view your workspace ids with the workspace show command. |
--name -n | string | no | The display name for the project. If omitted, a default project name will be generated for you. |
project delete
β
Deletes the specified project.
npx prisma platform project delete \
--project $INSERT_PROJECT_ID \
--early-access
Argumentsβ
Argument | Type | Required | Description |
---|---|---|---|
--project -p | string | yes | The project id .Hint: You can view your project ids with the project show command. |
Environment Managementβ
platform
β
environment show
β
Lists all environments within the specified project.
npx prisma platform environment show \
--project $INSERT_PROJECT_ID \
--early-access
Argumentsβ
Argument | Type | Required | Description |
---|---|---|---|
--project -p | string | yes | The project id .Hint: You can view your project ids with the project show command. |
environment create
β
Creates a new environment within the specified project.
npx prisma platform environment create \
--project $INSERT_PROJECT_ID \
--name $INSERT_ENVIRONMENT_NAME \
--early-access
Argumentsβ
Argument | Type | Required | Description |
---|---|---|---|
--project -p | string | yes | The project id .Hint: You can view your project ids with the project show command. |
--name -n | string | no | The display name for the environment. If omitted, a default environment name will be generated for you. |
environment delete
β
Deletes the specified environment.
npx prisma platform environment delete \
--environment $INSERT_ENVIRONMENT_ID \
--early-access
Argumentsβ
Argument | Type | Required | Description |
---|---|---|---|
--environment -e | string | yes | The environment id .Hint: You can view your environment ids with the environment show command. |
API Key Managementβ
platform
β
apikey show
β
Lists all API keys for the specified environment.
npx prisma platform apikey show \
--environment $INSERT_ENVIRONMENT_ID \
--early-access
Argumentsβ
Argument | Type | Required | Description |
---|---|---|---|
--environment -e | string | yes | The environment id .Hint: You can view your environment ids with the environment show command. |
apikey create
β
Creates a new API key for the specified project.
npx prisma platform apikey create \
--environment $INSERT_ENVIRONMENT_ID \
--name $INSERT_API_KEY_NAME \
--early-access
Argumentsβ
Argument | Type | Required | Description |
---|---|---|---|
--environment -e | string | yes | The environment id .Hint: You can view your environment ids with the environment show command. |
--name -n | string | no | The display name for the API key. If omitted, a default API key name will be generated for you. |
apikey delete
β
Deletes the specified API Key.
npx prisma platform apikey delete \
--apikey $INSERT_API_KEY_ID \
--early-access
Argumentsβ
Argument | Type | Required | Description |
---|---|---|---|
--apikey | string | yes | The API key id .Hint: You can view your API key ids with the apikey show command. |
Prisma Accelerateβ
platform
β
accelerate enable
β
Enables Prisma Accelerate for the specified environment.
npx prisma platform accelerate enable \
--environment $INSERT_ENVIRONMENT_ID \
--url "postgresql://username:password@host:port/database" \
--region $INSERT_CONNECTION_POOL_REGION \
--apikey true \
--early-access
Argumentsβ
Argument | Type | Required | Description |
---|---|---|---|
--environment -e | string | yes | The environment id .Hint: You can view your environment ids with the environment show command. |
--url | string | yes | Your database connection string. |
--region | string | no | The region for Prisma Accelerateβs managed connection pool. View the list of available regions here. Hint: Select the region nearest your database for optimal latency. |
--apikey | boolean | no | If yes, a new API key will be generated for the associated environment. |
accelerate disable
β
Disables Prisma Accelerate for the specified environment.
npx prisma platform accelerate disable \
--environment $INSERT_ENVIRONMENT_ID \
--early-access
Argumentsβ
Argument | Type | Required | Description |
---|---|---|---|
--environment -e | string | yes | The environment id .Hint: You can view your environment ids with the environment show command. |
Prisma Pulseβ
platform
β
pulse enable
β
Enables Prisma Pulse for the specified environment.
npx prisma platform pulse enable \
--environment $INSERT_ENVIRONMENT_ID \
--url "postgresql://username:password@host:port/database" \
--region $INSERT_REGION \
--apikey true \
--early-access
Argumentsβ
Argument | Type | Required | Description |
---|---|---|---|
--environment -e | string | yes | The environment id .Hint: You can view your environment ids with the environment show command. |
--url | string | yes | Your database connection string. |
--region | string | no | The region for Prisma Pulse. |
--apikey | boolean | no | If yes, a new API key will be generated for the associated environment. |
pulse disable
β
Disables Prisma Pulse for the specified environment.
npx prisma platform pulse disable \
--environment $INSERT_ENVIRONMENT_ID \
--early-access
Argumentsβ
Argument | Type | Required | Description |
---|---|---|---|
--environment -e | string | yes | The environment id .Hint: You can view your environment ids with the environment show command. |
Helpβ
Have a question? Let us know, weβre here to help. Reach out to us on Discord.