# 使用 Homebrew 安装 onigmo

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

## 安装

```sh
sudo av install brew:onigmo
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install onigmo
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:onigmo
- **软件包管理器:** Homebrew
- **版本:** 6.2.0
- **来源摘要:** Regular expressions library forked from Oniguruma
- **主页:** <https://github.com/k-takata/Onigmo>
- **仓库:** <https://github.com/k-takata/Onigmo>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- onigmo-config (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Onigmo, short for Oniguruma-mod, is a BSD-licensed regular-expression library forked from Oniguruma. It focuses on adding syntax supported by Perl 5.10 and later, including operators such as \K, \R, and conditional patterns.

### 项目历史

The upstream README describes Onigmo as a fork of Oniguruma with a focus on newer expression syntax. Its most important branch of influence came through Ruby: the README says Onigmo is the default regexp library of Ruby 2.0 or later and that many patches are backported from Ruby 2.x.

Ruby's own issue discussion for merging Onigmo into Ruby 2.0 framed the change as replacing the Oniguruma base used by Ruby 1.9's regular-expression and M17N infrastructure with k-takata's modified Onigmo.

### 采用历史

Onigmo's adoption is strongest through embedders rather than direct CLI use. Ruby made it part of the language runtime, and Fluent Bit's documentation says its Ruby-mode regular-expression parser uses the Onigmo library.

The Homebrew formula exposes Onigmo as a standalone library package with an onigmo-config helper, giving downstream C and C++ consumers a conventional way to compile and link against it.

### 使用方式

Developers embed Onigmo when they want Ruby-compatible or Perl-influenced regular-expression behavior in native code. The upstream build notes cover Unix/Cygwin configure builds, Windows Visual C++ builds, static and dynamic libraries, tests across encodings, and the onigmo-config flags needed by downstream builds.

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

Onigmo matters because it is both a fork and a runtime substrate: package managers carry it as a library, but many users encounter it indirectly through Ruby-compatible regex behavior. It also illustrates how language runtime needs can pull a general-purpose C library into a specialized fork.

### 时间线

- Ruby 2.0 planning: Ruby issue #5820 targeted merging Onigmo as the replacement for Ruby 1.9's Oniguruma-derived regex engine.
- Ruby 2.0 and later: the Onigmo README identifies it as Ruby's default regexp library in this era.

### Related projects

- Onigmo is directly related to Oniguruma, Ruby's regular-expression engine history, and embedders such as Fluent Bit that expose Ruby-style regular expressions.

### 来源

- <https://docs.fluentbit.io/manual/1.5/pipeline/parsers/regular-expression>
- <https://formulae.brew.sh/formula/onigmo>
- <https://github.com/k-takata/Onigmo>
- <https://www.ruby-forum.com/t/ruby-trunk-feature-5820-assigned-merge-onigmo-to-ruby-2-0/215257>


## 安全说明

library-like package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- library-like package without higher-risk signals


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
