# 使用 Homebrew, Nix, apt 安装 yamale

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

## 安装

```sh
sudo av install brew:yamale
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install yamale
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#yamale
```

  证据: nixpkgs package indexes: yamale from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- Debian apt (92%):

```sh
sudo apt install python3-yamale
```

  证据: Debian stable package indexes: python3-yamale from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

## 软件包事实

- **软件包键:** brew:yamale
- **软件包管理器:** Homebrew
- **版本:** 6.1.0
- **来源摘要:** Schema and validator for YAML
- **主页:** <https://github.com/23andMe/Yamale>
- **仓库:** <https://github.com/23andMe/Yamale>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- yamale (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Yamale is a Python library and command-line tool for validating YAML files with schemas written in Yamale's own YAML-based schema language. It fills the small but common gap between loose YAML configuration files and heavyweight JSON Schema workflows.

### 项目历史

23andMe published the Yamale repository in January 2014. The README describes it simply as a schema and validator for YAML, with both CLI and Python API entry points. Its schema format keeps schemas as YAML documents whose leaves are validator expressions such as `str()`, `int()`, includes, recursion, strict-mode controls, and custom validators.

The PyPI history shows public releases beginning in June 2014 and continued maintenance into the 6.x series. Over time the README added Python 3-only requirements, optional ruamel.yaml parsing for YAML 1.2 support, multiprocessing CLI validation, strict-mode controls, and a warning that schemas should come from trusted sources because the schema language is executable enough to be treated as a trust boundary.

### 采用历史

Yamale adoption is mostly practical: teams with YAML configuration, data files, or repository conventions can add a schema file and run a CLI check in tests or continuous integration. It is attractive when a project wants a readable schema next to YAML data without converting the validation problem to JSON Schema.

### 使用方式

From the command line, Yamale searches a target path for YAML files and looks nearby or upward for a schema file unless one is specified. From Python, callers build schema and data objects with `yamale.make_schema` and `yamale.make_data`, then call `yamale.validate` and handle validation errors.

Yamale is best suited to project-owned schemas: configuration contracts, fixtures, data drops, and repository policy checks. Its own README cautions against accepting malicious schema definitions from untrusted sources.

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

For package nerds, Yamale is a tidy example of a domain-specific validator that stayed deliberately smaller than JSON Schema. It shows up as both a CLI package and a Python import, useful for making YAML-heavy projects less ambiguous without buying into a larger schema ecosystem.

### 时间线

- 2014-01: The public GitHub repository was created under 23andMe.
- 2014-06: PyPI records the earliest available Yamale release uploads.
- 2020s: The README documents Python 3.8+, optional ruamel.yaml parsing, CLI multiprocessing, includes, recursion, and strict-mode behavior.
- 2025: PyPI records the 6.x release line.

### Related projects

- Yamale sits near JSON Schema validators, PyKwalify, Cerberus-style Python validators, and YAML linters, but it keeps its own compact schema expression syntax rather than adopting JSON Schema as the schema language.

### 来源

- <https://api.github.com/repos/23andMe/Yamale>
- <https://github.com/23andMe/Yamale#readme>
- <https://pypi.org/pypi/yamale/json>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - python3-yamale - 6.0.0.1-1: normalized package name match | Debian stable package indexes: python3-yamale from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | schema and validator for YAML | https://github.com/23andMe/Yamale
- Nix - yamale: normalized package name match | nixpkgs package indexes: yamale from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix


## Combined YAML source

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