# 使用 Homebrew, apk, MacPorts, Nix, pacman, scoop, winget 安装 dprint

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

## 安装

```sh
sudo av install brew:dprint
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install dprint
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dprint
```

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

### Linux

- apk (92%):

```sh
sudo apk add dprint
```

  证据: Alpine Linux edge package indexes: dprint from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#dprint
```

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

- pacman (92%):

```sh
sudo pacman -S dprint
```

  证据: Arch Linux sync databases: dprint from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install main/dprint
```

  证据: Scoop official bucket manifest trees: bucket/dprint.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id dprint.dprint -e
```

  证据: Windows Package Manager source index: dprint.dprint from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:dprint
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/dprint>
- **版本:** 0.55.2
- **来源摘要:** Pluggable and configurable code formatting platform written in Rust
- **主页:** <https://dprint.dev/>
- **仓库:** <https://github.com/dprint/dprint>
- **上游文档:** <https://dprint.dev/>
- **许可证:** MIT
- **源码归档:** <https://github.com/dprint/dprint/archive/refs/tags/0.55.2.tar.gz>
- **最后更新:** 2026-07-14T21:16:30Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- dprint (cli)
- dprint (别名)

## 依赖

- xz

## 构建依赖

- pkgconf
- rust

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.55.2
- 管理器更新时间: 2026-07-14
- 本地数据: OK
- 上游仓库: https://github.com/dprint/dprint
- 检测到的最新版本: 0.55.2 (当前)
## 项目历史与用法

dprint is a Rust-based, pluggable code-formatting platform that provides one CLI and configuration model for multiple language formatters.

### 项目历史

The dprint/dprint repository was created in June 2019. The project framed itself as a monorepo for a configurable formatting platform rather than a single-language formatter, with a core CLI and separate plugins for TypeScript/JavaScript, JSON, Markdown, TOML, Dockerfile, Python, PHP, C#/VB, Prettier compatibility, and other ecosystems.

### 采用历史

dprint grew in the same package-manager niche as other fast Rust developer tools: a single static-ish CLI distributed through crates.io, npm, Homebrew, Scoop, winget, and Linux package managers. Its official README badges and Homebrew metadata show it as both a Rust crate and a cross-platform command-line formatter.

### 使用方式

A typical workflow is to initialize a dprint config, add formatting plugins, run dprint fmt locally, and run dprint check in continuous integration. The plugin system uses sandboxed Wasm plugins where possible and process plugins where a formatter cannot be packaged as a single Wasm file.

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

dprint matters to package nerds because it treats formatting as a plugin distribution problem: the core executable, plugin registry, checksums, Wasm runtime choice, editor integration, and package-manager installs are all part of the user experience.

### 时间线

- 2019: dprint/dprint was created on GitHub.
- 2020s: the project expanded from core formatting CLI into a plugin catalog covering many languages and wrapper plugins.
- 2026: releases such as 0.55.x show continuing active maintenance.

### Related projects

- Prettier
- Biome
- Ruff
- rustfmt
- dprint-plugin-typescript
- dprint-plugin-markdown

### 来源

- <https://github.com/dprint/dprint>
- <https://raw.githubusercontent.com/dprint/dprint/main/README.md>
- <https://dprint.dev/overview>
- <https://dprint.dev/plugins/>
- <https://api.github.com/repos/dprint/dprint>
- <https://api.github.com/repos/dprint/dprint/releases?per_page=5>


## 安全说明

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Linux: ~/.config/dprint/dprint.jsonc, $XDG_CONFIG_HOME/dprint/dprint.jsonc
- macOS: ~/.config/dprint/dprint.jsonc, $XDG_CONFIG_HOME/dprint/dprint.jsonc, ~/Library/Application Support/dprint/dprint.jsonc
- Unix: dprint.json, dprint.jsonc, .dprint.json, .dprint.jsonc
- Windows: %APPDATA%\dprint\dprint.jsonc
## 源数据库详情

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

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

- Nix - dprint: normalized package name match | nixpkgs package indexes: pkgs/by-name/dp/dprint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - dprint - 0.51.1-r0: normalized package name match | Alpine Linux edge package indexes: dprint from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Pluggable and configurable code formatting platform written in Rust | https://dprint.dev/
- apk - dprint-bash-completion - 0.51.1-r0: normalized package name match | Alpine Linux edge package indexes: dprint-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Bash completions for dprint | https://dprint.dev/
- apk - dprint-doc - 0.51.1-r0: normalized package name match | Alpine Linux edge package indexes: dprint-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Pluggable and configurable code formatting platform written in Rust (documentation) | https://dprint.dev/
- apk - dprint-fish-completion - 0.51.1-r0: normalized package name match | Alpine Linux edge package indexes: dprint-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Fish completions for dprint | https://dprint.dev/
- apk - dprint-zsh-completion - 0.51.1-r0: normalized package name match | Alpine Linux edge package indexes: dprint-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Zsh completions for dprint | https://dprint.dev/
- pacman - dprint - 0.55.2-1: normalized package name match | Arch Linux sync databases: dprint from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Pluggable and configurable code formatting platform | https://github.com/dprint/dprint
- MacPorts - dprint: normalized package name match | MacPorts ports tree: devel/dprint/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/dprint: normalized package name match | Scoop official bucket manifest trees: bucket/dprint.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - dprint.dprint: normalized package name match | Windows Package Manager source index: dprint.dprint from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [xz](https://pkg.so/zh-hans/brew/xz/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [rust](https://pkg.so/zh-hans/brew/rust/) - Build dependency declared by Homebrew.
- [oxfmt](https://pkg.so/zh-hans/brew/oxfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatters, rust.
- [air](https://pkg.so/zh-hans/brew/air/) - Shares pkgdb curated category or tags: cli, developer-tools, formatters, rust.
- [dfmt](https://pkg.so/zh-hans/brew/dfmt/) - Shares pkgdb curated category or tags: cli, code-formatter, developer-tools, formatters.
- [sleek](https://pkg.so/zh-hans/brew/sleek/) - Shares pkgdb curated category or tags: cli, developer-tools, formatters, rust.
- [cbfmt](https://pkg.so/zh-hans/brew/cbfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatters, rust.
- [shfmt](https://pkg.so/zh-hans/brew/shfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatters.
- [buildifier](https://pkg.so/zh-hans/brew/buildifier/) - Shares pkgdb curated category or tags: cli, developer-tools, formatters.
- [astyle](https://pkg.so/zh-hans/brew/astyle/) - Shares pkgdb curated category or tags: cli, developer-tools, formatters.
- [dprint](https://pkg.so/zh-hans/npm/dprint/) - Same normalized package name appears in another local ecosystem. Shared terms: cli, code, configurable, developer, developer-tools.
- [dprint](https://pkg.so/zh-hans/npm/dprint/) - Same normalized package name in another local ecosystem.

## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
