# 使用 Homebrew, Nix 安装 dockutil

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

## 安装

```sh
sudo av install brew:dockutil
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install dockutil
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#dockutil
```

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

## 软件包事实

- **软件包键:** brew:dockutil
- **软件包管理器:** Homebrew
- **版本:** 3.1.3
- **来源摘要:** Tool for managing dock items
- **主页:** <https://github.com/kcrawford/dockutil>
- **仓库:** <https://github.com/kcrawford/dockutil>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- dockutil (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 3.1.3
## 项目历史与用法

dockutil is a long-running macOS command-line tool for adding, removing, moving, finding, and listing Dock items across one user, a specific Dock plist, or many home directories.

### 项目历史

The GitHub repository was created in July 2011, making dockutil one of the older macOS administration tools in this batch. Its README describes a CLI for managing Dock items including applications, folders, stacks, and URLs, with operations that can target the current user, a specified plist, a home directory, or all homes.

The changelog shows a long maintenance path through macOS changes: 1.1 improved path handling and restart behavior; 2.0 changed preference handling; 2.0.3 waited for Apple's first-login Dock setup; 2.0.5 fixed macOS 10.12 Dock restart behavior; 3.0.0 rewrote the tool in Swift for macOS 12.3 compatibility; and 3.1.x kept pace with Sonoma-era behavior.

### 采用历史

dockutil has been adopted mostly by Mac admins, imaging workflows, onboarding scripts, labs, and managed-device setups that need repeatable Dock state. Its `--allhomes`, plist targeting, and Default User Template examples are signs of fleet-management rather than casual end-user use.

The Homebrew formula remains active and reported stable version 3.1.3, 349 installs in the previous 30 days, and 3,249 installs in the previous year as of June 30, 2026. That is strong relative usage for a narrow macOS administration utility.

### 使用方式

Common commands include `dockutil --add /Applications/TextEdit.app`, `dockutil --remove 'System Preferences' --allhomes`, `dockutil --move 'System Preferences' --position 2 --allhomes`, `dockutil --list`, and `dockutil --add '' --type spacer`. Options handle position, replacement, Dock section, folder view/display/sort behavior, `--no-restart`, `--allhomes`, and alternate home locations.

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

dockutil is package-nerd significant because it gives admins a scriptable abstraction over a user-interface preference file that Apple changes over time. Its value is not glamour; it is preserving boring, repeatable Dock state across macOS releases and managed-user contexts.

### 时间线

- 2011: GitHub repository created.
- 2016: 2.0.x releases improved macOS compatibility and Dock restart behavior.
- 2022: 3.0.0 rewrote dockutil in Swift for macOS 12.3 compatibility.
- 2024: 3.1.3 fixed Dock restart behavior for macOS 14.4 compatibility.
- 2026: Homebrew formula API reports stable 3.1.3.

### Related projects

- dockutil is related to macOS Dock preferences, plist-based administration, first-login setup scripts, and Mac fleet-management tools such as Munki, Jamf, and other MDM/onboarding systems that call command-line helpers.
- It complements Apple's own Dock UI and defaults/plist tooling by exposing Dock-specific operations as stable CLI verbs.

### 来源

- <https://github.com/kcrawford/dockutil#readme>
- <https://api.github.com/repos/kcrawford/dockutil>
- <https://github.com/kcrawford/dockutil/releases/tag/2.0.5>
- <https://github.com/kcrawford/dockutil/releases/tag/3.0.0>
- <https://github.com/kcrawford/dockutil/releases/tag/3.1.3>
- <https://formulae.brew.sh/api/formula/dockutil.json>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Nix - dockutil: normalized package name match | nixpkgs package indexes: pkgs/by-name/do/dockutil/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/dockutil.yml](https://github.com/mxcl/pkgdb/blob/main/combined/dockutil.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
