Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/nrwl/nx/llms.txt

Use this file to discover all available pages before exploring further.

Global installation

Install Nx globally to run commands from anywhere. Choose a method based on your operating system and package manager.
npm add --global nx
You can also use yarn global add nx, pnpm add --global nx, or bun add --global nx.

Verify installation

nx --version
You should see a version number like 22.5.0.

Update global installation

npm update --global nx
You can also use yarn global upgrade nx, pnpm update --global nx, or bun update --global nx.

Install in a repository

To add Nx to an existing repository, run:
npx nx@latest init
This installs the nx package as a dev dependency and creates an nx.json configuration file. If you have Nx installed globally, it will defer to the local version in your repository.
You can also manually install the nx npm package and create an nx.json configuration file by hand.

Update Nx in your repository

When you update Nx in your repository, it will also automatically update your dependencies if you have an Nx plugin installed for that dependency. To update Nx, run:
nx migrate latest
This creates a migrations.json file with any update scripts that need to be run. Apply them with:
nx migrate --run-migrations
To avoid potential issues, update one major version of Nx at a time.

System requirements

Nx is built with Rust for performance and ships precompiled native binaries for the following platforms:
PlatformArchitectures
Linux (GNU)x64, arm64, armv7
Linux (musl)x64, arm64
macOSx64, arm64
Windows (MSVC)x64, arm64
FreeBSDx64
Nx requires Node.js (LTS recommended). No other global dependencies are required — Nx manages tooling per project via plugins.

Build docs developers (and LLMs) love