Skip to main content
porter config contains commands for managing local CLI configuration settings.

porter config

Display the current CLI configuration, including project, cluster, and authentication details. Usage:
porter config
Flags:
FlagDescription
--show-tokenDisplay the CLI authentication token in the output. By default, the token is hidden for security. Pass this flag to reveal the token value.
Configuration values can be overridden using flags or environment variables. See Basic Usage for details.

porter config set-project

Set the active project. This command shows a list of projects you have access to and lets you select one. Usage:
porter config set-project

porter config set-cluster

Set the active cluster. This command shows a list of clusters in the current project and lets you select one. Usage:
porter config set-cluster
Run porter cluster list first to see available clusters and their IDs.

porter config set-login-method

Select the authentication flow used by porter auth login. Usage:
porter config set-login-method [v1|v2]
Modes:
ModeDescription
v1Legacy flow that issues a long-lived Porter JWT. The token is stored in porter.yaml.
v2Refreshable session flow. Tokens are stored in your OS credential store (Keychain on macOS, Secret Service on Linux, Credential Manager on Windows) and are automatically refreshed.
porter config set-login-method v2
porter auth login
When you log in with v2, Porter stores your access and refresh tokens in the OS keyring instead of in porter.yaml. If you previously logged in with v1, switching to v2 and logging in once migrates any plaintext tokens out of porter.yaml automatically.
Use v2 for local development on a single machine. For CI/CD pipelines, continue to use a PORTER_TOKEN environment variable — the keyring is intended for interactive sessions.

Configuration File

Porter stores configuration in ~/.porter/config.json. You can also override settings using environment variables:
VariableDescription
PORTER_PROJECTOverride project ID
PORTER_CLUSTEROverride cluster ID
PORTER_TOKENOverride authentication token
PORTER_HOSTOverride API host