What is Nx?
Nx (formerly Nrwl Extension) is a powerful open-source build system and monorepo platform created by the team at Nrwl. Originally focused on Angular, it has grown into a full-stack toolkit supporting React, Vue, Node.js, Next.js, Nest.js, and more.
With Nx 20 (released 2024), the @nrwl scoped packages have been fully replaced by @nx scoped packages. Nx is no longer just an Angular CLI extension — it is a complete monorepo platform with smart caching, CI distribution, and AI-assisted development.
Key Features (2024/2025)
Smart Caching
Local and remote caching via Nx Cloud — never rebuild what hasn't changed.
Nx Agents
Distribute CI tasks across multiple machines automatically with a single line of config.
Atomizer
Automatically splits long e2e tests into smaller parallel tasks for faster CI.
Dep Graph
Visualize project dependencies and understand what's affected by any change.
Project Crystal
Plugins enhance your existing config files without replacing them — no lock-in.
Flakiness Detection
Nx Cloud automatically retries flaky tests so your pipeline keeps moving.
Why Use Nx?
- Share code across multiple apps in a single repository without duplication.
- Run only the tasks affected by your changes — not the entire codebase.
- Consistent tooling across Angular, React, Node.js, and more in one workspace.
- Enforce module boundaries and architectural rules with lint rules.
- Scale CI pipelines with distributed task execution via Nx Cloud.
Getting Started with Nx
Create a New Workspace
# Create workspace with Angular preset
npx create-nx-workspace@latest myworkspace --preset=angular
# Create workspace with React preset
npx create-nx-workspace@latest myworkspace --preset=react
# Create empty workspace
npx create-nx-workspace@latest myworkspace --preset=emptyAdd Nx to an Existing Project
npx nx@latest initAdd Framework Plugins (Nx 20+ uses @nx scope)
npm install --save-dev @nx/angular
npm install --save-dev @nx/react
npm install --save-dev @nx/node
npm install --save-dev @nx/express
npm install --save-dev @nx/nest
npm install --save-dev @nx/nextGenerate Apps and Libraries
nx g @nx/angular:application myapp
nx g @nx/angular:library mylib
nx g @nx/react:application my-react-app
nx g @nx/node:application my-apiCommon Nx Commands
nx serve myapp # Serve an app
nx build myapp # Build an app
nx test myapp # Run tests
nx lint myapp # Lint a project
nx affected --target=build # Build only affected projects
nx affected --target=test # Test only affected projects
nx graph # Open dependency graph in browser
nx migrate latest # Migrate to latest Nx versionEnable Nx Cloud (Remote Caching)
npx nx connect # Connect to Nx Cloud
npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" # Nx Agents in CINx vs Angular CLI
| Feature | Angular CLI | Nx |
|---|---|---|
| Multiple apps in one repo | ||
| Smart build caching | ||
| Affected commands | ||
| Dependency graph | ||
| CI distribution (Nx Agents) | ||
| Multi-framework support | ||
| Module boundary enforcement | ||
| Code generators |