/uvɛʀtyʀ/ nf. opening
Ouverture
is a macOS utility aiming to facilitate the process of inspecting and modifying the default handlers of file types and URL schemes.
Warning: This project is still in its early days. Use it with care!
-
homebrew
install:brew install rami3l/tap/ouverture
-
Build from source:
# The recommended way is to use `mint`, so we will install it first: brew install mint # To install the latest release: mint install rami3l/Ouverture # To live on the bleeding edge: mint install rami3l/Ouverture@master
The use of this project is mainly around UTI
s (what's this?) and URL Schemes.
You can find a complete list of UTIs here, and a list of URL schemes here.
-
Set default handler by bundle path:
# URL schemes end with `://` ovt bind path /Applications/Safari.app/ http:// # UTIs are reverse domain names ovt bind path /Applications/Safari.app/ com.adobe.pdf # Extensions start with a `.` ovt bind path /Applications/Safari.app/ .pdf # ... or you can simply omit the `.` ovt bind path /Applications/Safari.app/ # `path` can also be omitted here ovt bind /Applications/Safari.app/ pdf
-
Set default handler by bundle ID:
# See above, just use `ovt bind id` this time ovt bind id com.apple.Safari http://
Find all the file types or URL schemes supported by an app bundle.
-
Check support by bundle path:
ovt check path /Applications/IINA.app # => File Extensions: 3g2, 3gp, aa3, aac, ... # `path` can be omitted here ovt check /Applications/IINA.app/
-
Check support by bundle ID:
# See above, just use `ovt check id` this time ovt check id com.apple.Safari # => File Extensions: css, download, gif, ...
ovt id /Applications/Safari.app/ # => com.apple.Safari
Find all the app bundles which have claimed some file type or URL scheme.
# URL schemes end with `://`
ovt lookup http:// # => com.apple.Safari, ...
# UTIs are reverse domain names
ovt lookup com.adobe.pdf # => com.apple.Preview, ...
# Extensions start with a `.`
ovt lookup .pdf # => com.apple.Preview, ...
# ... or you can simply omit the `.`
ovt lookup pdf # => com.apple.Preview, ...
# This will return a list of all possible paths
ovt which com.apple.Safari
# Use `--lucky` if you want the first one only
ovt which com.apple.Safari --lucky # => /Applications/Safari.app
-
Get the UTI of a file extension:
ovt uti from-ext .pdf # => com.adobe.pdp # ... or you can simply omit the `.` ovt uti from-ext pdf # => com.adobe.pdf
-
Get the possible extension(s) of a UTI:
ovt uti to-ext public.mpeg-4 # => mp4, mpeg4 # Use `--lucky` if you want the first one only ovt uti to-ext public.mpeg-4 --lucky # => mp4
-
Get the parent(s) of a UTI:
ovt uti parent public.mpeg-4 # => public.movie
-
Get the description string of a UTI:
# This might not work on some machines ovt uti describe public.mpeg-4 # => MPEG-4 movie