apps/docs/content/docs/cli/console/platform.mdx
The prisma platform command provides access to Prisma Console functionality for managing workspaces, projects, environments, and connection strings.
prisma platform [subcommand] [options] --early-access
| Subcommand | Description |
|---|---|
auth | Manage Console authentication |
workspace | Manage workspaces |
project | Manage projects |
environment | Manage environments |
apikey | Manage connection strings |
Log in to your Console account (opens a browser window for GitHub authentication):
npx prisma platform auth login --early-access
Display information about the currently authenticated user:
npx prisma platform auth show --early-access
Log out of your Console account:
npx prisma platform auth logout --early-access
List all workspaces available to your account:
npx prisma platform workspace show --early-access
List all projects within a workspace:
npx prisma platform project show --workspace $WORKSPACE_ID --early-access
Create a new project within a workspace:
npx prisma platform project create --workspace $WORKSPACE_ID --name "My Project" --early-access
Delete a project:
npx prisma platform project delete --project $PROJECT_ID --early-access
List all environments within a project:
npx prisma platform environment show --project $PROJECT_ID --early-access
Create a new environment within a project:
npx prisma platform environment create --project $PROJECT_ID --name "production" --early-access
Delete an environment:
npx prisma platform environment delete --environment $ENVIRONMENT_ID --early-access
List all connection strings for an environment:
npx prisma platform apikey show --environment $ENVIRONMENT_ID --early-access
Create a new connection string for an environment:
npx prisma platform apikey create --environment $ENVIRONMENT_ID --name "production-key" --early-access
Delete a connection string:
npx prisma platform apikey delete --apikey $API_KEY_ID --early-access
| Option | Description |
|---|---|
-h, --help | Display help message |
| Option | Description |
|---|---|
-h, --help | Display help message |
| 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) |
| 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) |
| 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) |
| Option | Description |
|---|---|
--early-access | Enable early access Console features (required for all commands) |