Netlify CLI multi-org workaround: prefix each command with per-account NETLIFY_AUTH_TOKEN env var

DavidWells · x · 2026-10-03

lee martin asked Netlify for the best way to work with two orgs on one machine via the CLI. DavidWells replies that swapping env vars is currently the only way short of a custom wrapper:

NETLIFYAUTHTOKEN=$TOKENACCOUNTA netlify status

NETLIFYAUTHTOKEN=$TOKENACCOUNTB netlify sites:list

i.e. inject the account-specific NETLIFYAUTHTOKEN per command rather than relying on netlify switch.

Original post →

More from coding & agent

coding & agent channel →