# 使用 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
- **版本:** 0.55.2
- **来源摘要:** Pluggable and configurable code formatting platform written in Rust
- **主页:** <https://dprint.dev/>
- **仓库:** <https://github.com/dprint/dprint>
- **最后更新:** 2026-07-14T21:16:30Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- dprint (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 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
## 其他软件包管理器记录

- 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


## 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
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
