Nx is a build system for monorepos — a monorepo solution for TypeScript and polyglot codebases. Built with Rust for performance and extensible via TypeScript, Nx caches what didn’t change, runs only what’s affected, and comes with an integrated CI solution.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.
Challenges of monorepos
Monorepos have many advantages and are especially powerful for AI-assisted development. But as teams and codebases grow, monorepos are hard to scale:- Slow builds and tests — Hundreds or thousands of tasks compete for CI resources.
- Complex task pipelines — Projects depend on each other, so tasks need to run in the right order, and that’s hard to manage by hand.
- Flaky CI — Longer pipelines lead to random failures and inconsistent results between local and CI environments.
- Architectural erosion — Without clear boundaries, unwanted dependencies creep in and projects become tightly coupled.
What Nx does
Nx reduces friction across your entire development cycle with intelligent caching, task orchestration, and deep understanding of your codebase structure. At its core, Nx:- Runs tasks fast — Caches results so you never rebuild the same code twice.
- Understands your codebase — Builds project and task graphs showing how everything connects.
- Orchestrates intelligently — Runs tasks in the right order, parallelizing when possible.
- Enforces boundaries — Module boundary rules prevent unwanted dependencies between projects.
- Handles flakiness — Automatically re-runs flaky tasks and self-heals CI failures.
Key capabilities
Task Caching
Local and remote caching so you never rebuild the same code twice. Results are replayed instantly on cache hits.
Project Graph
Visual and programmatic exploration of how every project and task in your monorepo connects.
Affected Commands
Run only the tasks affected by your changes. Skip everything else and save CI minutes.
Module Boundaries
Lint rules that enforce architectural constraints and prevent unwanted cross-project dependencies.
Task Distribution
Distribute tasks across many CI agents automatically, with no manual configuration required.
Self-Healing CI
An AI agent on your CI pipeline that detects failures, analyzes root cause, and proposes a fix automatically.
Start small, grow as needed
Nx is modular. Start with the CLI and add capabilities as your needs grow.| Component | What it does |
|---|---|
| Nx Core | Task runner with local caching. Works with any tech stack. |
| Nx Plugins | Technology-specific automation — generators, executors, and dependency detection for React, Angular, Node, Vite, Jest, and more. |
| Nx Console | Editor extension for VS Code and JetBrains with a visual UI and AI assistance. |
| Nx Cloud | Remote caching, affected commands, task distribution, and self-healing CI. |
Nx provides value even for single-project repositories. You get fast task caching, intelligent task orchestration, and access to Nx plugins for your specific technology stack. As your project grows into a monorepo, the foundation is already in place.
Plugin ecosystem
Nx has an extensive plugin ecosystem covering the most popular tools and frameworks:- Frontend:
@nx/react,@nx/angular,@nx/vue,@nx/next,@nx/nuxt,@nx/remix - Backend:
@nx/node,@nx/nest,@nx/express - Bundlers:
@nx/vite,@nx/webpack,@nx/esbuild,@nx/rspack,@nx/rsbuild,@nx/rollup - Testing:
@nx/jest,@nx/vitest,@nx/cypress,@nx/playwright - Polyglot:
@nx/gradle,@nx/maven,@nx/dotnet,@nx/docker
Where to go from here
Start a new project
Create a new Nx workspace with a starter template and run your first tasks.
Add to an existing project
Run
npx nx@latest init to add Nx to any existing npm, pnpm, or yarn workspace.Installation
Install Nx globally via npm, Homebrew, Chocolatey, or apt.
AI integration
Set up the Nx MCP server so AI coding assistants have real workspace context.
