Table of content
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 also have configurations options to customize how you want to handle URLs on web pages.
Default behavior is that you can redirect to OpenIn links with Context Menu (on a link) or by clicking the Toolbar button of OpenIn. And Browser never sends links to a “Default Browser” configured on your system, it always keeps the links within itself. But you can override this behavior by using OpenIn Browser Settings.
In case of Safari, for example, you can go to Safari Settings → Extensions and find Settings button for OpenIn extension. With those settings you can configure as well to automatically override all links and forward them to OpenIn (or just links that points to external domain from the page you are on), or only send to OpenIn with a modifier key.
OpenIn Helper
Required only for OpenIn, installed from Mac App Store.
Description
- Are you using multiple browsers or Mail applications on your Mac?
- Do you want to open links in a specific browser every time you click them?
- Do you want to open links in a specific profile of your browser?
- Do you want to open links in private mode directly by clicking the link?
- Do you want to open zoom invites directly in the zoom application?
- Do you use more than one application for a specific file type?
- Do you use your Mac for work and personal projects?
Remember the last time you double-clicked an app and regretted it right away? Because fully loaded IDE was a default application for a Markdown file, you wanted to edit? No more. We give you a list of applications that support a specific file type, so you can choose which application you want to open.
We can help you with that and more. OpenIn.app is an advanced utility that allows you open links, emails, and files in the application of your choice. Just click it, and select the application from the list. This is the easiest way to organize your workflow.
Use cases
- You can configure OpenIn to open a browser (or application) based on the Focus defined in your system
- You can configure OpenIn to open mailto:// links directly with the browser and web mail provider (Gmail, Outlook, Fastmail, etc)
- You can always define by default to open files and links with a specific application, and configure additional rules for domains, paths, key modifiers, apps where the links were clicked, etc
- You can configure by default to always show the app selection dialog
- You can configure opening links directly within the applications that support them. For example, iTunes to Apple TV, music to Apple Music, zoom links to zoom applications, and more.
- You can configure opening links in Safari Web Applications.
- You can configure opening links in a specific Safari Profile.
Support
Start a discussion on r/openin/ or send me an email at support@loshadki.app
Documentation
OpenIn is a rule based application. Say, if you want to configure how to handle http(s)
scheme for Browsers, first you add all the applications
that you want to handle http(s)
scheme (for example Safari and Music application). After that you can configure the rules.
For example, first rule can be based on domain matching, if the domain is matching music.apple.com
we will target the Music application.
Second rule can be a default rule, which only keeps Safari as a target application.
When only one application is targeting with the rule, the app selection dialog is not going to be shown (unless you are using the trial version of OpenIn, which always shows this dialog).
If some rule targets multiple applications, the app selection dialog will be shown.
Hope that helps.
Rewriting URL with Regular Expressions
For the application you can configure the URL rewriting using regular expressions.
Example to rewrite the scheme from https://
to music://
- Expression -
https://(.*)
- Substitution -
music://$1
Launching zsh script as an application.
This gives you unlimited power to automate your tasks. To send files and urls to any application of your choice, or maybe even add some automations.
One detail, when OpenIn executes the script, it passes some environment variables to the script:
OPENIN_SOURCE_APP_PATH
- if it is availableOPENIN_FOCUS_HINT
- if it is availableOPENIN_KEY_MODIFIERS_COMMAND
- will have a value1
when executed in that contextOPENIN_KEY_MODIFIERS_SHIFT
- will have a value1
when executed in that contextOPENIN_KEY_MODIFIERS_OPTION
- will have a value1
when executed in that contextOPENIN_KEY_MODIFIERS_FUNCTION
- will have a value1
when executed in that contextOPENIN_KEY_MODIFIERS_CONTROL
- will have a value1
when executed in that contextOPENIN_IS_FOR_PRINTING
- will have a value1
when executed in that contextOPENIN_SHARE_MENU
- will have a value1
when executed in that contextOPENIN_HANDOFF
- will have a value1
when executed in that contextOPENIN_BROWSER_EXTENSION_TYPE
- possible valuestoolbar
,contextmenu
,link
JavaScript
OpenIn uses JavaScript engine, compatible with Safari. You can find various default built-in classes available in JavaScript engine,
one of the best documentations for JavaScript is MDN. You can find which
classes and functions are available, if they are available in the Safari version installed on your Mac. The only exception is window
object,
which is not available in the JavaScript engine used by OpenIn.
Additionally you can use console.log()
to log messages to the console.
For applications
Using JavaScript you can change the URL. Simple example, if you need to send music:
scheme to the Music.app instead of https:
.
The url
object is available for the script.
With the properties:
fragment
- everything after#
(string
)host
- hostname and port (string
)hostname
- just a domain, hostname (string
)href
- string representation of full URL (string
)username
- username (string
)password
- password (string
)pathname
- the path (string
)port
- port (string
)protocol
- scheme (string
)search
- query of the URL (string
)searchParams
- object to work on URL query (SearchParams
)
SearchParams
provides an object with the following methods:
append(name, value)
- append the search key valuedelete(name)
- delete all query items with the nameget(name)
- get the first value of the query with the namegetAll(name)
- get all values as an array of the query with the namehas(name)
- check if the query has a keyset(name, value)
- set the name and value for the searchkeys()
- get the array of all keys
Example to rewrite scheme from https:
to music:
url.protocol = 'music:';
For rules and default handlers
The ctx
object is available for the script (context) with the following methods and properties:
url
- returns theURL
object (see documentation above in For applications section)getSourceApp()
- returnsOpenContextSourceApp
object that can tell you if OpenIn recognized the application where the link was openedgetApps()
- returns the array of apps where OpenIn logic has already been applied, but you can override it (array ofOpenContextApp
)isForPrinting()
- (bool
) check if a file was requested to be opened for printinggetModifiers()
- returnsOpenContextModifiers
object that can tell which modifiers are pressed when a link or file was requested to be opened by the userisShareMenu()
- (bool
) check if the link was sent by the Share Menu “Open in OpenIn”isHandoff()
- (bool
) check if the link was sent by Handoff in OpenIngetFocusHint()
- (string
) get focus hint configured with the System Settings Focus (empty string if none is configured)
OpenContextSourceApp
provides the following properties:
path
- (string
) the path of the application that sent an open requestisShareMenu
- (bool
) check if the link was sent by the Share Menu “Open in OpenIn”
You can check if the opening app is Slack or another app. Just a note: when you open links from Slack, it is going to be a
different app that is under /Applications/Slack.app/...
, so to check if that is the Slack app, you want to check if this path starts with the Slack.app path.
OpenContextApp
provides the following properties:
name
- the name of the app (string
)running
- check if the app is running (bool
)bundleIdentifier
- the bundle identifier of the app (string
)profile
- (string
) the profile of the app (string
)privateMode
- (bool
) check if the app is in private mode (bool
)visible
- (bool
) you can get or set this property, which is where you can apply your logic. For the list of apps that you are getting from OpenIn, you can configure which ones you want to see in the result list
OpenContextModifiers
provides an object with the following properties:
shift
- shift pressed (bool
)option
- option pressed (bool
)command
- command pressed (bool
)function
- function 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 link to
let apps = ctx.getApps()
// if the source app (where the link is opened) is Slack,
// keep only Safari as the visible app for OpenIn
// and because we will have only one app left,
// OpenIn will just open Safari
if (ctx.getSourceApp().path.startsWith("/Applications/Slack.app")) {
apps.forEach(function (app) {
app.visible = (app.name == "Safari")
})
return
}
// all loshadki.app URLs direct to Safari as well
if (url.hostname.endsWith("loshadki.app")) {
apps.forEach(function (app) {
app.visible = (app.name == "Safari")
})
return
}
// all google.com URLs direct to Safari and Chrome
if (url.hostname.endsWith("google.com")) {
apps.forEach(function (app) {
app.visible = ["Safari", "Google Chrome"].includes(app.name)
})
return
}
})()
FAQ
Can I convert license from MAS to Web version or vice versa?
Unfortunately, no. The App Store and Direct versions are separate applications, and there is no way to transfer the license.
Discounts for Press/Blogs/Video/Reviews?
Obsolutely! If you have ability to reach your audience, we can offer you a discount or application for free. Just send us an email to support@loshadki.app with information about your project and the number of users you expect to reach.
Discounts for other purposes (students, etc)?
We pretty often offer discounts for our applications (summer, black friday, holidays).
What is the difference between App Store, Web version and Setapp?
The web version (downloaded from our website) is similar to the Setapp version - it is not a sandboxed application, which means it is not limited and all features work out of the box. The App Store version is sandboxed and has some limitations, which we work around with OpenIn Helper.
In reality, all versions are identical - they just have different ways of distribution. Choose the one that is easy for you to install and update.
Cannot access the OpenIn Settings Window
If you have disabled showing the icon in the MenuBar, you don’t have an easy way to access the Settings Window. Do the following: try to “open” (double-click) OpenIn in Finder a second time. OpenIn will recognize that you are opening it again and will show the MenuBar icon for 5 seconds, so you can access the Preferences.
Can I invoke OpenIn from my own script?
You can use the Shortcuts.app to make OpenIn to open a specific browser, or browser with URL.
Also, OpenIn supports openin:
scheme, for example you can call URL openin:open?url=YOUR_URL
.
How to configure OpenIn as a default Mail Application?
Open Mail.app preferences and select OpenIn.app as the default Mail application. Refer to Apple Documentation. For the App Store version, if you are using OpenIn Helper, you can do it from the app (the SetApp and Web version supports that out of the box).
How to configure OpenIn as a default application for a file extension?
- Open OpenIn preferences
- At the bottom of File types click on add file type… and type the file extension you want to use. Alternatively you can just drop a file with a specific 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.
- In Finder, right-click to open the Get Info dialog on the file with the desired file extension.
- In the dialog, change the application in Open With to OpenIn and click on Change All…
For the App Store version, if you use OpenIn Helper, you can just click on Fix It for this file extension (the SetApp and Web version supports that out of the box).
Can OpenIn support profiles in Browser X (Arc, Dia …)?
A browser supporting profiles is not the same as a browser allowing links to be opened in a specific profile. I am getting asked a LOT if OpenIn can support some specific browser, and a lot of them just don’t support allowing other apps to send them links to a specific profile.
Arc and Dia are two browsers, that don’t support opening links in a specific profile.
Most Chromium based browsers support it using the command line argument, similar to the following example:
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 to see if it supports that command line combination, and let us know if it works.
How to configure OpenIn integration with macOS Focus?
They work through “Focus Hint” feature. You need to define “Focus Hint” in OpenIn settings, when you configure the rules. Say you can have a Focus Hint Work, and define a rule that will work only when this Hint is activated. In the macOS settings, for the Focus Work you can configure Work Hint for OpenIn application.
*The reason is made this way, because macOS does not allow applications to read the name of the available Focuses.
Example: how the author of OpenIn uses OpenIn
The list of applications I have:
- Safari - Personal - Default Safari Profile.
- Safari - Work - Work Safari Profile.
- Safari - Private - Private Safari Profile.
- Music - Music.app where I rewrite the URL with Regular Expression from
https://(.*)
tomusic://$1
- Reddit - Safari Web App Reddit
- zoom.us - Zoom application where I rewrite the URL with Regular Expression from
https:\/\/([^.]+\.)?zoom\.us\/j\/(\d+)(\?(.*))
tozoommtg://$1zoom.us/join?confno=$2&$4
In the rules I have the next set of rules:
- Reddit - where I have domains added
*.redditmail.com
and*.reddit.com
, targeting app Reddit. And in the script I have a special case for*.redditmail.com
URLs, where I actually resolve 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 domains
music.apple.com
and has only the Music app selected - zoom - matches domains
*.zoom.us/j/*
and has only the zoom.us app selected. - Browser Extension - Execute only when received from Browser Extension (Toolbar button, Context Menu) - select Safari - Personal, Safari - Work, Safari - Private.
- Share Menu - Execute only when received from Share Menu - select Safari - Personal, Safari - Work, Safari - Private.
- Cmd - With Key Modifiers ⌘ and Selected apps Safari - Personal, Safari - Work, Safari - Private.
- Default - My default rule with only one browser selected: Safari - Personal.
For the whole handler Browsers I have in the script default script to remove 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 in most cases my links are opened in Safari, and when I press ⌘ I have the browser list selection.
Not sure about OpenIn, could you recommend alternatives?
If you feel like OpenIn is not the right tool for you, please take a look at alternatives.
- Choosy - paid.
- Bumpr - paid.
- Velja - paid.
- Finicky - open-source, free.
- Browserosaurus - open-source, free
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