OpenIn v4.3 Browser Extensions Settings window For Developers



Additional downloads
Browser Extensions
- Safari Extension is built in.
- Chrome → Web Store → OpenIn
- Firefox → Add-ons → OpenIn
OpenIn browser extensions let you send links from web pages to OpenIn.
By default, a browser keeps normal link clicks inside itself. It sends a link to OpenIn only when you use the link context menu or click the OpenIn toolbar button. This prevents the browser from sending every link to the system default browser.
You can change this behavior in the extension settings. In Safari, open Safari Settings → Extensions, select OpenIn, and click Settings. From there, you can configure the extension to:
- Forward every link to OpenIn.
- Forward only links that point to a different domain.
- Forward links only when a modifier key is pressed.
OpenIn Helper
Required only for OpenIn installed from the Mac App Store.
Description
OpenIn is a macOS utility for routing URLs, mail links, phone links, and files to the application you choose. You can configure OpenIn as the default handler, define rules that select an application automatically, or show an application picker when more than one target is available.
Use OpenIn when you want to:
- Use different browsers or mail applications for different workflows.
- Open links in a specific browser profile.
- Open links in a private browser window.
- Open Zoom invitations directly in the Zoom application.
- Choose between multiple applications for the same file type.
- Keep work and personal routing rules separate on the same Mac.
Use cases
- Open a browser or application based on the active macOS Focus.
- Open
mailto:links in a webmail provider such as Gmail, Outlook, or Fastmail. - Route files and links to a default application, then add exceptions for domains, paths, key modifiers, or the source application.
- Always show the application selection dialog for a handler.
- Redirect supported links to native applications, such as Apple TV, Apple Music, Zoom, and other installed apps.
- Open links in Safari Web Apps.
- Open links in a specific Safari profile.
Support
Start a discussion on r/openin/ or send me an email at support@loshadki.app
Please include enough information to reproduce the issue. A report that only says “it does not work” is not actionable.
Include the following details when possible:
- macOS version.
- OpenIn version and distribution: App Store, direct web download, or Setapp.
- Browser or application versions involved in the issue.
- The exact steps you took before the problem occurred.
- Other browsers, mail apps, file handlers, or utilities that may affect link or file routing.
- Whether anything changed recently, such as a macOS update, browser update, or new OpenIn configuration.
- A screen recording of the issue.
- Exported logs from OpenIn Settings → About, if you are a macOS administrator.
Before reporting an issue, restart your Mac and try the same steps again. macOS can occasionally keep application-routing services in a stale state, and a restart may clear the problem.
Documentation
OpenIn is rule-based. Each handler, such as Browsers, Mail, Tel, or a file type, has a list of target applications and an ordered set of rules. A rule evaluates the current request and decides which target applications remain available.
For example, to configure the http and https schemes for browsers:
- Add every application that may handle those links, such as Safari, Google Chrome, or Music.
- Add specific rules first. For example, a rule can match
music.apple.comand target only Music. - Add a default rule last. For example, the default rule can target only Safari.
When a matching rule leaves one target application, OpenIn opens that application immediately. When a rule leaves multiple target applications, OpenIn shows the application selection dialog.
The trial version always shows the application selection dialog.
Rewriting URL with Regular Expressions
For each target application, you can rewrite the URL with a regular expression before OpenIn launches the application.
Example: rewrite the scheme from https:// to music://.
- Expression -
https://(.*) - Substitution -
music://$1
Launching a zsh Script as an Application
OpenIn can run a zsh script as a target application. Use this when you need to send files or URLs to a custom workflow instead of a standard macOS application.
When OpenIn runs the script, it provides these environment variables when the corresponding context is available:
OPENIN_SOURCE_APP_PATH- source application path.OPENIN_FOCUS_HINT- configured Focus Hint.OPENIN_KEY_MODIFIERS_COMMAND- set to1when the Command key is pressed.OPENIN_KEY_MODIFIERS_SHIFT- set to1when the Shift key is pressed.OPENIN_KEY_MODIFIERS_OPTION- set to1when the Option key is pressed.OPENIN_KEY_MODIFIERS_FUNCTION- set to1when the Function key is pressed.OPENIN_KEY_MODIFIERS_CONTROL- set to1when the Control key is pressed.OPENIN_IS_FOR_PRINTING- set to1when a file is opened for printing.OPENIN_SHARE_MENU- set to1when the request comes from the Share menu.OPENIN_HANDOFF- set to1when the request comes from Handoff.OPENIN_BROWSER_EXTENSION_TYPE- browser extension source. Possible values aretoolbar,contextmenu, andlink.
JavaScript
OpenIn uses a Safari-compatible JavaScript engine. Most built-in classes and functions match the Safari version installed on your Mac. MDN is a good reference for standard JavaScript APIs.
The window object is not available in OpenIn scripts.
Use console.log() to write messages to the OpenIn log.
For applications
Application scripts can modify the URL before OpenIn launches the selected application. For example, you can change an https:
URL to a music: URL before opening Music.app.
The url object is available to application scripts.
It provides these properties:
fragment- everything after#(string).host- hostname and port (string).hostname- hostname only (string).href- full URL as a string (string).username- username (string).password- password (string).pathname- path (string).port- port (string).protocol- scheme (string).search- query string (string).searchParams- query helper object (SearchParams).
SearchParams provides an object with the following methods:
append(name, value)- add a query value.delete(name)- delete all query values with this name.get(name)- get the first query value with this name.getAll(name)- get all query values with this name.has(name)- check whether the query has this name.set(name, value)- set a query value.keys()- get all query names.
Example: rewrite the scheme from https: to music:.
url.protocol = 'music:';
For rules and default handlers
Rule and default-handler scripts can inspect the current request and change which applications remain visible in the result list.
The ctx object is available to these scripts. It provides the following methods and properties:
url- returns theURLobject. See the For applications section above.getSourceApp()- returns anOpenContextSourceAppobject for the application that sent the request, if OpenIn recognized it.getApps()- returns the current array of target applications (OpenContextApp). You can modify each app’svisiblevalue.isForPrinting()- returnstruewhen a file was requested for printing.getModifiers()- returns anOpenContextModifiersobject with the keys pressed when the request was made.isShareMenu()- returnstruewhen the link was sent from the Share menu action Open in OpenIn.isHandoff()- returnstruewhen the link was sent by Handoff.getFocusHint()- returns the Focus Hint configured in System Settings, or an empty string if none is configured.
OpenContextSourceApp provides the following properties:
path- path of the application that sent the request (string).isShareMenu-truewhen the link was sent by the Share menu action Open in OpenIn (bool).
To check whether a request came from Slack or another application, inspect the source app path. Links from Slack may come from
a helper application inside /Applications/Slack.app/..., so check whether the path starts with /Applications/Slack.app.
OpenContextApp provides the following properties:
name- application name (string).running- whether the application is running (bool).bundleIdentifier- application bundle identifier (string).profile- configured browser profile (string).privateMode- whether the application target uses private mode (bool).visible- whether the application remains in the result list (bool). Set this value tofalseto hide an app.
OpenContextModifiers provides an object with the following properties:
shift- Shift key is pressed (bool).option- Option key is pressed (bool).command- Command key is pressed (bool).function- Function key is pressed (bool).
Example of a custom rule that makes decisions based on where the link is opened and domains:
(function() {
// The list of available apps to send the link to.
const apps = ctx.getApps();
// If the source app is Slack, keep only Safari visible.
// Because only one app remains, OpenIn opens Safari directly.
if (ctx.getSourceApp().path.startsWith("/Applications/Slack.app")) {
apps.forEach(function (app) {
app.visible = (app.name == "Safari");
});
return;
}
// Send all loshadki.app URLs to Safari.
if (ctx.url.hostname.endsWith("loshadki.app")) {
apps.forEach(function (app) {
app.visible = (app.name == "Safari");
});
return;
}
// Send all google.com URLs to Safari and Chrome.
if (ctx.url.hostname.endsWith("google.com")) {
apps.forEach(function (app) {
app.visible = ["Safari", "Google Chrome"].includes(app.name);
});
return;
}
})();
FAQ
Was there an upgrade path from OpenIn v3 to v4?
Yes. When OpenIn v4 was released in 2022, we provided a special upgrade bundle for existing OpenIn v3 users. This upgrade offer was available for approximately one year after the release. We no longer provide this upgrade bundle, and new customers need to purchase OpenIn v4 separately.
Can I convert a license from the App Store version to the direct web version, or vice versa?
No. The App Store and direct web versions are distributed as separate applications, and licenses cannot be transferred between them.
Do you offer discounts for press, blogs, videos, or reviews?
If you can reach an audience, we can offer a discount or a free license. Send an email to support@loshadki.app with information about your project and the number of users you expect to reach.
Do you offer discounts for students or other users?
We occasionally offer discounts for our applications, including seasonal and holiday promotions.
What is the difference between the App Store, direct web, and Setapp versions?
The direct web version and the Setapp version are not sandboxed. They can use all OpenIn features without installing an additional helper application.
The App Store version is sandboxed, so some advanced features require OpenIn Helper.
The application behavior is otherwise the same. Choose the distribution that is easiest for you to install and update.
Cannot access the OpenIn Settings window
If you disabled the menu bar icon, you may not have an obvious way to open Settings. Open OpenIn from Finder or Launchpad a second time. OpenIn will temporarily show the menu bar icon for 5 seconds so you can open Settings.
Can I invoke OpenIn from my own script?
Yes. You can use Shortcuts.app to ask OpenIn to open a specific browser, profile, or URL.
OpenIn also supports the openin:// scheme:
openin://open?url=YOUR_URL
How do I configure OpenIn as the default mail application?
Open Mail.app settings and select OpenIn.app as the default mail application. Refer to Apple Documentation for macOS instructions.
For the App Store version, you can also configure this from OpenIn when OpenIn Helper is installed. The direct web and Setapp versions support this without OpenIn Helper.
How do I configure OpenIn as the default application for a file extension?
- Open OpenIn Settings.
- At the bottom of File Types, click add file type… and enter the file extension. Alternatively, drag a file with that extension into the list.
- Select applications you want to use for this file extension.
- Open Finder and select any file with the desired file extension.
- Right-click the file and open Get Info.
- In Open With, select OpenIn, then click Change All….
For the App Store version, OpenIn Helper lets you click Fix It for this file extension inside OpenIn. The direct web and Setapp versions support this without OpenIn Helper.
Can OpenIn support profiles in Browser X, such as Arc or Dia?
A browser can support profiles internally without allowing other applications to open links in a specific profile. OpenIn can support browser profiles only when the browser provides an external launch mechanism for selecting the profile.
Some browsers expose profiles only inside the browser UI. In that case, OpenIn cannot select a profile when opening a link.
Most Chromium-based browsers support profile selection with a command-line argument similar to this:
open -a 'Google Chrome.app' --new --args --profile-directory='Default' https://apple.com
open -a 'Google Chrome.app' --new --args --profile-directory='Profile 1' https://apple.com
You can test your browser with the same command pattern. If it works, let us know which browser and profile argument you used.
How do I configure OpenIn integration with macOS Focus?
OpenIn integrates with Focus through the Focus Hint feature.
- In OpenIn Settings, create a Focus Hint, such as
Work. - Add a rule that runs only when that Focus Hint is active.
- In macOS System Settings, open the Focus configuration and set the OpenIn Focus Hint to the same value.
OpenIn uses Focus Hints because macOS does not allow applications to read the names of your configured Focus modes.
Example: how the author of OpenIn uses OpenIn
This example shows one complete Browsers handler configuration.
Configured applications:
- Safari - Personal - default Safari profile.
- Safari - Work - work Safari profile.
- Safari - Private - private Safari profile.
- Music - Music.app, with a regular expression that rewrites
https://(.*)tomusic://$1. - Reddit - Reddit Safari Web App.
- zoom.us - Zoom application, with a regular expression that rewrites
https:\/\/([^.]+\.)?zoom\.us\/j\/(\d+)(\?(.*))tozoommtg://$1zoom.us/join?confno=$2&$4
Configured rules:
- Reddit - matches
*.redditmail.comand*.reddit.com, and targets the Reddit app. The script handles*.redditmail.comURLs by resolving the real Reddit URL.
if (ctx.url.hostname.endsWith('redditmail.com')) {
ctx.url.href = decodeURIComponent(ctx.url.pathname.split("/", 3)[2])
}
- music.apple.com - matches
music.apple.comand targets only Music. - zoom - matches
*.zoom.us/j/*and targets only zoom.us. - Browser Extension - runs only for requests from the browser extension toolbar button or context menu. Targets Safari - Personal, Safari - Work, and Safari - Private.
- Share Menu - runs only for requests from the Share menu. Targets Safari - Personal, Safari - Work, and Safari - Private.
- Cmd - runs when the Command key is pressed. Targets Safari - Personal, Safari - Work, and Safari - Private.
- Default - default rule with one selected browser: Safari - Personal.
For the Browsers handler, this default script removes tracking parameters:
(function() {
const url = ctx.url;
// exact param names to remove:
const trackingParams = new Set([
'fbclid',
'gclid',
'mc_cid',
'mc_eid',
'yclid',
'mkt_tok'
]);
// param-name prefixes to remove:
const trackingPrefixes = [
'utm_',
'uta_',
'_hsenc',
'_hsmi'
];
// collect all current params, then filter
for (const key of Array.from(url.searchParams.keys())) {
const lowerKey = key.toLowerCase();
const isExact = trackingParams.has(lowerKey);
const hasPrefix = trackingPrefixes.some(prefix => lowerKey.startsWith(prefix));
if (isExact || hasPrefix) {
url.searchParams.delete(key);
}
}
})();
With this configuration, most links open in Safari. When the Command key is pressed, OpenIn shows the browser selection dialog.
Can you recommend alternatives to OpenIn?
If OpenIn is not the right tool for you, take a look at these alternatives:
- Choosy - paid.
- Bumpr - paid.
- Velja - paid.
- Finicky - open-source, free.
- Browserosaurus - open-source, free, archived
Privacy Policy
We believe very strongly in our customers’ right to privacy. Our customer records are not for sale or trade, and we will not disclose our customer data to any third party except as may be required by law.
Any information that you provide to us in the course of interacting with our sales or technical support departments is held in strict confidence. This includes your contact information (including, but not limited to your email address and phone number), as well as any data that you supply to us in the course of a technical support interaction.
Previous versions
- Latest supported version for macOS 14.x - OpenIn 4.2.2
