# grex を Homebrew, MacPorts, Nix, pacman, zypper, scoop でインストール

grex のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:grex
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install grex
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install grex
```

  証拠: MacPorts ports tree: textproc/grex/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#grex
```

  証拠: nixpkgs package indexes: pkgs/by-name/gr/grex/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S grex
```

  証拠: Arch Linux sync databases: grex from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install grex
```

  証拠: openSUSE Tumbleweed package metadata: grex from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/grex
```

  証拠: Scoop official bucket manifest trees: bucket/grex.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## パッケージ情報

- **パッケージキー:** brew:grex
- **パッケージマネージャ:** Homebrew
- **バージョン:** 1.4.6
- **ソース概要:** Command-line tool for generating regular expressions
- **ホームページ:** <https://pemistahl.github.io/grex-js/>
- **リポジトリ:** <https://github.com/pemistahl/grex>
- **最終更新:** 2026-06-15T10:20:17-04:00
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- grex (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 1.4.6
## プロジェクトの歴史と使われ方

grex is a Rust command-line tool and library that generates regular expressions from user-provided test cases. It belongs to the developer-tooling tradition around regex synthesis: not replacing regex knowledge, but giving users a correct starting expression that can be inspected and refined.

### プロジェクトの歴史

The README states that grex began as a Rust port of Devon Govett's JavaScript regexgen project after regexgen development had apparently ceased. Peter M. Stahl's project kept the regex-generation idea but used Rust's strengths for command-line tooling and expanded the feature set beyond the original port.

Official GitHub releases show public versioned releases starting with v0.1.0 on 2019-10-06, followed by v1.0.0 on 2020-02-02. Later releases added and refined library, CLI, Unicode, packaging, and binding surfaces, while the README presents grex as both a command-line executable and a Rust crate with Python bindings.

### 採用の歴史

grex reached package-manager users through the Rust ecosystem first, with crates.io as the upstream registry path, and through binary/package managers such as Homebrew, MacPorts, Scoop, Chocolatey, Huber, Nix, Arch, and openSUSE as reflected by the README and batch package facts. Its packaging surface is broad because it is a single CLI binary but also a reusable library.

### 使われ方

Users pass examples directly on the command line, from a file, or through a Unix pipeline. By default grex generates a specific expression that matches the supplied test cases; flags can generalize output by converting digits, whitespace, word characters, repeated substrings, anchors, groups, escaping, case sensitivity, verbosity, and colorized display.

The README cautions that generated expressions still need human understanding. That caveat is part of the tool's identity: grex is best used to bootstrap or audit a regex, not to remove the need to understand the target language and engine.

### パッケージ好きにとっての重要性

grex is package-nerd significant because it packages an algorithmic helper for one of the most common developer annoyances: turning examples into a regular expression. It is also a Rust CLI case study, distributed as source through cargo and as prebuilt binaries or package-manager formulas for users who do not want a Rust toolchain.

Its relationship to regexgen also makes it a small example of ecosystem migration: a JavaScript idea revived as a Rust CLI and library, then exposed through additional language bindings.

### タイムライン

- 2019: v0.1.0 published in the official GitHub release feed.
- 2020: v1.0.0 published after several 0.x releases.
- 2021: v1.2.0 and v1.3.0 releases continued the 1.x line.
- 2022: v1.4.0 and v1.4.1 releases appeared.
- 2024: v1.4.5 published in the official GitHub release feed.
- 2025: v1.4.6 published with release assets for several operating-system and CPU targets.

### Related projects

- regexgen is the JavaScript project that grex began by porting.
- Rust's regex crate is a stated compatibility target for generated expressions.
- grex-js is the related JavaScript/WebAssembly demo and library surface linked from the repository.
- crates.io, PyPI, Homebrew, MacPorts, Scoop, Chocolatey, and Huber are distribution surfaces named by upstream or batch package facts.

### ソース

- <https://api.github.com/repos/pemistahl/grex/releases?per_page=100>
- <https://crates.io/crates/grex>
- <https://github.com/pemistahl/grex>
- <https://raw.githubusercontent.com/pemistahl/grex/main/README.md>


## セキュリティノート

narrow executable package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- narrow executable package without higher-risk signals

## 他のパッケージマネージャ記録

- Nix - grex: normalized package name match | nixpkgs package indexes: pkgs/by-name/gr/grex/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - grex - 1.4.6-2: normalized package name match | Arch Linux sync databases: grex from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A command-line tool for generating regular expressions from user-provided input strings | https://github.com/pemistahl/grex
- zypper - grex - 1.4.6-1.4: normalized package name match | openSUSE Tumbleweed package metadata: grex from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | CLI regex generator | https://github.com/pemistahl/grex
- MacPorts - grex: normalized package name match | MacPorts ports tree: textproc/grex/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/grex: normalized package name match | Scoop official bucket manifest trees: bucket/grex.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

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