# srgn を Homebrew, MacPorts, Nix, pacman でインストール

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

## インストール

```sh
sudo av install brew:srgn
```

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

### macOS

- Homebrew (100%):

```sh
brew install srgn
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install srgn
```

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

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#srgn
```

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

- pacman (92%):

```sh
sudo pacman -S srgn
```

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

## パッケージ情報

- **パッケージキー:** brew:srgn
- **パッケージマネージャ:** Homebrew
- **バージョン:** 0.14.2
- **ソース概要:** Code surgeon for precise text and code transplantation
- **ホームページ:** <https://github.com/alexpovel/srgn>
- **リポジトリ:** <https://github.com/alexpovel/srgn>
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- srgn (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

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

srgn is a Rust command-line search and transformation tool that combines regular-expression scopes with optional syntax-aware scopes based on programming-language grammars. Its author characterizes it as a mix of `tr`, `sed`, `ripgrep`, and tree-sitter.

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

The public repository was created in 2023 and released v0.1.0 that October. The README records that its earliest core was a Rust rewrite of a tool devoted to German character substitutions; it then expanded into a general code-aware search and transformation utility.

### 採用の歴史

The official installation guide documents release binaries, cargo-binstall, Homebrew, Nix and a repository flake, MacPorts, and compilation through Cargo. The package metadata additionally records a Pacman package, giving srgn unusually broad distribution for a focused refactoring CLI.

### 使われ方

srgn can search or transform stdin and files with regular expressions, then narrow operations to syntax-aware language scopes. Actions include replacement, case conversion, deletion, squeezing, and language-specific transformations, and shell completions are built into the CLI.

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

srgn sits between traditional Unix text filters and IDE refactoring: it preserves a composable command-line interface while using parsers to select structural code regions. Its prebuilt binaries and presence across Cargo, Homebrew, Nix, MacPorts, and Pacman make it especially accessible to polyglot CLI users.

### タイムライン

- 2023: Official repository created.
- 2023: v0.1.0 published.
- 2025: v0.14.0 changed replacement syntax to reduce accidental destructive use.
- 2026: v0.14.2 published.

### Related projects

- The README positions srgn alongside tr, sed, ripgrep, and tree-sitter while distinguishing its combination of regex actions and grammar-aware scopes.

### ソース

- <https://docs.rs/srgn/latest/srgn>
- <https://github.com/alexpovel/srgn#readme>
- <https://github.com/alexpovel/srgn/releases>
- source_facts.package-manager


## セキュリティノート

narrow executable package without higher-risk signals.

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

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

- Nix - srgn: normalized package name match | nixpkgs package indexes: pkgs/by-name/sr/srgn/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - srgn - 0.14.2-1: normalized package name match | Arch Linux sync databases: srgn from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A code surgeon for precise text and code transplantation | https://github.com/alexpovel/srgn
- MacPorts - srgn: normalized package name match | MacPorts ports tree: devel/srgn/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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