# 使用 Homebrew, dnf, winget 安装 spectral-cli

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

## 安装

```sh
sudo av install brew:spectral-cli
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install spectral-cli
```

  证据: local Homebrew formula metadata

### Linux

- dnf (92%):

```sh
sudo dnf install neochat
```

  证据: Fedora Rawhide package metadata: neochat from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

### Windows

- winget (92%):

```sh
winget install --id Stoplight.Spectral -e
```

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

## 软件包事实

- **软件包键:** brew:spectral-cli
- **软件包管理器:** Homebrew
- **版本:** 6.16.2
- **来源摘要:** JSON/YAML linter and support OpenAPI v3.1/v3.0/v2.0, and AsyncAPI v2.x
- **主页:** <https://stoplight.io/open-source/spectral>
- **最后更新:** 2026-07-21T07:03:13Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- spectral (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Spectral CLI is Stoplight's command-line linter for JSON and YAML documents, especially OpenAPI, AsyncAPI, Arazzo, and custom API style-guide rulesets.

### 项目历史

The official repository describes Spectral as a flexible JSON/YAML linter for creating automated style guides, with ready-to-use rulesets for OpenAPI, AsyncAPI, and Arazzo. The repository was created in 2018, and the README credits Mike Ralphson for kicking off the Spectral CLI.

### 采用历史

Spectral's adoption is visible in its official README: installation through npm or yarn, editor and CI integrations, a GitHub Action, Stoplight Studio support, and examples of real-world rulesets from API programs and companies. GitHub API metadata shows thousands of stars and ongoing releases through 2026.

### 使用方式

Users typically create a local .spectral.yaml ruleset, extend built-in rulesets such as spectral:oas or spectral:asyncapi, and run spectral lint against API descriptions. The CLI can also use custom rulesets supplied from a different path.

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

Spectral is package-manager-relevant because it made API governance scriptable: a style guide can live as a versioned ruleset, be installed by npm, Homebrew, or platform packages, and run in editors, git hooks, and CI without a proprietary service.

### 时间线

- 2018: The official GitHub repository was created on August 15.
- 2021: Official discussions show users installing pinned CLI versions such as 5.9.2 from GitHub releases.
- 2025: Release v6.15.0 was published on April 22.
- 2026: @stoplight/spectral-cli-6.16.1 was published on June 30.

### Related projects

- Related projects and integrations include @stoplight/spectral-cli, spectral-action, Stoplight Studio, VS Code Spectral Extension, API Stylebook, and Stoplight's Spectral ruleset repositories.

### 来源

- <https://api.github.com/repos/stoplightio/spectral>
- <https://api.github.com/repos/stoplightio/spectral/releases?per_page=10>
- <https://docs.stoplight.io/docs/spectral/ZG9jOjYx-overview>
- <https://github.com/stoplightio/spectral#readme>
- source_facts.package-manager


## 安全说明

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



## 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: .spectral.yaml, .spectral.yml, .spectral.json, .spectral.js
## 其他软件包管理器记录

- dnf - neochat - 26.07.90-1.fc45: installed executable or alias match | Fedora Rawhide package metadata: neochat from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Client for matrix, the decentralized communication protocol | https://invent.kde.org/network/neochat
- winget - Stoplight.Spectral: installed executable or alias match | Windows Package Manager source index: Stoplight.Spectral from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

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