# ondir を Homebrew, apt, MacPorts, Nix でインストール

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

## インストール

```sh
sudo av install brew:ondir
```

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

### macOS

- Homebrew (100%):

```sh
brew install ondir
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ondir
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install ondir
```

  証拠: Debian stable package indexes: ondir from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#ondir
```

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

## パッケージ情報

- **パッケージキー:** brew:ondir
- **パッケージマネージャ:** Homebrew
- **バージョン:** 0.2.4
- **ソース概要:** Automatically execute scripts as you traverse directories
- **ホームページ:** <https://swapoff.org/ondir.html>
- **リポジトリ:** <https://github.com/alecthomas/ondir>
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- ondir (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

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

OnDir is a small terminal automation utility for running directory-specific shell actions when a user enters, leaves, or passes through configured paths. Its core idea is deliberately narrow: pair shell startup hooks with entries in ~/.ondirrc so path traversal can change process-local state such as umask values, environment setup, or virtualenv activation.

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

The upstream documentation presents OnDir as a compact C and shell tool by Alec Thomas, with source tarballs from 0.1.0 through 0.2.2 published on the project page and a mirrored GitHub repository containing the README, man page, shell hooks, and configuration examples. The project stayed small by design; the README describes the behavior as simple but effective.

### 使われ方

Users install shell hooks for Bash, tcsh, zsh, or fish and then define enter and leave sections in ~/.ondirrc. The examples cover a public_html umask change, multiple paths per section, tilde and environment-variable expansion, regular-expression path matching, and automatic activation or deactivation of Python virtual environments.

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

OnDir is an early Unix-style answer to per-directory environment automation: tiny, text-configured, and shell-integrated rather than a large daemon. For package nerds, it is interesting less for scale than for how long the directory-hook pattern has been packaged as a standalone CLI.

### Related projects

- The project sits in the same conceptual space as shell prompt hooks and per-directory environment tools, but its implementation is limited to running configured scripts during directory traversal.

### ソース

- <https://formulae.brew.sh/formula/ondir>
- <https://github.com/alecthomas/ondir>
- <https://swapoff.org/ondir.html>


## セキュリティノート

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.ondirrc
## 他のパッケージマネージャ記録

- Debian apt - ondir - 0.2.3+git20140220.55279f0-1: normalized package name match | Debian stable package indexes: ondir from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Automate tasks specific to certain directories in the shell | https://swapoff.org/ondir.html
- Nix - ondir: normalized package name match | nixpkgs package indexes: pkgs/by-name/on/ondir/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - ondir - 0.2.3+git0.55279f03-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: ondir from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Automate tasks specific to certain directories in the shell | http://swapoff.org/ondir.html
- MacPorts - ondir: normalized package name match | MacPorts ports tree: sysutils/ondir/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/ondir.yml](https://github.com/mxcl/pkgdb/blob/main/combined/ondir.yml)


## ソース

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
