# 使用 Homebrew 安装 onigmo

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

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install onigmo
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:onigmo
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/onigmo>
- **版本:** 6.2.0
- **来源摘要:** Regular expressions library forked from Oniguruma
- **主页:** <https://github.com/k-takata/Onigmo>
- **仓库:** <https://github.com/k-takata/Onigmo>
- **许可证:** BSD-2-Clause
- **源码归档:** <https://github.com/k-takata/Onigmo/releases/download/Onigmo-6.2.0/onigmo-6.2.0.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- onigmo-config (cli)
- onigmo-config (别名)

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 6.2.0
- 本地数据: OK
- 上游仓库: https://github.com/k-takata/Onigmo
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** onigmo
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Package publisher tools](https://pkg.so/zh-hans/package-publishers/) - Belongs to a package publishing or registry command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [groonga](https://pkg.so/zh-hans/brew/groonga/) - Popular package that depends on this formula.
- [oniguruma](https://pkg.so/zh-hans/brew/oniguruma/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, libraries, regular-expressions.
- [rgxg](https://pkg.so/zh-hans/brew/rgxg/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, regular-expressions, text-processing.
- [pcre2](https://pkg.so/zh-hans/brew/pcre2/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, libraries, regular-expressions.
- [pcre](https://pkg.so/zh-hans/brew/pcre/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, libraries, regular-expressions.
- [ncurses](https://pkg.so/zh-hans/brew/ncurses/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, libraries.
- [expat](https://pkg.so/zh-hans/brew/expat/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, libraries.
- [libevent](https://pkg.so/zh-hans/brew/libevent/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, libraries.
- [libxml2](https://pkg.so/zh-hans/brew/libxml2/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, libraries.
- [grok](https://pkg.so/zh-hans/brew/grok/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, expressions, processing.

## 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
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- cross-ecosystem install command graph
