explaingit

tj/n

Analysis updated 2026-06-21

19,524ShellAudience · developerComplexity · 2/5Setup · easy

TLDR

n is a command-line tool for installing and switching between multiple Node.js versions on one machine, no subshells, no profile changes, just an interactive menu and instant cached installs.

Mindmap

mindmap
  root((n))
    What it does
      Switch Node versions
      Install from cache
      Auto-detect version
    Tech stack
      Shell script
      Bash
    Use cases
      Multi-project dev
      CI pipelines
      Docker builds
    Installation
      npm install
      Homebrew
      curl download
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Switch your active Node.js version instantly using an arrow-key menu or a single command like `n lts`.

USE CASE 2

Let n auto-detect the required Node.js version from a project's .nvmrc or .node-version file when you enter the directory.

USE CASE 3

Install a specific Node.js version number for a project that cannot run on the latest release.

What is it built with?

ShellBash

How does it compare?

tj/nagarrharr/awesome-cli-appsvoltagent/awesome-claude-code-subagents
Stars19,52419,54419,743
LanguageShellShellShell
Setup difficultyeasyeasyeasy
Complexity2/51/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

In plain English

n is a command-line tool for managing multiple versions of Node.js on the same computer. Node.js is the JavaScript runtime used to build server-side applications and run development tools. Different projects often require different Node.js versions, and n makes it easy to switch between them without manually uninstalling and reinstalling. The tool is intentionally simple: run n on its own to see a list of your installed Node.js versions with an interactive menu you can navigate with arrow keys, then press Enter to activate the one you want. Run n lts to download and install the latest Long Term Support version. Run n 20.12.2 for a specific version number. When a version has already been downloaded, n installs from its local cache, making switches nearly instant. You can also specify a version using labels like lts, latest, or auto, the auto label reads the required version from a .nvmrc, .node-version, or .n-node-version file in the project directory, which is useful when working across projects that specify their own Node.js requirements. n is written as a Bash shell script and works on macOS, Linux, and Windows Subsystem for Linux. It does not require changes to your shell profile (no subshells, no complex initialization) beyond ensuring the install location is on your PATH. Installation can be done via npm, Homebrew, or by downloading the script directly with curl.

Copy-paste prompts

Prompt 1
I'm using tj/n to manage Node.js versions. Write a shell script that hooks into my cd command, detects a .nvmrc file in the new directory, and runs `n auto` to switch versions automatically.
Prompt 2
Help me install tj/n on a fresh Ubuntu server using curl and configure my PATH so the n-managed Node.js binary takes priority over the system one.
Prompt 3
I want to use n in a GitHub Actions CI workflow. Show me the YAML steps to install n and pin the Node.js version to match my project's .node-version file before running tests.
Prompt 4
How do I use n inside a Dockerfile to install a specific Node.js version without using the official Node.js Docker image?

Frequently asked questions

What is n?

n is a command-line tool for installing and switching between multiple Node.js versions on one machine, no subshells, no profile changes, just an interactive menu and instant cached installs.

What language is n written in?

Mainly Shell. The stack also includes Shell, Bash.

How hard is n to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is n for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub tj on gitmyhub

Verify against the repo before relying on details.