Overview
Pick Turborepo when the need is “cache and parallelize tasks across pnpm, npm, or Yarn workspaces”; pick Nx when the repo needs a project graph, generators, enforced boundaries, framework plugins, or distributed CI. As of 2026-10-01 Turborepo is at 2.11 (2026-09-18, adds native Rust, Python, and Go support) and Nx is at 23 (June 2026). Both are free and open source.
Comparison
| Dimension | Turborepo 2.11 | Nx 23 |
|---|---|---|
| Config | turbo.json | nx.json plus per-project config, inferred from plugins |
| Model | Task pipeline over workspace packages | Project graph, targets, plugins |
| Remote cache | Vercel Remote Cache by default; self-host via the open Remote Caching API | Nx Cloud (free plans); custom server |
| Affected runs | --affected, composable with --filter | nx affected on the project graph |
| Generators | turbo generate | Full generator and plugin system |
| Boundaries | turbo boundaries (experimental) | @nx/enforce-module-boundaries lint rule |
| Distributed CI | Cache sharing only | Nx Agents split one CI run across machines |
| Upgrades | Manual | nx migrate rewrites configs across the workspace |
Pick Turborepo when
Pick Turborepo when the workspaces already work and the pain is CI time.
- Add a
turbo.jsonwithbuild,lint, andtesttasks andoutputs; local caching works immediately. Remote cache needsnpx turbo loginandnpx turbo link. - The team does not want a second config model beside
package.jsonscripts. - Removing Turborepo later is cheap: delete
turbo.jsonand run scripts directly.
Pick Nx when
Pick Nx when scale, structure, or multiple stacks justify the learning curve.
- The graph and boundary rules must block forbidden imports (
@nx/enforce-module-boundaries). - Mixed stacks (Next.js, Nest, Expo, .NET) benefit from plugins that infer targets and caches.
- CI needs distributed execution (Nx Agents) rather than only a shared cache.
- Many packages and frequent framework upgrades make
nx migratevaluable.
Self-hosting a cache: Nx deprecated its S3, GCS, Azure, and shared-drive cache packages in May 2026 because bucket-based caches are vulnerable to cache poisoning (CVE-2025-36852). Prefer Nx Cloud or a custom server that implements Nx’s remote cache API.
Migrate
Move to Nx with nx init, which keeps workspaces and generates project config; port each turbo.json task to a target. Move to Turborepo by reducing targets to package scripts and writing turbo.json. Do not run both on one task graph. A repo already on Nx without friction should stay; the switch buys little. See monorepo-vs-polyrepo for the prior question of whether to use a monorepo.
FAQ
Should I use Turborepo or Nx for a monorepo?
Use Turborepo 2.11 to cache and parallelize tasks over existing pnpm, npm, or Yarn workspaces with one turbo.json. Use Nx 23 when the repo needs a project graph, generators, enforced module boundaries, framework plugins, or distributed CI.
Is Turborepo easier to set up than Nx?
Yes; add a turbo.json with build, lint, and test tasks and local caching works immediately. Removing it later is cheap: delete turbo.json and run scripts directly.
Can I self-host the Nx remote cache on S3?
Nx deprecated its S3, GCS, Azure, and shared-drive cache packages in May 2026 because bucket-based caches are vulnerable to cache poisoning (CVE-2025-36852). Prefer Nx Cloud or a custom server that implements Nx’s remote cache API.
Does Turborepo support distributed CI like Nx Agents?
No; Turborepo shares a cache across machines but does not split one CI run. Nx Agents distribute a single CI run across machines.