Configuration

Configuration values stored in the configuration file provide defaults for matching flags throughout the application. Use the commands below to manage these values.

Configuration file location

By default, the configuration file is stored in the operating system’s user configuration directory, under nais/config.yaml:

Platform Default path
Linux $XDG_CONFIG_HOME/nais/config.yaml, or ~/.config/nais/config.yaml when XDG_CONFIG_HOME is not set
macOS ~/Library/Application Support/nais/config.yaml
Windows %AppData%\nais\config.yaml

Use the global --config <path> flag to choose a different file:

nais defaults list --config /path/to/config.yaml

Run nais defaults list to see the actual configuration file path in use.

Managing configuration

Configuration keys

These are documented configuration keys. Other keys may also be set.

confirm-login

Ask before starting required Nais or Google Cloud login flows.

Defaults to true. When a command requires a Nais or Google Cloud login and you are using an interactive terminal, the CLI asks for confirmation before starting the required login flow. If you are already logged in, no confirmation is needed.

Set nais defaults set confirm-login false to start required login flows without this confirmation. This does not skip authentication or any browser interaction required by the login provider, and it does not disable other command confirmations.

Override it for one command with --confirm-login=false to skip the confirmation, or --confirm-login=true to ask.

Restore confirmations with nais defaults set confirm-login true, or remove the configured value with nais defaults unset confirm-login to use the built-in default.

environment

Default Nais environment for resource selection and filtering.

The Nais environment in which to select or filter resources.

Set it with nais defaults set environment <env> to avoid repeating --environment on commands that use an environment.

Override it for one command with --environment <env> (or -e <env>), for example nais app list --environment <env>.

A stored environment also filters listings that would otherwise span environments, so check this default when resources seem to be missing.

Remove it with nais defaults unset environment; behavior without an environment depends on the command.

team

Default Nais team for team-owned resources.

The Nais team whose applications, jobs, and other team-owned resources you want to work with. Use the team’s name as shown in Nais Console.

Set it with nais defaults set team <team> to avoid repeating --team on commands that use a team.

Override it for one command with --team <team> (or -t <team>), for example nais app list --team <team>.

Selecting a team does not grant access to its resources. Remove the default with nais defaults unset team.