# 使用 Homebrew, MacPorts, Nix 安装 duti

查看 duti 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:duti
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install duti
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install duti
```

  证据: MacPorts ports tree: sysutils/duti/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#duti
```

  证据: nixpkgs package indexes: pkgs/by-name/du/duti/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:duti
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/duti>
- **版本:** 1.5.4
- **来源摘要:** Select default apps for documents and URL schemes on macOS
- **主页:** <https://github.com/moretension/duti/>
- **仓库:** <https://github.com/moretension/duti>
- **上游文档:** <https://github.com/moretension/duti#readme>
- **许可证:** LicenseRef-Homebrew-public-domain
- **源码归档:** <https://github.com/moretension/duti/archive/refs/tags/duti-1.5.4.tar.gz>
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- duti (cli)
- duti (别名)

## 构建依赖

- autoconf

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, monterey, sonoma, ventura

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 1.5.4
- 本地数据: OK
- 上游仓库: https://github.com/moretension/duti
- 检测到的最新版本: duti-1.5.4 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

duti is a macOS command-line utility for setting default applications for document types, URL schemes, extensions, and MIME types. It is one of those small macOS plumbing tools that became package-manager-relevant because Apple exposes the concept through Launch Services and UTIs but not through a friendly shell command.

### 项目历史

The README says duti was originally released into the public domain by Andrew Mortensen in 2008. The current GitHub repository was created in September 2012 and hosts the README, man page, and tagged releases.

The tool is built around Apple's Uniform Type Identifiers and related handler metadata. It can read settings from stdin, a settings file, an XML plist, or command-line arguments, making it easy to script default-app policy on macOS.

### 采用历史

duti's adoption is mostly in macOS automation circles: users install it through package managers or build it from source, then use it in setup scripts to make browser, editor, document, and URL-scheme defaults reproducible. The README also labels the project unsupported, which makes its persistence in package managers part of its history.

### 使用方式

The man page documents `duti -s` for setting handlers, `duti -x` for printing the default app for an extension, and file/plist input for bulk settings. A settings file contains bundle ID, UTI or URL scheme, and role fields such as viewer, editor, shell, all, or none.

### 为什么软件包爱好者会关心

duti matters because macOS developer machines are often rebuilt from scripts, and default application bindings are otherwise awkward to automate. It gives Homebrew/MacPorts/Nix users a small, scriptable bridge into Apple's UTI and handler database.

### 时间线

- 2008: README says duti was originally released into the public domain.
- 2012-09-25: GitHub repository created.
- 2018-04: README license note dated April 2018.
- 2023-07-09: GitHub repository last pushed according to the GitHub API snapshot.

### Related projects

- The README links `dutis` as an interactive wrapper around duti. Conceptually, duti also sits next to macOS Launch Services tooling and Apple's UTI documentation.

### 来源

- <https://github.com/moretension/duti>
- <https://github.com/moretension/duti/blob/master/duti.1>
- <https://api.github.com/repos/moretension/duti>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** duti
- **Version Scheme:** 0
- **Revision:** 1
- **Head Version:** HEAD
- **Requirements:** macos
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Nix - duti: normalized package name match | nixpkgs package indexes: pkgs/by-name/du/duti/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - duti: normalized package name match | MacPorts ports tree: sysutils/duti/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Productivity CLI packages](https://www.automicvault.com/zh-hans/pkg/productivity-cli-packages/) - Matched curated productivity category metadata from av.db.
- [autoconf](https://www.automicvault.com/zh-hans/pkg/brew/autoconf/) - Build dependency declared by Homebrew.
- [infat](https://www.automicvault.com/zh-hans/pkg/brew/infat/) - Shares av.db curated category or tags: cli, default-apps, macos, system, url-schemes.
- [terminal-notifier](https://www.automicvault.com/zh-hans/pkg/brew/terminal-notifier/) - Shares av.db curated category or tags: cli, desktop-integration, macos, system.
- [defaultbrowser](https://www.automicvault.com/zh-hans/pkg/brew/defaultbrowser/) - Shares av.db curated category or tags: cli, default-apps, macos, system.
- [desktop-file-utils](https://www.automicvault.com/zh-hans/pkg/brew/desktop-file-utils/) - Shares av.db curated category or tags: cli, desktop-integration, system.
- [asitop](https://www.automicvault.com/zh-hans/pkg/brew/asitop/) - Shares av.db curated category or tags: cli, macos, system.
- [bluetoothconnector](https://www.automicvault.com/zh-hans/pkg/brew/bluetoothconnector/) - Shares av.db curated category or tags: cli, macos, system.
- [blueutil](https://www.automicvault.com/zh-hans/pkg/brew/blueutil/) - Shares av.db curated category or tags: cli, macos, system.
- [brightness](https://www.automicvault.com/zh-hans/pkg/brew/brightness/) - Shares av.db curated category or tags: cli, macos, system.

## Combined YAML source

View the package source record on GitHub. [combined/duti.yml](https://github.com/automic-vault/db/blob/main/combined/duti.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
