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

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

## インストール

```sh
sudo av install brew:watchexec
```

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

### macOS

- Homebrew (100%):

```sh
brew install watchexec
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install watchexec
```

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

### Linux

- apk (92%):

```sh
sudo apk add watchexec
```

  証拠: Alpine Linux edge package indexes: watchexec from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#watchexec
```

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

- pacman (92%):

```sh
sudo pacman -S watchexec
```

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

- zypper (92%):

```sh
sudo zypper install watchexec
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/watchexec
```

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

## パッケージ情報

- **パッケージキー:** brew:watchexec
- **パッケージマネージャ:** Homebrew
- **バージョン:** 2.5.1
- **ソース概要:** Execute commands when watched files change
- **ホームページ:** <https://watchexec.github.io/>
- **リポジトリ:** <https://github.com/watchexec/watchexec>
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- watchexec (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

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

watchexec is a Rust command-line tool that watches files and runs commands when they change. It is aimed at software-development feedback loops: rebuild, retest, rerun a server, invoke a linter, or emit structured file-change events without binding the workflow to one programming language or build system.

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

The public GitHub repository dates to September 18, 2016, and the GitHub release feed records an early 1.5.0 release on November 23, 2016. The project has since grown from a standalone file-watcher command into what its citation metadata calls both a tool and a crate ecosystem, with the CLI, reusable library crates, event types, signal support, process supervision, ignore-file handling, project-origin helpers, and related utilities.

The current README emphasizes cross-platform behavior on OS X/macOS, Linux, Windows, and more, along with practical details that matter in real projects: recursive watching, coalescing editor save bursts, loading `.gitignore` and `.ignore`, process-group handling, exposing changed paths through environment variables or JSON on stdin, and avoiding any required language runtime. The 2026 citation metadata identifies version 2.5.1, released March 30, 2026, and credits Matt Green and Felix Saparelli.

### 採用の歴史

watchexec's adoption is visible in both packaging breadth and downstream specialization. The upstream package list distinguishes first-party binary packages, distro packages, Homebrew and MacPorts, Windows packaging through Scoop and Chocolatey, and installation through Cargo or cargo-binstall. The README also lists downstreams such as cargo-watch, cargo-lambda, devenv.sh, dotter, ghciwatch, and Tectonic, showing that watchexec is used both as an executable and as infrastructure for other developer tools.

The repository page reports roughly seven thousand stars and more than one hundred releases, which is substantial for a general-purpose CLI watcher. More importantly, the project's anti-feature is part of its adoption story: it is intentionally not tied to Git, not tied to a language ecosystem, and not a wrapper requiring cryptic `xargs` pipelines.

### 使われ方

Common invocations are direct and task-shaped: watch JavaScript, CSS, and HTML files and run `npm run build`; restart `python server.py` when Python files change; run `make test` while ignoring `target`; send a signal instead of restarting; or emit JSON events to stdout for another program to consume. The CLI README documents extension filters, watch roots, ignore patterns, desktop notifications, timings, shell selection, process groups, and generated completions/manual pages.

In package-maintainer and developer workflows, watchexec is the lightweight alternative to writing a bespoke file watcher into each project. It can sit beside `make`, `just`, `systemfd`, cargo tools, static site generators, test runners, and local servers, providing the missing event loop while letting the existing command remain the source of truth.

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

watchexec matters to package nerds because it packages the hard part of cross-platform file watching into a small, reusable Rust tool with first-party binaries, distro packages, and library crates. It also reflects a modern CLI pattern: one executable for everyday use, but a crate ecosystem underneath for downstream tools that need event filtering, process supervision, and shell-independent process control.

### タイムライン

- 2016-09-18: GitHub repository created.
- 2016-11-23: Early 1.5.0 GitHub release published.
- 2020s: Project grows into a multi-crate ecosystem around the CLI and reusable watcher components.
- 2026-03-30: Citation metadata and releases identify CLI v2.5.1.
- 2026: Upstream package list documents first-party binaries plus Linux, macOS, Windows, Cargo, and Binstall distribution paths.

### Related projects

- Related tools include entr, Watchman, cargo-watch, notify-rs, just, systemfd, checkexec, ghciwatch, and language-specific development servers. watchexec's role is the general-purpose command rerunner rather than the source-control-aware service role played by Watchman.

### ソース

- <https://api.github.com/repos/watchexec/watchexec>
- <https://github.com/watchexec/watchexec>
- <https://raw.githubusercontent.com/watchexec/watchexec/main/CITATION.cff>
- <https://raw.githubusercontent.com/watchexec/watchexec/main/README.md>
- <https://raw.githubusercontent.com/watchexec/watchexec/main/crates/cli/README.md>
- <https://raw.githubusercontent.com/watchexec/watchexec/main/doc/packages.md>


## セキュリティノート

narrow executable package without higher-risk signals.

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

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

- Nix - watchexec: normalized package name match | nixpkgs package indexes: pkgs/by-name/wa/watchexec/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - watchexec - 2.5.1-r0: normalized package name match | Alpine Linux edge package indexes: watchexec from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Executes commands in response to file modifications | https://github.com/watchexec/watchexec
- apk - watchexec-bash-completion - 2.5.1-r0: normalized package name match | Alpine Linux edge package indexes: watchexec-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for watchexec | https://github.com/watchexec/watchexec
- apk - watchexec-doc - 2.5.1-r0: normalized package name match | Alpine Linux edge package indexes: watchexec-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Executes commands in response to file modifications (documentation) | https://github.com/watchexec/watchexec
- apk - watchexec-fish-completion - 2.5.1-r0: normalized package name match | Alpine Linux edge package indexes: watchexec-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for watchexec | https://github.com/watchexec/watchexec
- apk - watchexec-zsh-completion - 2.5.1-r0: normalized package name match | Alpine Linux edge package indexes: watchexec-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for watchexec | https://github.com/watchexec/watchexec
- pacman - watchexec - 2.5.1-2: normalized package name match | Arch Linux sync databases: watchexec from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Executes commands in response to file modifications | https://github.com/watchexec/watchexec
- zypper - watchexec - 2.5.1-1.3: normalized package name match | openSUSE Tumbleweed package metadata: watchexec from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Watches a path and runs a command whenever it detects modifications. | https://github.com/watchexec/watchexec
- MacPorts - watchexec: normalized package name match | MacPorts ports tree: sysutils/watchexec/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/watchexec: normalized package name match | Scoop official bucket manifest trees: bucket/watchexec.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/watchexec.yml](https://github.com/mxcl/pkgdb/blob/main/combined/watchexec.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
