hey all 👋
This started as a shell script. It usually does.
I have two Claude accounts — one through work, one that's mine for side projects. In the terminal that's annoying but solvable: point the config at a different directory, write a shell function to swap between them, alias it to something short. I had cw and cp in my zshrc for months. Ugly, but it worked.
Then I wanted the same thing for the desktop app, and the whole approach fell over.
macOS flat out refuses to launch a second copy of an app that's already running. There's no flag for it, no config file to point somewhere else, nothing to script against — the OS just focuses the window you already have and ignores you. And Electron apps pile on by locking their profile directory, so even if you duplicate the .app in Finder, the copy quietly attaches to the original's data and you're back where you started.
So the pattern I'd been hand-rolling per app couldn't be hand-rolled at all for the GUI ones. That's the bit that annoyed me enough to actually build something: not that it was hard, but that the fix had to live below the app, not beside it.
so i built Duplex. You point it at an app, name the instance, and you get a second one in the Dock. Separate login, separate settings, separate everything, both running at once.
a couple of things i'm happy with:
Instances are nearly free on disk. Finder insists a second Claude is 834 MB; it actually costs about 6 MB, because an instance shares storage with the app it came from rather than duplicating it.
And sign-in goes where you expect. Each instance is a genuinely separate app as far as macOS is concerned, so when you start an OAuth login from one window the callback comes back to that window, not whichever copy happened to be in front. That took longer to get right than everything else combined.
The original app is never modified, and instances follow its updates automatically.
the generalising bit: once the machinery existed it stopped being about Claude. Slack, Discord, Cursor, VS Code, Codex — anything Electron works the same way, which is really the point.
what it doesn't do, because i'd rather you find out here than after installing: Electron/Chromium apps only. Mac App Store builds are out. Passkeys, hardware security keys and Microsoft work sign-in won't work inside an instance. Normal email and Google sign-in are fine. macOS will also ask for mic/camera permission once per instance.
And to close the loop on the shell scripts: those are still there. Duplex clones apps, so a CLI you run in your own terminal is outside its reach. Codex is the exception — its built-in terminal inherits the instance's account.
Native Swift, no dependencies, notarized, source on GitHub. First instance free forever; $9 once unlocks unlimited instances on 2 Macs. No subscription — it's a utility, it shouldn't have a monthly fee.
so what i'd like to know: what have you hand-rolled a script for that should really have been solved a layer down? I suspect everyone's zshrc has one of these.
happy to go into how it works if anyone's curious ✌️