Show HN: I built a small utility that handles multiple browser instances for you (github.com)

39 points by 4m1rk ↗ HN
I'm a consultant and I normally deal with multiple clients. I need an isolated browser for each to maintain my sanity.

I could create separate profiles in Chrome and Firefox but the main issue is when you click on a link outside of the browser (e.g. in your IDE), in which profile should it be opened?

I wrote a Python script that redirects URLs to the correct browser instance and set it as my default browser. Over time, the script has grown and become essential to my work. I cleaned it up and open-sourced it. Hope that someone else may find it useful too!

9 comments

[ 3.0 ms ] story [ 16.1 ms ] thread
That could be pretty handy. Any plans to add support for Firefox Multi-Account Containers?
It doesn't need Multi-Account Containers. You can run any browser (or program) as long as it allows specifying different user profiles from the command line. I'll test it with firefox and let you know.
I tested it and it works as expected. Also fixed a few things and released a new version (so please upgrade if you already installed it `pipx upgrade browser-hub`). And here is an example config for Firefox: https://github.com/amirkarimi/browser-hub?tab=readme-ov-file...

Please don't forget that you first should create the profiles in Firefox, since it doesn't create them automatically.

This is awesome, I'd love to see where the management part of this goes, and what uses cases it could work for (e2e tests come to mind).

I appreciated the diagram - did you make it in draw.io/diagrams.net by chance? (I wish they would print margins!)

Thank you!

> I'd love to see where the management part of this goes

Can you elaborate on this? What do you mean by the management part? More control on the configuration side?

> did you make it in draw.io/diagrams.net by chance?

Yes, I used draw.io. If you're interested in building ASCII diagrams in terminal using keyboard, I have implemented another utility for that ;) https://github.com/amirkarimi/term-ascii-diagram

That's great haha, looks very snappy and intuitive. All it needs is a renderer with some themes for exporting - I'd use it! Looks fast

Re: Management - was thinking of UI that lets you manage all the browser instances. Mainly the stuff in config.json like URL redirects, profiles, etc. but also to see things like browser notifications at a higher level.

Cool projects! Followed you on gh

Thanks for the diagram TUI suggestions, good stuff to add. In my case, I select the text (diagrams) in the terminal and copy/paste them into my IDE as a comment block in the code or in Markdown.

Re: management - Gotcha! You mean some sort of container to manage the browsers maybe something like shift.com. That's actually great and I remember trying one of them but not sure what was the issue that I gave up on that. Anyway, this can be a path forward for this project.

And thanks for following, I did the same :D