🔧
Build Tool4M+/wkMIT

nx

Nx is a powerful build system with first-class monorepo support and powerful integrations that provides smart, fast, and extensible build infrastructure for any

Installation

npm
npm install -D nx
yarn
yarn add -D nx
pnpm
pnpm add -D nx

Import

ESM
// nx.json configuration

Quick Example

usage
// nx.json
{
  "targetDefaults": {
    "build": {
      "dependsOn": ["^build"],
      "cache": true
    },
    "test": {
      "cache": true
    }
  }
}

About nx

Nx is a powerful build system with first-class monorepo support and powerful integrations that provides smart, fast, and extensible build infrastructure for any codebase. Nx offers computation caching (local and remote), distributed task execution across multiple machines, affected commands that only run tasks for changed projects, code generators for scaffolding new projects and components, and a visual dependency graph for understanding project relationships. Unlike Turborepo which focuses on task orchestration, Nx provides a complete development platform with plugins for React, Angular, Vue, Node.js, Next.js, Nest, and many other frameworks that include generators, executors, and migration utilities. The affected command analyzes git changes against the project dependency graph to determine which projects need rebuilding, testing, or linting, significantly reducing CI time for large monorepos. Nx Cloud provides remote caching and distributed task execution across CI agents, achieving near-linear scaling of build times as the codebase grows. Nx can be adopted incrementally — it works with existing projects as a task runner and can be extended with plugins for deeper integration.

Quick Facts

Packagenx
CategoryBuild Tool
Weekly Downloads4M+
LicenseMIT
Installnpm install -D nx

Related Packages

Browse npm Packages by Category

Explore our reference of 200 popular npm packages with install commands, examples, and quick-start guides.