Skip to main content
porter env contains commands for managing environment groups — project-wide sets of environment variables and secrets that can be shared across applications.

Prerequisites


porter env list

List environment groups for the current project. Usage:
Options: When a cluster is set (via porter config set-cluster, the --cluster flag, or the PORTER_CLUSTER environment variable), the list is scoped to that cluster: environment groups whose sync targets include the cluster, plus any cluster-scoped environment groups. This matches what the dashboard shows on the cluster’s environment groups page. Without a cluster context, all environment groups in the project are listed. The default table output shows each group’s name, current version, and last updated time, sorted alphabetically by name.
The --json output returns two arrays — environment_groups and cluster_scoped_environment_groups — sharing one object shape:

porter env create

Create a new environment group. Usage:
Options:
If an environment group with the same name already exists, the command will fail. Use porter env set to update an existing group.

porter env pull

Pull environment variables from an environment group to your local machine. Usage:
Options:
By default, both variables and secrets are output together. Use -v or -s to filter. You cannot use both flags at the same time.

porter env set

Add or update variables and secrets in an environment group. Usage:
Options:
Use -s/--secrets for sensitive values like API keys and passwords. Secrets are stored in your cloud provider’s secret manager and are not visible after creation.
When you update an environment group, all applications synced to it are automatically redeployed with the new values.

porter env unset

Remove variables or secrets from an environment group. Usage:
Options:
When you update an environment group, all applications synced to it are automatically redeployed with the new values.

Legacy Commands

The following flag-based syntax is supported for managing app-level and cluster-level environment variables. These are legacy commands — for environment groups, use the positional argument syntax above.

Legacy Flags

You must specify either --app or --group, but not both.