porter env contains commands for managing environment groups — project-wide sets of environment variables and secrets that can be shared across applications.
Prerequisites
- You’ve logged in to the Porter CLI after running porter auth login
- You’re connected to the correct project by running porter config set-project
porter env list
List environment groups for the current project.
Usage:
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.
--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:
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:
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:
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:
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.Related
- Environment Groups — Overview of environment groups
- porter.yaml Reference —
envGroupsfield in porter.yaml - porter app — Application management commands
- porter apply — Deploy with porter.yaml

