🍺 BREW Explorer

← all formulae

duti

brew install duti v1.5.4_1 LicenseRef-Homebrew-public-domain

Command-line utility to set default applications for document types and URL schemes on macOS using Uniform Type Identifiers (UTI).

Why you might care

Allows scripting and automation of macOS default app associations, which normally require clicking through System Preferences. Useful for dotfile management, machine setup scripts, or bulk configuration from plist files. Handles UTIs directly rather than just file extensions, giving fine-grained control over which app handles specific document types.

Categories

Alternatives

LaunchServices System Preferences
2.4k
30-day installs · #893
7.2k
90-day · #936
15.7k
365-day · #1189
2.0k
★ GitHub stars · updated 2y ago

Build dependencies

Links

Blurb generated by claude-haiku-4-5 on today.

Raw metadata
{
  "aliases": [],
  "alternatives": [
    "LaunchServices",
    "System Preferences"
  ],
  "build_dependencies": [
    "autoconf"
  ],
  "categories": [
    "sysadmin",
    "shell"
  ],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Select default apps for documents and URL schemes on macOS",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:37:11+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "duti",
  "github_default_branch": "master",
  "github_last_commit_at": "2023-07-09T11:57:53Z",
  "github_readme_excerpt": "duti\n====\n\nduti is a command-line utility capable of setting default applications for\nvarious document types on [macOS](https://www.apple.com/macos/), using Apple\u0027s\n[Uniform Type\nIdentifiers](https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_intro/understand_utis_intro.html)\n(UTI). A UTI is a unique string describing the format of a file\u0027s content. For\ninstance, a Microsoft Word document has a UTI of `com.microsoft.word.doc`. Using\n`duti`, the user can change which application acts as the default handler for a\ngiven UTI.\n\n\nCompiling\n---------\n\n    autoreconf -i\n    ./configure\n    make\n    sudo make install\n\n\nUsage\n-----\n\n`duti` can read settings from four different sources:\n\n1. standard input\n\n1. a settings file\n\n1. an XML [property list](https://en.wikipedia.org/wiki/Property_list) (plist)\n\n1. command-line arguments.\n\nA settings line, as read in cases 1 and 2, consists of an application\u0027s bundle\nID, a UTI, and a string describing what role the application handles for the\ngiven UTI. The process is similar when `duti` processes a plist. If the path\ngiven to `duti` on the command-line is a directory, `duti` will apply settings\nfrom all valid settings files in that directory, excluding files whose names\nbegin with `.` (single dot).\n\n`duti` can also print out the default application information for a given\nextension (`-x`). This feature is based on public domain source code posted\nby Keith Alperin on the heliumfoot.com blog.\n\nSee the man page for additional usage details.\n\n\nExamples\n--------\n\n* Set Safari as the default handler for HTML documents:\n\n    ```sh\n    duti -s com.apple.Safari public.html all\n    ```\n\n* Set TextEdit as the default handler for Word documents:\n\n    ```sh\n    echo \u0027com.apple.TextEdit   com.microsoft.word.doc all\u0027 | duti\n    ```\n\n* Set Finder as the default handler for ftp:// URLs:\n\n    ```sh\n    duti -s com.apple.Finder ftp\n    ```\n\n* Get default application information for .jp",
  "github_repo": "moretension/duti",
  "github_stars": 2008,
  "github_topics": [],
  "homepage": "https://github.com/moretension/duti/",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 2378,
  "installs_365d": 15718,
  "installs_90d": 7231,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "LicenseRef-Homebrew-public-domain",
  "llm_generated_at": "2026-06-20T23:47:42+00:00",
  "llm_model": "claude-haiku-4-5",
  "name": "duti",
  "oldnames": [],
  "one_liner": "Command-line utility to set default applications for document types and URL schemes on macOS using Uniform Type Identifiers (UTI).",
  "optional_dependencies": [],
  "rank_30d": 893,
  "rank_365d": 1189,
  "rank_90d": 936,
  "raw_hash": "5dce03e9547b46be",
  "recommended_dependencies": [],
  "revision": 1,
  "ruby_source_path": "Formula/d/duti.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": "HEAD",
  "version_stable": "1.5.4",
  "versioned_formulae": [],
  "why_use_this": "Allows scripting and automation of macOS default app associations, which normally require clicking through System Preferences. Useful for dotfile management, machine setup scripts, or bulk configuration from plist files. Handles UTIs directly rather than just file extensions, giving fine-grained control over which app handles specific document types."
}