# 使用 Homebrew, apk, MacPorts, Nix, pacman 安装 yaml-language-server

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

## 安装

```sh
sudo av install brew:yaml-language-server
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install yaml-language-server
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install yaml-language-server
```

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

### Linux

- apk (92%):

```sh
sudo apk add yaml-language-server
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#yaml-language-server
```

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

- pacman (92%):

```sh
sudo pacman -S yaml-language-server
```

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

## 软件包事实

- **软件包键:** brew:yaml-language-server
- **软件包管理器:** Homebrew
- **版本:** 1.24.0
- **来源摘要:** Language Server for Yaml Files
- **主页:** <https://github.com/redhat-developer/yaml-language-server>
- **最后更新:** 2026-07-08T21:42:21Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- yaml-language-server (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

YAML Language Server is Red Hat's Language Server Protocol implementation for YAML files. It brings schema-backed validation, completion, hover, formatting, document symbols, Kubernetes awareness, and SchemaStore integration to editors that can speak LSP.

### 项目历史

The GitHub repository was created in July 2017. Red Hat's October 2017 launch article says the work began around Kubernetes syntax support, then broadened into a general YAML language server with built-in Kubernetes support as the team saw a wider opportunity.

The server was published as an npm package in September 2017 and used by Red Hat's VS Code YAML extension, Eclipse Che, and other editor integrations. The README later records major parser and schema support evolution: JSON Schema drafts 04, 07, 2019-09, and 2020-12, and the 1.0.0 switch to the `eemeli/yaml` parser with strict YAML version handling.

### 采用历史

Adoption followed the Language Server Protocol pattern: one server package could power multiple editors instead of each editor maintaining its own YAML intelligence. Red Hat's VS Code Marketplace listing describes the extension as YAML support via yaml-language-server with built-in Kubernetes syntax support, and shows a large installed base for the extension.

The server became especially valuable as YAML became the configuration language for Kubernetes, CI systems, Compose files, package metadata, and infrastructure tools. Schema association through JSON Schema Store let the same server understand many file types without hard-coding every ecosystem.

### 使用方式

Package users normally install the `yaml-language-server` executable and let an editor client launch it over stdio or another LSP transport. Configuration maps schemas to glob patterns, toggles validation, hover, completion, formatting, SchemaStore, Kubernetes CRD discovery, custom YAML tags, key ordering, and YAML 1.1 versus 1.2 parsing behavior.

Its practical value is editor feedback before a YAML file reaches a cluster, CI runner, package tool, or deployment system: bad structure, unknown keys, type errors, and schema mismatches become diagnostics and completions during editing.

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

YAML Language Server is package-nerd glue for the LSP era. It turns a messy, indentation-sensitive data language into reusable editor infrastructure, and its Homebrew/npm-style CLI package matters because editors, terminals, and non-VS Code clients can all share the same server.

### 时间线

- 2017-07: The public GitHub repository was created.
- 2017-09: npm records the first `yaml-language-server` package publication.
- 2017-10: Red Hat announced the YAML Language Server and VS Code extension, noting npm availability, Eclipse Che integration, and early reuse by Atom's ide-yaml package.
- 2021: npm records the 1.0.0 release; the README says 1.0.0 switched to the `eemeli/yaml` parser.
- 2020s: The README documents JSON Schema draft 04, 07, 2019-09, and 2020-12 support plus SchemaStore and Kubernetes CRD integration.

### Related projects

- vscode-yaml is Red Hat's VS Code extension that uses yaml-language-server.
- JSON Schema Store provides many schemas consumed through the server's schema-store integration.
- eemeli/yaml is the YAML parser used by the server starting with the 1.0.0 line.

### 来源

- <https://api.github.com/repos/redhat-developer/yaml-language-server>
- <https://developers.redhat.com/blog/2017/10/18/yaml-language-server-extension-vs-code>
- <https://github.com/redhat-developer/yaml-language-server#readme>
- <https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml>
- <https://registry.npmjs.org/yaml-language-server>


## 安全说明

没有找到 yaml-language-server 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


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

- Nix - yaml-language-server: normalized package name match | nixpkgs package indexes: pkgs/by-name/ya/yaml-language-server/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - yaml-language-server - 1.24.0-r0: normalized package name match | Alpine Linux edge package indexes: yaml-language-server from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Language Server for YAML Files | https://github.com/redhat-developer/yaml-language-server
- apk - yaml-language-server-doc - 1.24.0-r0: normalized package name match | Alpine Linux edge package indexes: yaml-language-server-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Language Server for YAML Files (documentation) | https://github.com/redhat-developer/yaml-language-server
- pacman - yaml-language-server - 1.23.0-1: normalized package name match | Arch Linux sync databases: yaml-language-server from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | YAML Language Server | https://github.com/redhat-developer/yaml-language-server
- MacPorts - yaml-language-server: normalized package name match | MacPorts ports tree: devel/yaml-language-server/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/yaml-language-server.yml](https://github.com/mxcl/pkgdb/blob/main/combined/yaml-language-server.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
