CliConsole
platform
Manage Prisma Console workspaces, projects, environments, and API keys
The prisma platform command provides access to Prisma Console functionality for managing workspaces, projects, environments, and API keys.
Usage
prisma platform [subcommand] [options] --early-accessSubcommands
| Subcommand | Description |
|---|---|
auth | Manage Console authentication |
workspace | Manage workspaces |
project | Manage projects |
environment | Manage environments |
apikey | Manage API keys |
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 API keys
List all API keys for an environment:
npx prisma platform apikey show --environment $ENVIRONMENT_ID --early-accessCreate a new API key for an environment:
npx prisma platform apikey create --environment $ENVIRONMENT_ID --name "production-key" --early-accessDelete an API key:
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) |
API key commands
| Option | Description |
|---|---|
-h, --help | Display help message |
-e, --environment | The environment ID (required for show and create commands) |
-a, --apikey | The API key ID (required for delete command) |
-n, --name | Display name for the API key (optional for create command) |
Global options
| Option | Description |
|---|---|
--early-access | Enable early access Console features (required for all commands) |