Wrangler auth profiles per directory; no more manual account switching
Wrangler CLI now supports auth profiles: named logins that you scope to specific Cloudflare accounts and switch between automatically, based on the directory you are working in.
A profile is a named OAuth login bound to a directory. Commands run in that directory, and its subdirectories, use the matching account — so you can move between accounts without re-running wrangler login.
Use profiles to keep a separate login for each client when working at an agency, or to separate staging and production into different accounts. Pair a profile with an account_id in your Wrangler configuration file so a command cannot reach the wrong account.
<div><div><span># Create a profile for each account, choosing which accounts it can reach</span></div></div><div><div><span>wrangler</span><span> </span><span>auth</span><span> </span><span>create</span><span> </span><span>client-a</span></div></div><div><div><span>wrangler</span><span> </span><span>auth</span><span> </span><span>activate</span><span> </span><span>client-a</span><span> </span><span>~/clients/client-a</span></div></div><div><div>
</div></div><div><div><span>wrangler</span><span> </span><span>auth</span><span> </span><span>create</span><span> </span><span>client-b</span></div></div><div><div><span>wrangler</span><span> </span><span>auth</span><span> </span><span>activate</span><span> </span><span>client-b</span><span> </span><span>~/clients/client-b</span></div></div>
Use the --profile flag to run a single command with a specific profile:
<div><div><span>wrangler</span><span> </span><span>deploy</span><span> </span><span>--profile</span><span> </span><span>personal</span></div></div>
In CI and other automated environments, CLOUDFLARE_API_TOKEN still takes precedence over all profiles.
For setup, the resolution order, and the full command reference, refer to Authentication profiles.
Fetched July 2, 2026



