> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

## Selected profiles outrank environment variables

auth

A selected profile's stored values now take precedence over environment variables however the profile was selected: `-p`, `<PREFIX>_PROFILE`, or `profiles use`. Previously only a profile named with `-p` outranked the environment, so a profile made active with `profiles use` lost to any exported `<PREFIX>_BASE_URL`, `<PREFIX>_RETRIES`, or credential variable. Every profile-capable value resolves as `explicit flag → selected profile → environment variable → spec default`; environment variables fill only the values the profile leaves unset. Unprofiled invocations are unchanged. `auth status` lists the profile's credential source before the environment variable, and `profiles current` reports when an environment variable is supplying a credential the profile doesn't store.

Read the docs