---
title: "Tutorial: How to handle multiple accounts within the Netlify CLI"
description: "The Netlify CLI allows you to run a local development server, run your functions or plugins locally, deploy your site, and much more; but did you know it can handle multiple Netlify accounts? Learn how in this blog post."
source: "https://www.netlify.com/blog/2021/08/04/handling-multiple-accounts-with-netlify-cli/"
last_updated: "2026-07-10T20:16:06.000Z"
---
The [Netlify CLI](https://cli.netlify.com/) allows you to run a local development server, run your functions or plugins locally, deploy your site, and much more; but did you know it can handle multiple Netlify accounts?

Let me show you how!

This post assumes you already have the CLI installed and you’ve already logged in with an account. If not, you should check out [our getting started with the Netlify CLI guide](https://docs.netlify.com/cli/get-started/).

## Switching between accounts

Let’s say you have 2 accounts on Netlify, one for your team, and one for your personal projects.

To be able to run `netlify dev` on sites linked to each account, you can connect the CLI to both, and switch between them!

For this, use the command `netlify switch` in your terminal.

It should list the current accounts connected. If you’d like to connect a new one, select `I would like to login to a new one`.

This will open a browser window, asking you to log in with Netlify and grant access to Netlify CLI.

Once you’ve authorised, you can close the browser tab, go back to your terminal, and you should see the following message:

![Screenshot of Netlify CLI success message for switching accounts](/v3/img/blog/netlify-cli-switch-account-success.jpg)

Run `netlify switch` again, you should see your 2 accounts and be able to switch between them!

Have more accounts? No problem! Follow these same steps for each account you’d like to connect!

If you’d like to know more about all the commands available, you can find additional information on the [dedicated Netlify CLI site](https://cli.netlify.com/).

Have fun!

### Share

-   [X (fka Twitter)](https://twitter.com/intent/tweet?text=Handling multiple accounts with Netlify CLI&url=https://www.netlify.com/blog/2021/08/04/handling-multiple-accounts-with-netlify-cli//)
-   [LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.netlify.com%2Fblog%2F2021%2F08%2F04%2Fhandling-multiple-accounts-with-netlify-cli%2F%2F)
-   [Facebook](https://www.facebook.com/sharer.php?u=https://www.netlify.com/blog/2021/08/04/handling-multiple-accounts-with-netlify-cli//)
-   [Bluesky](https://bsky.app/intent/compose?text=Handling multiple accounts with Netlify CLI+https://www.netlify.com/blog/2021/08/04/handling-multiple-accounts-with-netlify-cli//)

* * *

### Tags

-   [Engineering](/blog/tags/engineering/)
-   [Netlify CLI](/blog/tags/netlify-cli/)
-   [Netlify](/blog/tags/netlify/)

## Keep reading

![](/_astro/3f45eb6eda4ea8814be310e3df4a7883a5bd9ba0-1200x675_ZcBDUS.webp)

Guides & Tutorials May 15, 2026

[

### How to build a real-time AI chatbot in minutes with Netlify Agent Runners (no backend)

](/blog/how-to-build-a-real-time-ai-chatbot-in-minutes-with-netlify-agent-runners-no-backend)

-   ![Profile picture of Nahrin Jalal](/_astro/f0e7c8f227a03fe58340c99ef5439d5a896c0733-272x272_Z23kDpD.webp)
    
    Nahrin Jalal
    

![](/_astro/8fe9e8a23f944c9912003233d99a2df7fee637cf-1600x900_Z1gMhmf.webp)

Guides & Tutorials May 15, 2026

[

### Tracking AI search traffic: how to use Netlify Log Drains to maximize AEO

](/blog/tracking-ai-search-traffic)

-   ![Profile picture of Nahrin Jalal](/_astro/f0e7c8f227a03fe58340c99ef5439d5a896c0733-272x272_Z23kDpD.webp)
    
    Nahrin Jalal
    

## Recent posts

News & Announcements June 25, 2026

[

### Netlify Functions, designed for Agent Experience

](/blog/netlify-functions-designed-for-agent-experience)

-   ![Profile picture of Eduardo Bouças](/_astro/52958f21e8450baf6d8e60302341a984e220c0cd-512x512_13VDlu.webp)
    
    Eduardo Bouças
    

News & Announcements June 24, 2026

[

### How we measure Netlify’s Agent Experience

](/blog/how-we-measure-netlify-agent-experience)

-   ![Profile picture of Sean Roberts](/_astro/bbf2243f8171dbddd80ab2103622106cef84d125-512x512_Z1d2LKE.webp)
    
    Sean Roberts
    

Guides & Tutorials May 15, 2026

[

### How to build a real-time AI chatbot in minutes with Netlify Agent Runners (no backend)

](/blog/how-to-build-a-real-time-ai-chatbot-in-minutes-with-netlify-agent-runners-no-backend)

-   ![Profile picture of Nahrin Jalal](/_astro/f0e7c8f227a03fe58340c99ef5439d5a896c0733-272x272_Z23kDpD.webp)
    
    Nahrin Jalal
    

![](/_astro/3f255b372fa958df35802666ee33b4609b2d71bd-1200x1586_1VtE2D.webp)

### How do the best dev and marketing teams work together?

[Access the report](https://www.netlify.com/reports/2024-leadership-trend-report/access/)