Every link in the right browser and profile.
Switchyard is a macOS menu-bar app that opens every link where it belongs: work links in your work profile, personal links in your personal one, and, if you like, side projects in a different browser altogether. It works with Dia, Chrome, Firefox, Safari, Brave, Edge and Vivaldi, alone or together.
It learns from you. For a site it doesn't know yet, a small picker appears by the cursor: press 1, 2, 3… to choose where it opens, or Esc for your default. Your answer becomes a rule, so each site is asked about once, and links that match a rule open instantly, without going online. As rules pile up, Switchyard suggests broader ones ("Send all of acme.com to Work?", "Always open links from Slack in Work?").
Jev can help. With a key from TypeSafe, Switchyard also asks Jev, a fast AI model that picks one answer from a fixed list and says how sure it is. You write a sentence about what each profile is for, and Jev preselects its guess in the picker ("Work, 92% sure"). Once it has matched your picks ten times in a row, Switchyard offers to let it open links it's confident about without asking. Unsure ones still ask. A key is optional, and there are no reminders about not having one.
Inspired by jdsimcoe/dia-router, which routes links with hand-written rules.
| Browser | Opens links via | Setup asks for | Status |
|---|---|---|---|
| Dia | Dia's AppleScript dictionary (Dia ignores Chromium's profile flag) | Automation permission for Dia | Supported |
| Chrome | --profile-directory, handed to the running Chrome |
Access to Chrome's data folder, to read its profiles | Supported |
| Firefox | -profile <folder> -new-tab, handed to that profile's running Firefox (each Firefox profile runs as its own app) |
Access to Firefox's data folder, to read its profiles | Supported |
| Safari | Handed to Safari as is (Safari can't be told which profile to use), so it opens in Safari's front window | Nothing | Supported, as one destination |
| Brave, Edge, Vivaldi | Same as Chrome | Same as Chrome | Supported. Vivaldi shows a welcome screen the first time a new profile opens, which can swallow that one link |
Setup starts with one browser. Add more in Settings → General → Browsers: every profile of every browser there becomes a destination, in the picker, in corrections, and for Jev. Rules remember their browser, so removing one keeps its rules for later.
-
Switchyard is the default browser, so macOS hands it every
http/httpslink. -
Rules first. The rules are held in memory, most specific wins, and a lookup takes microseconds with no network. A rule can match:
- a whole domain (
all of slack.com) - an exact host (
acme.slack.com) - a path prefix (
app.shortcut.com/acme) - an identifying query parameter (
mail.google.com ?authuser=…)
- a whole domain (
-
App rules. A rule like "links from Slack → Work" routes every link clicked in that app. It beats rules Jev learned, but rules you made or corrected still win.
-
Otherwise, ask Jev. One request, usually answered in 70–500 ms, asks two questions at once:
- Which profile should open this link? The options are your browser's profiles, with the descriptions from the Profiles tab.
- Which part of the URL identifies the account? The answers are domain, subdomain, first path segment, query identifier, or "can't generalize".
- Only the host, the first three path segments and the names of any query parameters are sent. Query values and fragments stay on your Mac, so a rule like
mail.google.com ?authuser=…keeps its value and is matched locally.
-
Decide. What happens depends on Jev's confidence:
Jev's answer Result Profile confidence ≥ 0.7 (adjustable) Open there and save a rule at the scope Jev picked Lower confidence Ask with the picker, Jev's guess marked (Esc takes it); your answer can become a rule. Or, with Settings → Jev → "When Jev is unsure: Open its best guess", open the guess and flag the row ⚠︎ No key Ask with the picker; your answer can become a rule Timeout (1.2 s), offline, or an error Open in the fallback profile (Personal) and show the reason Offline, or on a network that can't reach Jev (in-flight Wi-Fi before you sign in): links without a rule open in the fallback profile immediately instead of waiting. With no network that starts with the first link; on a network that can't reach Jev, the first link still waits out the 1.2 s. Switchyard checks again in the background, backing off from 5 seconds to every 5 minutes, and at once after a network change. When Jev is back, it asks about the links it opened without Jev (from the last day, up to 25). Confident answers learn rules, and links Jev says belonged elsewhere get a Move to … button. Nothing re-opens on its own.
-
The browser opens the link in the chosen profile. Dia is asked through its AppleScript dictionary; Chrome and friends get
--profile-directory, which the running browser picks up. Neither needs Accessibility permission or keyboard shortcuts.
The browser is the source of truth for profiles: they're read from its Local State, and renames are followed automatically.
-
Recent: the last 25 links, each with its profile and a plain reason for the choice:
Your rule: links from SlackorLearned rule: github.com/acmeJev 0.84 · learned github.com/acmeorJev 0.96 · nothing saved (too specific)Jev unsure (0.47) · nothing savedorFallback: Jev timed out, both shown in orange
Below the reason: the app the link came from, when it was routed, and how long the decision took.
- After 3 links in a row from one app land in the same profile, Recent offers to make an app rule ("Always open links from Slack in Work?").
- The ↪︎ menu on each row is "Should have opened in…". It lists every scope that URL supports (all of the domain, the exact host, one or two path segments, the account parameter, or every link from the app it came from) or "just this once". The link re-opens in the right profile and the rule is saved, replacing any rule with the same scope. "… was right: remember" saves a rule for the profile it's already in.
-
Rules: most recently used first, with profile filters. Each rule shows whether Jev learned it or it's yours, and when it last fired. Rules unused for 90 days fade to the bottom. One field searches, and it offers to add what you typed if it's a new rule (
app.shortcut.com/acme,*.slack.com,mail.google.com?authuser=me@x.com). Usage is tracked on each Mac, not in the synced rules file. -
Profiles: what each profile is for, which is what Jev reads, edited in place, with each profile's rule count and the fallback profile for when Jev is unsure or offline. Every Recent row's menu links here (Edit What Each Profile Is For…), since a wrong pick is usually the moment to sharpen a description.
-
Settings:
- the TypeSafe API key (stored in Keychain)
- the confidence threshold
- a Test field that shows a decision without opening anything
- the rules folder, default browser, open at login, and notifications
Only for loud events:
- Fallbacks, e.g. "Jev was too slow · app.foo.com → Personal".
- Optionally, low-confidence routings, e.g. "Jev wasn't sure · app.foo.com → Personal · 0.61".
- Setup problems: missing or invalid key, the browser missing, or its permission denied.
Routing notifications offer Personal was right, which saves a rule for that link without re-opening it. They also offer Should be … for each other profile, which re-opens the link there and saves the rule. Either way, the next link like it opens instantly. Routing notifications are limited to one every 5 minutes.
Switchyard updates itself with Sparkle. It checks daily, which you can turn off in Settings → Advanced; Check for Updates… is at the bottom of Settings. Every update is signed, and Switchyard only installs ones signed with its own key. Your rules, settings and permissions carry over, and updates never re-run setup.
Rules live in rules.json in a folder you choose: iCloud Drive (Switchyard in iCloud Drive, the default when it's enabled), Dropbox (Dropbox/Switchyard), or this Mac only.
- Rules name profiles by name (and browser), not by the browser's folder, so they work on a Mac where the folders differ.
- Every write merges with what's on disk: the newer edit wins, and deletions are tombstones. Two Macs editing at once don't lose or resurrect rules.
- History and the API key stay local.
Updates never lose your rules. The rules file is versioned: a Mac running an older Switchyard reads newer files but never writes them, and every new version reads every older format. Settings keep their meaning from version to version. Recent and rule usage are per-Mac caches that a future version may reset. The details, and the tests that enforce them, are in docs/COMPATIBILITY.md.
You'll need:
- macOS 26 or later, on Apple silicon or Intel
- one of the browsers above
- optionally, a TypeSafe API key for Jev; without one, Switchyard asks you where new sites go
- Download Switchyard-x.y.z.dmg from the latest release.
- Open it and drag Switchyard to Applications.
- Open Switchyard; setup walks you through the rest.
Switchyard is signed and notarized by Apple, and it updates itself (see Updates).
Links don't reach Switchyard. Switchyard only sees links while it's the default browser. Open Switchyard (from Applications or Spotlight) and it offers to fix that, or use Settings → General → Make Default. Some apps keep their own browser setting; Slack, for example, follows the system default.
A link opened in the wrong profile. In Recent, open the row's ↪︎ menu and choose "Should have opened in…". Switchyard reopens the link where it belongs and saves a rule. If Jev keeps guessing wrong for a kind of site, make that profile's description more specific in the Profiles tab.
Setup can't read your profiles. Chrome, Firefox and the other Chromium browsers keep their profile list in a folder macOS protects. Allow Switchyard when macOS asks. If you said no, or the question never appeared, either:
- turn on Switchyard in System Settings → Privacy & Security → Full Disk Access (click + and choose Switchyard if it isn't listed), or
- have macOS ask again, with the narrower "data from other apps" permission: run
tccutil reset SystemPolicyAppData com.kevinebaugh.switchyardin Terminal, then add the browser again.
Dia instead needs Automation permission for Switchyard: System Settings → Privacy & Security → Automation.
"Switchyard wants to access files managed by Dropbox." That's macOS asking on Dropbox's behalf, when your rules sync through Dropbox. Allow it, or Switchyard can't read or save your rules there.
The picker doesn't appear. It only appears when there's no TypeSafe key and no rule matches. With a key, Jev decides instead.
Notifications don't appear. If macOS is holding them back, Settings → General says so, with a shortcut to System Settings. A Focus holds notifications back; they still collect in Notification Center.
Start setup over. Settings → Advanced → Run Setup Again…. To try setup without touching your real settings, run scripts/rehearse-onboarding.sh from a checkout of this repository.
Logs. Open Console, search for subsystem:com.kevinebaugh.switchyard, and turn on Action → Include Info Messages. The categories are router (each link's decision), rules (sync and recovery) and connectivity (offline handling).
Still stuck? Open an issue and paste the output of Settings → Advanced → Copy Diagnostics. It contains no links, profile names or keys.
Requires macOS 26 or later and one of the browsers above; a TypeSafe API key for Jev is optional. Building from source needs Xcode (or the Command Line Tools).
swift test
./scripts/install-app.sh # builds, installs to /Applications, launchesOn first launch, a setup window walks you through the steps:
- You pick your browser.
- You give Switchyard the one permission that browser needs (skipped if it's already allowed):
- Dia: Automation, so Switchyard can ask Dia to open tabs and list profiles in Dia's order. It covers Dia only; it isn't Accessibility.
- Chrome and friends: access to the browser's data folder, which macOS protects, so Switchyard can read the profile list (and, on this Mac only, what each profile uses most). Opening links needs nothing extra.
- It finds your profiles.
- You connect Jev with your TypeSafe API key (console.typesafe.ai/keys), or skip it to pick profiles yourself. A key is checked when you continue.
- Switchyard drafts a description of each profile from the sites it uses most (and, in Chrome, the account it's signed in to), read locally from the browser's history, and you edit them. A profile without enough history is left blank rather than guessed.
- You make Switchyard the default browser. This is the one step you can put off ("Not yet").
- You choose login, notification and rules-sync options.
If you close the window partway, the menu offers to finish setup later.
You can run it again from Settings → Advanced → Run Setup Again….
After setup, opening Switchyard (launching it, or opening it again while it's running) checks that it's still the default browser. If another browser has taken over, macOS asks whether to switch back.
Jev knows only what your descriptions say, so they're the most important setting. Edit them any time in the menu's Profiles tab. Name the accounts and tools each profile is signed in to. For example:
| Profile | Description |
|---|---|
| Work | Acme Corp: you@acme.com Google Workspace, Acme's Slack and Linear, the acme GitHub organization, Datadog, internal admin tools. |
| Personal | Personal Gmail, banking, shopping, news, social media, side projects. The default for anything not clearly work. |
| Test | A throwaway account used to try products as a new user: sign-up flows, OAuth into third-party services. |
Setup drafts these for you (see above). A profile added later starts with a generic description if it's named Work, Personal or Test, and empty otherwise. Descriptions are stored on your Mac, not in the rules file.
Releases are automated: add the version's section to CHANGELOG.md, then push a v* tag. .github/workflows/release.yml builds the universal app, signs and notarizes it, publishes the GitHub release with the DMG, zip and update feed (appcast.xml). The signing material lives in repository secrets, listed at the top of the workflow. ./scripts/release.sh does the same build locally (it needs a Developer ID identity and notarization credentials; see the script's header).
Without an Apple Development signing identity the app is ad-hoc signed. macOS may ask again for Automation and Keychain access after each rebuild. To use a stable identity, put export SWITCHYARD_SIGNING_IDENTITY='Apple Development: …' in scripts/signing.local.zsh (gitignored).
Scripting: open 'switchyard://open?url=https%3A%2F%2Fexample.com&profile=Test' opens a link in a named profile.
To try the first-run experience again without losing your real setup:
./scripts/rehearse-onboarding.sh # throwaway settings, key, rules and history
./scripts/rehearse-onboarding.sh --reset-permission # also clear the Automation grant firstQuit Switchyard from the menu bar when you're done, and your normal setup relaunches. The default browser setting is system-wide, so a rehearsal sees it as it really is.
To review every setup screen as images (light and dark, including error states):
./scripts/build-app.sh
build/Switchyard.noindex/Switchyard.app/Contents/MacOS/Switchyard --snapshot-onboarding /tmp/switchyard-screens- Links that match a rule never leave your Mac.
- For other links, the request to TypeSafe contains:
- the host and the first three path segments, with no query values or fragment
- the names of any query parameters
- the name of the app the link came from
- your profile names and descriptions
- Full URLs appear only in local history.
- The support reminder counts routed links on your Mac; the count is never sent anywhere.
docs/logo.svg is the flat logo. Resources/AppIcon.icon is the same artwork as an Icon Composer bundle: layered SVGs on a gradient, rendered as Liquid Glass. scripts/build-app.sh compiles it with actool. Sources/Switchyard/MenuBarGlyph.swift draws the matching menu-bar template image.
Sources/RouterCore: pure, tested logic.- rules and the most-specific-wins index
- public-suffix handling
- scopes
- Jev wire types
- decision policy
- sync merge
- Chromium
Local Stateparsing and the browser table
Sources/Switchyard: the app.- Apple Event URL handler
- Jev client (hard deadline, keep-warm connection)
- browser adapters: Dia via AppleScript, Chrome and friends via
--profile-directory - stores, notifications, SwiftUI menu
Switchyard is free and open source. If it saves you from wrong-profile tabs, you can support it once, paying what you want ($10 suggested). 1% goes to removing carbon from the atmosphere through Stripe Climate.
Every 50 links, at most once a week, Switchyard shows a small card in Recent and a quiet notification asking for support. Paying stops them for good, on every Mac that shares your rules folder. Paid but still seeing them (say, you paid on your phone)? Settings → Advanced links to a short form. Routing is never affected.
MIT; see LICENSE. Two small pieces are adapted from jdsimcoe/dia-router, also MIT; see THIRD_PARTY_NOTICES.md. Switchyard is an independent project, not affiliated with or endorsed by The Browser Company (Dia), Google (Chrome) or TypeSafe AI.