Skip to main content
  1. Today I Learned (TIL)/

How to open URLs in different browser profiles with Finicky

··1 min· ·
Author
Aakash Nand
Senior Data Engineer @ Kraken Technologies

When I was working at a consulting firm, I frequently faced a problem: I wanted to open specific URLs in specific Chrome profiles. I had multiple profiles for different clients or projects, each with its own SSO sessions and cookies. Opening a URL in the right profile ensured everything worked seamlessly.

This made me wonder if there was already a solution for this. I discovered Open In profile, which was easy to use, free, and exactly what I needed. You just add your Chrome profiles and create rules that route different URLs to the right profile. The tool claimed it didn’t send data to any servers, only saving local history that you can clear. I used it for almost two years and was happy with it, though I always wondered why the author never open-sourced it—perhaps they wanted to monetize it eventually.

One thing I really love about working at Kraken is the various guilds we have for different interests. We have a channel where everyone shares what they learned that day. Recently, a colleague shared an open-source tool that does exactly what Open In profile did—but it’s open source and offers even more customization. The tool is called finicky.

Currently, finicky is only available for macOS. I’ve integrated it with my chezmoi dotfile management setup by creating a dot_finicky.js.tmpl file with configurations for both my work and personal machines. On my personal machine, I use it to open links related to my graduate studies and university in a specific Chrome profile, while everything else opens in the default profile.

{{- if .work_computer }}

export default {
  defaultBrowser: "Google Chrome",
  handlers: [
    {
      match: (url) => {
        const keywords = ["work", "related", "keywords", "you", "want", "to", "open"];
        const urlString = url.href.toLowerCase();
        return keywords.some(keyword => urlString.includes(keyword));
      },
      browser: {
        name: "Google Chrome",
        profile: "Default"
      }
    }
  ]
}

{{  end -}}

{{- if .personal_computer }}

export default {
  defaultBrowser: "Google Chrome",
  handlers: [
    {
      match: (url) => {
        const keywords = ["personal", "project", "related","keywords", "you", "want", "to", "open"];
        const urlString = url.href.toLowerCase();
        return keywords.some(keyword => urlString.includes(keyword));
      },
      browser: {
        name: "Google Chrome",
        profile: "Profile 1"
      }
    },
    {
      match: (url) => {
        const keywords = ["github"];
        const urlString = url.href.toLowerCase();
        return keywords.some(keyword => urlString.includes(keyword));
      },
      browser: {
        name: "Google Chrome",
        profile: "Default"
      }
    }
  ]
}

{{  end -}}

Finicky also comes with a minimal and simple UI where you can see logs and check if your configuration loaded correctly. If you decide to use finicky, make sure to set it as your default browser. You can also check out some great example configurations on the finicky wiki.