Feature comparison
The following comparisons are not an exhaustive list of features, and may be inaccurate or out of date, but represent a good starting point for investigation. If something is not correct, please create an issue or submit a patch.
Before diving into our comparisons below, we highly suggest reading monorepo.tools for a deeper insight into monorepos and available tooling. It's a great resource for learning about the current state of things and the ecosystem.
Looking to migrate from Nx or Turborepo to moon? Use our
moon ext migrate-nx
or
moon ext migrate-turborepo
commands for a (somewhat)
seamless migration!
Unique features
Although moon is still in its infancy, we provide an array of powerful features that other frontend centric task runners do not, such as...
- Integrated toolchain - moon manages its own version of programming languages and dependency managers behind the scenes, so that every task is executed with the exact same version, across all machines.
- Task inheritance - Instead of defining the same tasks (lint, test, etc) over and over again for every project in the monorepo, moon supports a task inheritance model where it only needs to be defined once at the top-level. Projects can then merge with, exclude, or override if need be.
- Continuous integration - By default, all moon tasks will run in CI, as we want to encourage every facet of a project or repository to be continually tested and verified. This can be turned off on a per-task basis.
Curious to learn more? Check out the "Why use moon?" or "Features" sections for more information, or these wonderful articles provided by the community:
Comparison
Turborepo
At a high-level, Turborepo and moon seem very similar as they both claim to be task runners. They
both support incremental builds, content/smart hashing, local and remote caching1,
parallel execution, and everything else you'd expect from a task runner. But that's where the
similarities stop, because in the end, Turborepo is nothing more than a package.json
scripts
orchestrator with a caching layer. While moon also supports this, it
aims to be far more with a heavy focus on the developer experience.
In the next section, we'll be talking about a few key areas that we deem important to consumers. If you'd prefer a more granular comparison, jump down to the comparison tables.
Configuration
Projects
Tasks
CI
Long-term
-
Turborepo remote caching is powered by Vercel. moon provides its own paid service.
-
moon projects may run commands for any language, but not all languages are supported in the toolchain.
Lerna
Lerna was a fantastic tool that helped the JavaScript ecosystem grow and excelled at package versioning and publishing (and still does), but it offered a very rudimentary task runner. While Lerna was able to run scripts in parallel, it wasn't the most efficient, as it did not support caching, hashing, or performant scheduling.
However, the reason Lerna is not compared in-depth, is that Lerna was unowned and unmaintained for quite some time, and has recently fallen under the Nx umbrella. Lerna is basically Nx lite now.
Comparison tables
🟩 Supported | 🟨 Partially supported | 🟦 Similarly supported | 🟥 Not supported |
Workspace
moon (11) | nx (11) | turborepo (8) | |
---|---|---|---|
Core/CLI written in | Rust | Node.js & Rust (for hot paths) | Rust / Go |
Plugins written in | WASM (any compatible language) | TypeScript | 🟥 |
Workspace configured with |
|
|
|
Project list configured in |
|
|
|
Repo / folder structure | loose | loose | loose |
Ignore file support | 🟩 via | 🟩 .nxignore | 🟩 via |
Supports dependencies inherited by all tasks | 🟩 via | 🟩 via | 🟥 |
Supports inputs inherited by all tasks | 🟩 via | 🟩 via | 🟩 via |
Supports tasks inherited by all projects | 🟩 | 🟩 via | 🟥 |
Integrates with a version control system | 🟩 git | 🟩 git | 🟩 git |
Supports scaffolding / generators | 🟩 | 🟩 | 🟩 |
Toolchain
moon (6) | nx (2) | turborepo (2) | |
---|---|---|---|
Supported languages in task runner | All languages available on | All languages via plugins. OOTB TS/JS, existing plugins for Rust, Go, Dotnet and more | JavaScriptTypeScript via |
Supported dependency managers | npm, pnpm, yarn, bun | npm, pnpm, yarn | npm, pnpm, yarn |
Supported toolchain languages (automatic dev envs) | Bun, Deno, Node.js, Rust | 🟥 | 🟥 |
Has a built-in toolchain | 🟩 | 🟥 | 🟥 |
Downloads and installs languages (when applicable) | 🟩 | 🟥 | 🟥 |
Configures explicit language/dependency manager versions | 🟩 | 🟥 | 🟥 |
Projects
moon (8) | nx (5) | turborepo (2) | |
---|---|---|---|
Dependencies on other projects | 🟩 implicit from | 🟩 implicit from | 🟩 implicit from |
Ownership metadata | 🟩 | 🟥 | 🟥 |
Primary programming language | 🟩 | 🟥 | 🟥 |
Project type (app, lib, etc) | 🟩 app, lib, tool, automation, config, scaffold | 🟩 app, lib | 🟥 |
Project tech stack | 🟩 frontend, backend, infra, systems | 🟥 | 🟥 |
Project-level file groups | 🟩 | 🟩 via | 🟥 |
Project-level tasks | 🟩 | 🟩 | 🟩 |
Tags and scopes (boundaries) | 🟩 native for all languages | 🟩 boundaries via ESLint (TS and JS), tags for filtering for all languages | 🟥 |
Tasks
moon (24) | nx (24) | turborepo (17) | |
---|---|---|---|
Known as | tasks | targets | tasks |
Defines tasks in |
|
|
|
Run a single task with |
|
|
|
Run multiple tasks with |
|
|
|
Run tasks based on a query/filter |
|
| 🟥 |
Can define tasks globally | 🟩 with | 🟨 with | 🟥 |
Merges or overrides global tasks | 🟩 | 🟩 | 🟥 |
Runs a command with args | 🟩 | 🟩 | 🟨 within the script |
Runs commands from | project or workspace root | current working directory, or wherever desired via config | project root |
Supports pipes, redirects, etc, in configured tasks | 🟨 encapsulated in a file | 🟨 within the executor or script | 🟨 within the script |
Dependencies on other tasks | 🟩 via | 🟩 via | 🟩 via |
Can provide extra params for task dependencies | 🟩 | 🟩 | 🟥 |
Can mark a task dependency as optional | 🟩 via | 🟥 | 🟥 |
Can depend on arbitrary or unrelated tasks | 🟩 | 🟩 | 🟥 dependent projects only |
Runs task dependencies in parallel | 🟩 | 🟩 | 🟩 |
Can run task dependencies in serial | 🟩 | 🟩 via | 🟩 via |
File groups | 🟩 | 🟩 via | 🟥 |
Environment variables | 🟩 via | 🟩 automatically via | 🟨 within the script |
Inputs | 🟩 files, globs, env vars | 🟩 files, globs, env vars, runtime | 🟩 files, globs |
Outputs | 🟩 files, globs | 🟩 files, globs | 🟩 files, globs |
Output logging style | 🟩 via | 🟩 via | 🟩 via |
Custom hash inputs | 🟥 | 🟩 via | 🟩 via |
Token substitution | 🟩 token functions and variable syntax | 🟩 | 🟥 |
Configuration presets | 🟩 via task | 🟩 via | 🟥 |
Configurable options | 🟩 | 🟩 | 🟩 |
Task runner
moon (9) | nx (11) | turborepo (7) | |
---|---|---|---|
Known as | action pipeline | task runner | pipeline |
Generates a dependency graph | 🟩 | 🟩 | 🟩 |
Runs in topological order | 🟩 | 🟩 | 🟩 |
Automatically retries failed tasks | 🟩 | 🟩 when flakiness detected on Nx Cloud | 🟥 |
Caches task outputs via a unique hash | 🟩 | 🟩 | 🟩 |
Can customize the underlying runner | 🟥 | 🟩 | 🟥 |
Can profile running tasks | 🟩 cpu, heap | 🟩 cpu | 🟩 cpu |
Can generate run reports | 🟩 | 🟩 free in Nx Cloud & GitHub App Comment | 🟩 |
Continuous integration (CI) support | 🟩 | 🟩 | 🟨 |
Continuous deployment (CD) support | 🟥 | 🟨 via | 🟥 |
Remote / cloud caching and syncing | 🟩 with moonrepo.app (free / paid) | 🟩 with nx.app Nx Cloud (free / paid) | 🟩 requires a Vercel account (free) |
Generator
moon (14) | nx (14) | turborepo (11) | |
---|---|---|---|
Known as | generator | generator | generator |
Templates are configured with a schema | 🟩 via | 🟩 | 🟥 |
Template file extensions (optional) | 🟩 .tera, .twig | 🟩 fully under user control, built in utility for .ejs templates | 🟩 .hbs |
Template files support frontmatter | 🟩 | 🟩 fully under user control | 🟥 |
Creates/copies files to destination | 🟩 | 🟩 | 🟩 |
Updates/merges with existing files | 🟩 JSON/YAML only | 🟩 via TypeScript/JavaScript plugins | 🟩 |
Renders with a template engine | 🟩 via Tera | 🟩 fully under user control, built in utility for .ejs templates | 🟩 via Handlebars |
Variable interpolation in file content | 🟩 | 🟩 | 🟩 |
Variable interpolation in file paths | 🟩 | 🟩 | 🟩 |
Can define variable values via interactive prompts | 🟩 | 🟩 using JSON schema | 🟩 |
Can define variable values via command line args | 🟩 | 🟩 using JSON schema | 🟩 |
Supports dry runs | 🟩 | 🟩 | 🟥 |
Supports render helpers, filters, and built-ins | 🟩 | 🟩 | 🟩 |
Generators can compose other generators | 🟩 via | 🟩 fully under user control, author in TypeScript/JavaScript | 🟩 using JavaScript |
Other systems
moon (6) | nx (0) | turborepo (1) | |
---|---|---|---|
Can send webhooks for critical pipeline events | 🟩 | 🟥 | 🟥 |
Generates run reports with granular stats/metrics | 🟩 | 🟥 | 🟩 |
Can define and manage code owners | 🟩 | 🟥 | 🟥 |
Can generate a | 🟩 | 🟥 | 🟥 |
Can define and manage VCS (git) hooks | 🟩 | 🟥 | 🟥 |
Supports git worktrees | 🟩 | 🟥 | 🟥 |
JavaScript ecosystem
moon (10) | nx (1) | turborepo (0) | |
---|---|---|---|
Will automatically install node modules when lockfile changes | 🟩 | 🟥 | 🟥 |
Can automatically dedupe when lockfile changes | 🟩 | 🟥 | 🟥 |
Can alias | 🟩 | 🟩 | 🟥 |
Can add | 🟩 | 🟥 | 🟥 |
Can sync version manager configs ( | 🟩 | 🟥 | 🟥 |
Can sync cross-project dependencies to | 🟩 | 🟥 | 🟥 |
Can sync project references to applicable | 🟩 | 🟥 | 🟥 |
Can auto-create missing | 🟩 | 🟥 | 🟥 |
Can sync dependencies as | 🟩 | 🟥 | 🟥 |
Can route | 🟩 | 🟥 | 🟥 |
Docker integration
moon (3) | nx (2) | turborepo (2) | |
---|---|---|---|
Efficient scaffolding for Dockerfile layer caching | 🟩 | 🟦 via custom generator | 🟩 |
Automatic production-only dependency installation | 🟩 | 🟨 generated automatically by first party plugin | 🟥 |
Environment pruning to reduce image/container sizes | 🟩 | 🟥 | 🟩 |