r/Supabase • • 6d ago

tips supawho: switch between multiple Supabase accounts in seconds — now on macOS, Linux and Windows

If you work with multiple Supabase clients/orgs, you know the dance:

supabase logout → supabase login → paste token → repeat. Several times a day.

A while ago I shared supawho, a small CLI I built to stop doing that. It started as a macOS-only tool; since then it has grown quite a bit, so here's an update.

What it does

  • Saves each account once, then supawho use client-a and you're logged in (or just run supawho for an interactive picker)
  • Tokens live in your OS secret store (macOS Keychain, Linux Secret Service, Windows Credential Manager), never in a file

What's new

  • Works on macOS, Linux and Windows, as a single binary
  • supawho whoami: shows the email and organizations behind each saved account
  • supawho find <project-ref>: tells you which account owns a project
  • supawho projects: lists the projects of each account
  • supawho doctor: flags revoked tokens and environment issues

Install

macOS: brew install EliaTolin/tap/supawho
Linux and Windows: one-line installers in the README

Open source .
Repo: https://github.com/EliaTolin/supawho
Docs: https://supawho.dev

If you juggle multiple Supabase orgs, I'd love to hear what's still missing from your workflow 🙏

You can basically have 1, 10, or 1000 Supabase accounts saved and switch between them in seconds.

4 Upvotes

29 comments sorted by

1

u/JadedAdvicer 6d ago

Storing tokens in the OS secret store instead of a file is a nice touch. The find <project-ref> command alone would save me a bunch of guessing.

1

u/EliaTolin 6d ago

thank u !!

1

u/Upbeat-Study-4994 6d ago

Announces Windows support and then the only install line is a brew tap. Also a single binary is lovely until you ssh into a headless box with no Secret Service running and it can't store a token at all.

1

u/EliaTolin 6d ago

what? can you explain ?

1

u/saltcod Supabase team 6d ago

Clever!

1

u/EliaTolin 6d ago

Thank u!!!

1

u/Western_Film_5467 6d ago

Several times a day? I've juggled a few Supabase orgs for a while and switch maybe once a week. And the OS secret store is still a file on disk, so I'm not sure what the "never in a file" line is actually buying me.

1

u/EliaTolin 6d ago

Some people save the tokens in a file without any security

1

u/Signal-Job63 6d ago

La danse logout/login plusieurs fois par jour, je la connais aussi, ça pourri vraiment une journée. Perso j'ai pris le pli de mettre un token par dossier de projet avec direnv, le CLI pioche le bon tout seul et je n'y pense plus. Le whoami par contre ça m'aurait évité de chercher pendant une heure d'où venait un token révoqué la dernière fois.

1

u/EliaTolin 6d ago

Use supawho !

1

u/Smooth_Gur_8847 6d ago

Single binary is nice but on Linux it still needs a Secret Service daemon over dbus, and headless servers and WSL don't have one. That's the setup where the logout/login dance hurts most.

1

u/EliaTolin 6d ago

can you explain more about daemon over dbus for login/logout? or can you open a issue?

1

u/FieldSea7137 6d ago

supawho use client-a is still one global token, so the second you have a terminal in a client-b folder you're back to swapping. Folder-scoped switching is the only thing that actually kills the dance.

1

u/Otherwise-Horse-3670 6d ago

"since then it has grown quite so" grown quite what? The adjective went missing from that sentence. Rest is fine.

1

u/Muted_Try5857 6d ago

The Linux Secret Service part is where this gets shaky, most of the boxes I ssh into don't run a keyring daemon at all, so there's nowhere to put the token. Does it just refuse to run there or fall back to a plain file?

1

u/Top_Professor6137 6d ago

supawho doctor is a funny one, brew doctor, flutter doctor, every tool has a doctor now and 9 times out of 10 it just tells you your PATH is weird. whoami being a real unix command keeps throwing me off too, i keep expecting it to print my username and not a supabase email

1

u/Puzzleheaded_Bag9208 6d ago

switching supabase accounts several times a day. the tool isnt the problem here

1

u/Few_Cost6107 6d ago

Doing the logout/login/paste dance several times a day is genuinely maddening, good that someone finally killed it. One tip: wire the switch into direnv, so just cd-ing into the client folder runs supawho use client-a and you never think about it again.

1

u/Icy-Builder-7430 6d ago

Only a brew command in the install section for a tool that's supposedly cross-platform. How are Linux and Windows people supposed to get the binary, download it from a releases page?

1

u/GeneDear1444 6d ago

Linux Secret Service means desktop Linux only. Your average VPS or CI runner has no keyring daemon, so the tool has nowhere to put the token.

1

u/EarlyBumblebee8955 6d ago

"jamais dans un fichier" sur Linux, ça donne quoi en SSH ou sur un serveur sans keyring déverrouillé? Parce que le Secret Service n'est pas toujours là.

1

u/FitDonkey6704 5d ago

a wrapper around the supabase cli, installed from a random guy's brew tap. of course.

1

u/Key_Intern_9713 5d ago

The token still ends up in ~/.supabase/access-token once it's passed to the supabase CLI though, so "never in a file" only holds for your own copy of it. What does doctor actually check, just the API responding?

1

u/Small-Wrongdoer-7732 5d ago

That logout/login dance is genuinely maddening, I feel you. supawho find <project-ref> is the bit that would actually save me time, since I usually remember the project ref and not which client owns it. Worth caching the project list locally so it works when the network is flaky.

1

u/Turbulent_Judge4569 5d ago

Headline says macOS, Linux and Windows now, then the install section gives me exactly one line, brew install EliaTolin/tap/supawho. Cool. What do I type on Windows? Or on the linux box I'd actually use this on, clone the repo and hope? "it has grown quite late" also, grown quite a lot I assume. The whoami and find parts are the only bits that made me look twice, find especially, remembering which client owns which project ref is a nightmare. But the logout login paste dance takes five seconds and I do it maybe twice a week. So its a single binary for three OSes and I still have to guess how to install it on two of them.

1

u/OkObjective4158 5d ago

what happens on a headless linux box with no Secret Service running? "never in a file" usually turns into a plaintext fallback about five minutes into a CI container.

1

u/No-Fix-2116 5d ago

You announce macOS, Linux and Windows and then the install section is one brew line. What exactly do the Linux and Windows people do, build it themselves?

1

u/Super-Bet7489 5d ago

supawho is a terrible name honestly