# Install n with Homebrew, MacPorts

Node version management. Version 10.2.0 via Homebrew; verified from local package data.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install n
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install n
```

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

## Package facts

- **Package key:** brew:n
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/n>
- **Version:** 10.2.0
- **Source summary:** Node version management
- **Homepage:** <https://github.com/tj/n>
- **Repository:** <https://github.com/tj/n>
- **Upstream docs:** <https://github.com/tj/n#readme>
- **License:** MIT
- **Source archive:** <https://github.com/tj/n/archive/refs/tags/v10.2.0.tar.gz>
- **Generated:** 2026-07-09T07:20:21+00:00

## Executables

- n (cli)
- n (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-07-09
- Package-manager version: 10.2.0
- Local data: ok
- Upstream repository: https://github.com/tj/n
- Upstream latest detected: v10.2.0 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 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

### Sources

- <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>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **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

## Other Package-Manager Records

- 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


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [plenv](https://www.automicvault.com/pkg/brew/plenv/) - Shares av.db curated category or tags: cli, language-runtime, runtime, shell, version-manager.
- [node](https://www.automicvault.com/pkg/brew/node/) - Shares av.db curated category or tags: cli, javascript, language-runtime, nodejs, runtime.
- [coffeescript](https://www.automicvault.com/pkg/brew/coffeescript/) - Shares av.db curated category or tags: cli, javascript, language-runtime, nodejs.
- [deno](https://www.automicvault.com/pkg/brew/deno/) - Shares av.db curated category or tags: cli, javascript, language-runtime, runtime.
- [duktape](https://www.automicvault.com/pkg/brew/duktape/) - Shares av.db curated category or tags: cli, javascript, language-runtime, runtime.
- [fibjs](https://www.automicvault.com/pkg/brew/fibjs/) - Shares av.db curated category or tags: cli, javascript, language-runtime, runtime.
- [pyenv](https://www.automicvault.com/pkg/brew/pyenv/) - Shares av.db curated category or tags: cli, language-runtime, shell, version-manager.
- [quickjs](https://www.automicvault.com/pkg/brew/quickjs/) - Shares av.db curated category or tags: cli, javascript, language-runtime, runtime.
- [n](https://www.automicvault.com/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/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)


## Sources

- 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
