# n を Homebrew, MacPorts でインストール

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

## インストール

```sh
sudo av install brew:n
```

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

### macOS

- Homebrew (100%):

```sh
brew install n
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install n
```

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

## パッケージ情報

- **パッケージキー:** brew:n
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/n>
- **バージョン:** 10.2.0
- **ソース概要:** Node version management
- **ホームページ:** <https://github.com/tj/n>
- **リポジトリ:** <https://github.com/tj/n>
- **上流ドキュメント:** <https://github.com/tj/n#readme>
- **ライセンス:** MIT
- **ソースアーカイブ:** <https://github.com/tj/n/archive/refs/tags/v10.2.0.tar.gz>
- **生成日時:** 2026-07-09T07:20:21+00:00

## 実行可能ファイル

- n (cli)
- n (エイリアス)

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 all

## バージョンと鮮度

- ページ生成日: 2026-07-09
- マネージャ版: 10.2.0
- ローカルデータ: OK
- 上流リポジトリ: https://github.com/tj/n
- 検出された最新: v10.2.0 (最新)
- 情報: No package-manager update timestamp was available.
## プロジェクトの歴史と使われ方

n is a long-lived Node.js version manager by TJ Holowaychuk. The GitHub repository and npm package both date to January 5, 2011, placing it in the early era when Node users needed fast local switching between rapidly moving Node releases. It remains a small, Unix-style tool rather than a broader runtime manager: install a version, keep downloaded versions in a cache, and switch the active Node in place.

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

The project is implemented primarily as shell code and distributed through npm, Homebrew, MacPorts, and direct script installation. Release v10.2.0 was published on GitHub on May 21, 2025 and is also the stable Homebrew version. The project has continued to adapt to Node ecosystem changes, including LTS aliases, package.json engine resolution, custom mirrors, alternate architectures, and preservation of npm/corepack during Node installs.

### 採用の歴史

n has broad practical adoption among developers who want a simpler alternative to shell-integrating version managers. The GitHub API showed 19,516 stars and 764 forks on July 1, 2026. npm reported 1,667,021 downloads for May 30, 2026 through June 28, 2026, and Homebrew reported 9,495 installs in the preceding 365 days. Those numbers reflect different distribution channels: npm is the dominant installation path, while Homebrew remains a convenient macOS/Linux route.

### 使われ方

The common workflow is `n lts`, `n latest`, or `n 20` to install and switch Node, with bare `n` opening the interactive selector over cached versions. Package nerds use `n run`, `n exec`, and `n which` when they need to run commands under a cached Node without changing the active install. The `engine` label is useful in repos that declare a Node range in package.json, while `N_NODE_MIRROR`, `N_ARCH`, `--offline`, and `--cleanup` cover mirrors, architecture-specific downloads, air-gapped/cache use, and container one-shot installs.

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

n matters because it is intentionally narrow: it manages Node versions without trying to own the whole shell session or project environment. That makes it especially handy on CI images, disposable containers, remote shells, and machines where a global Node install is acceptable. The tradeoff is also the reason people still compare it with nvm/fnm/asdf/Volta: n changes the active installed Node rather than providing per-directory shims by default.

### タイムライン

- 2011-01-05: GitHub repository and npm package created.
- 2025-05-21: v10.2.0 published on GitHub.
- 2026-05-30 to 2026-06-28: npm reported 1,667,021 downloads.
- 2026-07-01: GitHub API showed 19,516 stars and Homebrew API showed 9,495 installs over 365 days.

### Related projects

- Node.js
- npm
- nvm
- fnm
- Volta
- asdf

### ソース

- <https://api.github.com/repos/tj/n>
- <https://api.npmjs.org/downloads/point/last-month/n>
- <https://formulae.brew.sh/api/formula/n.json>
- <https://formulae.brew.sh/formula/n>
- <https://github.com/tj/n>
- <https://github.com/tj/n/releases>
- <https://registry.npmjs.org/n>


## セキュリティノート

narrow executable package without higher-risk signals.

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

## ソースデータベース詳細

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** n
- **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

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

- MacPorts - n: normalized package name match | MacPorts ports tree: devel/n/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 関連リンク

- [Source-control packages](https://www.automicvault.com/ja/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/ja/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://www.automicvault.com/ja/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://www.automicvault.com/ja/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [plenv](https://www.automicvault.com/ja/pkg/brew/plenv/) - Shares av.db curated category or tags: cli, language-runtime, runtime, shell, version-manager.
- [node](https://www.automicvault.com/ja/pkg/brew/node/) - Shares av.db curated category or tags: cli, javascript, language-runtime, nodejs, runtime.
- [coffeescript](https://www.automicvault.com/ja/pkg/brew/coffeescript/) - Shares av.db curated category or tags: cli, javascript, language-runtime, nodejs.
- [deno](https://www.automicvault.com/ja/pkg/brew/deno/) - Shares av.db curated category or tags: cli, javascript, language-runtime, runtime.
- [duktape](https://www.automicvault.com/ja/pkg/brew/duktape/) - Shares av.db curated category or tags: cli, javascript, language-runtime, runtime.
- [fibjs](https://www.automicvault.com/ja/pkg/brew/fibjs/) - Shares av.db curated category or tags: cli, javascript, language-runtime, runtime.
- [pyenv](https://www.automicvault.com/ja/pkg/brew/pyenv/) - Shares av.db curated category or tags: cli, language-runtime, shell, version-manager.
- [quickjs](https://www.automicvault.com/ja/pkg/brew/quickjs/) - Shares av.db curated category or tags: cli, javascript, language-runtime, runtime.
- [n](https://www.automicvault.com/ja/pkg/npm/n/) - Same normalized package name appears in another local ecosystem. Shared terms: cli, language, language-runtime, manager, node.
- [n](https://www.automicvault.com/ja/pkg/npm/n/) - Same normalized package name in another local ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/n.yml](https://github.com/automic-vault/db/blob/main/combined/n.yml)


## ソース

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
