# 使用 Homebrew, apk, Nix, pacman 安装 prettier

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

## 安装

```sh
sudo av install brew:prettier
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install prettier
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add prettier
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#prettier
```

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

- pacman (92%):

```sh
sudo pacman -S prettier
```

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

## 软件包事实

- **软件包键:** brew:prettier
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/prettier>
- **版本:** 3.9.6
- **来源摘要:** Code formatter for JavaScript, CSS, JSON, GraphQL, Markdown, YAML
- **主页:** <https://prettier.io/>
- **仓库:** <https://github.com/prettier/prettier>
- **上游文档:** <https://prettier.io/>
- **许可证:** MIT
- **源码归档:** <https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz>
- **最后更新:** 2026-07-22T08:06:49Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- prettier (cli)
- prettier (别名)

## 依赖

- node

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 3.9.6
- 管理器更新时间: 2026-07-22
- 本地数据: OK
- 上游仓库: https://prettier.io/
- 信息: Release/tag comparison is only available for GitHub repositories.

## 安全说明

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

- Unix: package.json, package.yaml, .prettierrc, .prettierrc.json, .prettierrc.yml, .prettierrc.yaml, .prettierrc.json5, .prettierrc.js, prettier.config.js, .prettierrc.ts, prettier.config.ts, .prettierrc.mjs, prettier.config.mjs, .prettierrc.mts, prettier.config.mts, .prettierrc.cjs, prettier.config.cjs, .prettierrc.cts, prettier.config.cts, .prettierrc.toml, .editorconfig
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** prettier
- **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 - prettier: normalized package name match | nixpkgs package indexes: pkgs/by-name/pr/prettier/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - prettier - 3.8.4-r0: normalized package name match | Alpine Linux edge package indexes: prettier from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Opinionated code formatter | https://prettier.io/
- apk - prettier-doc - 3.8.4-r0: normalized package name match | Alpine Linux edge package indexes: prettier-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Opinionated code formatter (documentation) | https://prettier.io/
- pacman - prettier - 3.8.1-1: normalized package name match | Arch Linux sync databases: prettier from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | An opinionated code formatter | https://prettier.io


## 相关链接

- [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.
- [node](https://pkg.so/zh-hans/brew/node/) - Runtime dependency declared by Homebrew.
- [esbuild](https://pkg.so/zh-hans/brew/esbuild/) - Shares pkgdb curated category or tags: cli, css, developer-tools, javascript, typescript.
- [oxfmt](https://pkg.so/zh-hans/brew/oxfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, javascript, typescript.
- [prettierd](https://pkg.so/zh-hans/brew/prettierd/) - Shares pkgdb curated category or tags: cli, code-formatting, developer-tools, formatter.
- [ktfmt](https://pkg.so/zh-hans/brew/ktfmt/) - Shares pkgdb curated category or tags: cli, code-formatting, developer-tools, formatter.
- [ormolu](https://pkg.so/zh-hans/brew/ormolu/) - Shares pkgdb curated category or tags: cli, code-formatting, developer-tools, formatter.
- [findent](https://pkg.so/zh-hans/brew/findent/) - Shares pkgdb curated category or tags: cli, code-formatting, developer-tools, formatter.
- [perltidy](https://pkg.so/zh-hans/brew/perltidy/) - Shares pkgdb curated category or tags: cli, code-formatting, developer-tools, formatter.
- [sql-formatter](https://pkg.so/zh-hans/brew/sql-formatter/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, javascript, typescript.
- [wp-prettier](https://pkg.so/zh-hans/npm/wp-prettier/) - Executable or command metadata overlaps with this package. Shared terms: cli, code, developer, developer-tools, formatter.
- [astgen](https://pkg.so/zh-hans/brew/astgen/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, code, developer, developer-tools, javascript.
- [prettier](https://pkg.so/zh-hans/npm/prettier/) - Same normalized package name in another local ecosystem.

## Combined YAML source

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


## 来源

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