Skip to main content
This guide covers the essential commands and configuration options for the Porter CLI.

Quick Start

1

Login to Porter

Authenticate with your Porter account:
This opens your browser to complete authentication and automatically configures your default project and cluster.
2

Verify Configuration

Check your current CLI configuration:
If necessary, switch your project and/or cluster
3

Deploy Your App

Deploy using a porter.yaml file:
porter.yaml referenceporter apply reference

Project and Cluster Configuration

After logging in, you may need to switch between projects or clusters.

List Available Projects

Set Active Project

List Available Clusters

Set Active Cluster

Delete a Cluster

Delete a cluster from the current project. Porter tears down the infrastructure it provisioned, and the cluster moves to the deleting state while teardown runs asynchronously.
Identify the cluster by its ID, name, or vanity name. Add -y or --yes to skip the confirmation prompt (required in non-interactive terminals).
A cluster can only be deleted once no applications are still running on it. If applications remain, the command exits without deleting and lists the resources you need to remove first. Teardown can take up to an hour.

View Current Configuration

Global Flags

These flags can be used with any Porter command:

Environment Variables

Environment variables provide an alternative way to configure the CLI, which is especially useful in CI/CD pipelines.
Environment variables take precedence over values in your config file, but flags take precedence over environment variables.

Example: CI/CD Configuration

Common Workflows

Local Development

CI/CD Deployment

Managing Environment Variables

Debugging

Viewing Help

You can view help instructions for any command using the -h or --help flag:

Next Steps