# 使用 Homebrew, Nix, scoop, winget 安装 yara-x

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

## 安装

```sh
sudo av install brew:yara-x
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install yara-x
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#yara-x
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/yara-x
```

  证据: Scoop official bucket manifest trees: bucket/yara-x.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id VirusTotal.YARA-X -e
```

  证据: Windows Package Manager source index: VirusTotal.YARA-X from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:yara-x
- **软件包管理器:** Homebrew
- **版本:** 1.19.0
- **来源摘要:** Tool to do pattern matching for malware research
- **主页:** <https://virustotal.github.io/yara-x/>
- **仓库:** <https://github.com/VirusTotal/yara-x>
- **最后更新:** 2026-06-24T17:31:08Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- yr (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

YARA-X is VirusTotal's Rust rewrite and intended successor to YARA, the rule-based pattern-matching tool used heavily in malware research. It keeps YARA's rule-language lineage while aiming for better safety, performance, user-friendliness, and modern library APIs.

### 项目历史

The yara-x repository was created on 2022-10-14. Upstream describes YARA-X as a re-incarnation of YARA whose ultimate goal is to replace YARA as the default pattern-matching tool for malware researchers. The rewrite also moves the implementation from C into Rust while exposing C/C++, Python, Go, and Rust APIs.

Victor M. Alvarez's 2024 post 'YARA is dead, long live YARA-X' explained the transition without actually abandoning YARA: YARA would continue to receive bug fixes and minor features, while major new modules and enhancements would focus on YARA-X. VirusTotal had already been running the new engine alongside YARA and comparing results at large scale.

YARA-X reached its public stability milestone with v1.0.0 on 2025-06-04. The accompanying YARA-X blog post says the release ended the beta phase and that the original YARA project entered maintenance mode, with future innovation happening in YARA-X.

### 采用历史

The most important adoption signal came from VirusTotal itself. In December 2024, VirusTotal announced that YARA-X had replaced YARA as the engine powering Livehunt and Retrohunt, two production services where rule compatibility and scale matter more than novelty.

Adoption is intentionally migration-shaped rather than greenfield. The docs emphasize high rule compatibility, explain the differences with YARA, and encourage existing YARA users to explore YARA-X without requiring a rushed cutover.

### 使用方式

The packaged CLI is `yr`. Users write familiar YARA-style rules with patterns and conditions, then scan files or integrate the engine through language bindings. YARA-X also adds modern tooling around the rule lifecycle, including formatting, checking, warnings, a configuration file for some commands, and a language server.

Practical usage today is split between command-line malware hunting, CI-style rule validation, and embedding YARA-compatible matching in security products or research pipelines that benefit from Rust's safety and newer APIs.

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

YARA-X is package-nerd significant because it is a rare live succession story for a security standard tool: not a fork competing with the old package, but the same steward moving a widely packaged C utility toward a Rust implementation while preserving rule compatibility.

It also changes the shape of the package from a classic CLI/library pair into a broader toolchain: formatter, checker, language server, multi-language APIs, and a migration target for years of existing YARA rules.

### 时间线

- 2022-10-14: VirusTotal/yara-x repository is created.
- 2024-02-21: VirusTotal publishes 'YARA is dead, long live YARA-X', describing YARA-X as the future development focus.
- 2024-12-04: VirusTotal announces YARA-X powers Livehunt and Retrohunt.
- 2025-06-04: YARA-X 1.0.0 is released as the first stable release.
- 2026-06-24: YARA-X v1.19.0 is published in GitHub releases.

### Related projects

- YARA is the original C implementation and rule-language predecessor now in maintenance mode.
- yara-python is the long-standing Python binding for classic YARA; YARA-X provides its own Python API.
- VirusTotal Livehunt and Retrohunt are production services that moved to YARA-X.

### 来源

- <https://api.github.com/repos/VirusTotal/yara-x>
- <https://api.github.com/repos/VirusTotal/yara-x/releases?per_page=100>
- <https://github.com/VirusTotal/yara-x>
- <https://virustotal.github.io/yara-x/>
- <https://virustotal.github.io/yara-x/blog/virustotal-moves-to-yara-x/>
- <https://virustotal.github.io/yara-x/blog/yara-is-dead-long-live-yara-x/>
- <https://virustotal.github.io/yara-x/blog/yara-x-is-stable/>
- <https://virustotal.github.io/yara-x/docs/intro/getting-started/>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Nix - yara-x: normalized package name match | nixpkgs package indexes: pkgs/by-name/ya/yara-x/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Scoop - main/yara-x: normalized package name match | Scoop official bucket manifest trees: bucket/yara-x.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - VirusTotal.YARA-X: normalized package name match | Windows Package Manager source index: VirusTotal.YARA-X from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

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