platform
Manage Prisma Console workspaces, projects, environments, and connection strings
The prisma platform command provides access to Prisma Console functionality for managing workspaces, projects, environments, and connection strings.
Usage
prisma platform [subcommand] [options] --early-accessSubcommands
| Subcommand | Description |
|---|---|
auth | Manage Console authentication |
workspace | Manage workspaces |
project | Manage projects |
environment | Manage environments |
apikey | Manage connection strings |
Examples
Authenticate with Console
Log in to your Console account (opens a browser window for GitHub authentication):
npx prisma platform auth login --early-accessDisplay information about the currently authenticated user:
npx prisma platform auth show --early-accessLog out of your Console account:
npx prisma platform auth logout --early-accessManage workspaces
List all workspaces available to your account:
npx prisma platform workspace show --early-accessManage projects
List all projects within a workspace:
npx prisma platform project show --workspace $WORKSPACE_ID --early-accessCreate a new project within a workspace:
npx prisma platform project create --workspace $WORKSPACE_ID --name "My Project" --early-accessDelete a project:
npx prisma platform project delete --project $PROJECT_ID --early-accessManage environments
List all environments within a project:
npx prisma platform environment show --project $PROJECT_ID --early-accessCreate a new environment within a project:
npx prisma platform environment create --project $PROJECT_ID --name "production" --early-accessDelete an environment:
npx prisma platform environment delete --environment $ENVIRONMENT_ID --early-accessManage connection strings
List all connection strings for an environment:
npx prisma platform apikey show --environment $ENVIRONMENT_ID --early-accessCreate a new connection string for an environment:
npx prisma platform apikey create --environment $ENVIRONMENT_ID --name "production-key" --early-accessDelete a connection string:
npx prisma platform apikey delete --apikey $API_KEY_ID --early-accessOptions
Authentication commands
| Option | Description |
|---|---|
-h, --help | Display help message |
Workspace commands
| Option | Description |
|---|---|
-h, --help | Display help message |
Project commands
| Option | Description |
|---|---|
-h, --help | Display help message |
-w, --workspace | The workspace ID (required for show and create commands) |
-p, --project | The project ID (required for delete command) |
-n, --name | Display name for the project (optional for create command) |
Environment commands
| Option | Description |
|---|---|
-h, --help | Display help message |
-p, --project | The project ID (required for show and create commands) |
-e, --environment | The environment ID (required for delete command) |
-n, --name | Display name for the environment (optional for create command) |
Connection string commands
| Option | Description |
|---|---|
-h, --help | Display help message |
-e, --environment | The environment ID (required for show and create commands) |
-a, --apikey | The connection string ID (required for delete command) |
-n, --name | Display name for the connection string (optional for create command) |
Global options
| Option | Description |
|---|---|
--early-access | Enable early access Console features (required for all commands) |