Skip to content

Nx

A build tool for monorepos that caches unchanged work and runs only what's affected.

Stars
29.4k
Forks
3k
Licence
MIT
Language
TypeScript
Last update
4 days ago
Type
Dev tool

What it is

Nx is a tool for managing a monorepo, a single repository holding many related projects. It speeds up builds and tests by caching results for code that hasn't changed and running only the tasks affected by a change. It works with existing npm, pnpm, or yarn workspaces and can connect to CI providers for remote caching and task distribution.

  • Run `npx nx init` in an existing npm, pnpm, or yarn workspace to add caching to current scripts
  • Run only the builds and tests affected by a given change
  • Connect to GitHub Actions, GitLab, or Azure for remote caching and automatic e2e test splitting
  • Use plugins to scaffold code for Vite, Webpack, Jest, Gradle, Maven, .NET, or Go projects

Great for

  • Teams with several related JavaScript or TypeScript projects in one repository
  • Developers who want to speed up existing package.json scripts without rewriting their setup
  • Projects that use tools such as Vite, Jest, Vitest, or ESLint and want plugin-based configuration
  • Teams looking to split CI work across machines

Not ideal for

  • Single-project repositories, where the caching and affected-only features add little value (the README's benefits center on multi-project setups)
  • Teams unwilling to learn a new workspace configuration model
  • Projects needing a fully hosted CI service, since the README describes CI integration with existing providers such as GitHub Actions or GitLab
Step-by-step guide: how to use NxInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Node.js · npm, pnpm, or yarn workspace

    Initialize Nx in an existing workspace

    npx nx init
  2. 2

    Run it

    • Open an existing npm, pnpm, or yarn workspace that has package.json scripts
    • Run `npx nx init` in the workspace root
    • Run one of your existing scripts through Nx so it caches the output
    • Run the same script again to see the cached result
  3. 3

    Get the most out of it

    • Connect Nx to your CI provider to enable remote caching and affected-only runs, as described in the Nx CI docs
    • Add plugins for your tooling (Vite, Jest, ESLint, and others) so Nx can auto-discover tasks and cache inputs and outputs
    • Use the Nx CLI with AI agents, since the README says it is optimized for autonomous agent use
    • Review the nx.dev docs for the self-healing CI and MCP integration described in the README

Downloads

Strengths

  • Works on top of existing package.json scripts without requiring a rewrite, according to the README
  • Supports TypeScript plus other ecosystems through plugins, including Gradle, Maven, .NET, and Go
  • Released under the MIT license with a large community (about 29k GitHub stars)

Trade-offs

  • Several headline features (self-healing CI, remote caching) are described in terms of the separate Nx Cloud service, so the free and paid boundaries are not clear from this README
  • The README's AI-agent and self-healing claims are broad and are not detailed here, so their real-world behavior is hard to judge from this text alone
  • Advanced configuration and plugin behavior are only summarized here and need the full docs

How it compares

ProjectStarsTypeLevelUpdatedBest for
nx (this)29.4kDev toolintermediate4 days agoTeams with several related JavaScript or TypeScript projects in one repository
turborepo31.3kDev toolintermediate5 days agoTeams maintaining a JavaScript or TypeScript monorepo with several apps or packages
lerna36kDev toolintermediate5 days agoJavaScript or TypeScript teams maintaining several related npm packages in one repository
storybook91.4kDev toolintermediate4 days agoFrontend teams building a shared component library or design system
task16.3kDev toolbeginner4 days agoDevelopers who want a simpler alternative to Makefiles for project scripts
vite83.7kDev toolintermediate4 days agoFrontend developers starting a new modern web project

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.