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 all environment groups in the current project. Usage:
Displays a table with each group’s name, current version, and last updated time.

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.