Skip to main content

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. Although moon is not included, it's a great resource for learning about the current state of things and the ecosystem.

Questions

moon versus competitors?

moon is currently in its infancy (we're not even at v1 yet), and as such, we're missing some very important features like cloud caching. Once we've progressed further, we will provide more in-depth articles comparing moon to other tools, but in the meantime, what we do offer that others do not is:

  • An integrated toolchain, ensuring the same version of Node.js (and other tools) is used across all machines.
  • Automation of common JavaScript problems, like package.json dependencies, tsconfig.json project references, and more.
  • Easy task declaration and inheritance across the entire workspace. Define a task once for all projects.
  • First-class continuous integration (CI) support.

With that being said, we also suggest these wonderful articles provided by the community:

What about 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 build system. 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 below, is that Lerna was unowned and maintained for quite some time, and has recently fallen under the Nx umbrella.

Comparison tables

🟩 Supported🟨 Partially supported🟦 Similarly supported🟥 Not supported

Workspace

moon (8)nx (8)turborepo (6)

Written in

Rust

Node.js

Go

Workspace configured with

.moon/workspace.yml

nx.json

turbo.json

Projects configured in

.moon/workspace.yml

workspace.json

package.json workspaces

Repo / folder structure

loose

strict

loose

Ignore file support

🟥

🟩  .nxignore

🟥

Supports inputs inherited by all tasks

🟩  via implicitInputs

🟩  via implicitDependencies

🟩  via globalDependencies

Supports tasks inherited by all projects

🟩🟥🟥

Integrates with a version control system

🟩  git  🟨  svn

🟩  git

🟩  git

Supports scaffolding / generators

🟩🟩🟥

Toolchain

moon (5)nx (2)turborepo (2)

Supported languages

Bash, Batch, JavaScript, TypeScript

JavaScript, TypeScript

JavaScript, TypeScript

Supported package managers

npm, pnpm, yarn

npm, pnpm, yarn

npm, pnpm, yarn

Has a built-in toolchain

🟩🟥🟥

Downloads and installs languages (when applicable)

🟩🟥🟥

Configures explicit language/package manager versions

🟩🟥🟥

Projects

moon (6)nx (5)turborepo (2)

Dependencies on other projects

🟩  implicit from package.json or explicit in moon.yml

🟩  implicit from package.json or explicit in project.json

🟩  implicit from package.json

Ownership metadata

🟩🟥🟥

Primary programming language

🟩🟥🟥

Project type (app, lib, etc)

🟩  app, lib, tool

🟩  app, lib

🟥

Project-level file groups

🟩

🟩  via namedInputs

🟥

Project-level tasks

🟩🟩🟩

Tags and scopes

🟥🟩🟥

Tasks

moon (19)nx (17)turborepo (15)

Known as

tasks

targets, executors

tasks

Defines tasks in

moon.yml or package.json scripts

project.json or package.json scripts

package.json scripts

Run a single task with

moon run project:task

nx run project:target

turbo run task --filter=project

Run multiple tasks with

moon run :task or moon run a:task b:task ... or moon check

nx run-many --target=target

turbo run task

Can define tasks globally

🟩  with .moon/project.yml

🟥🟥

Merges or overrides global tasks

🟩🟥🟥

Runs a command with args

🟩

🟦  behind an executor abstraction

🟨  within the script

Runs commands from

project or workspace root

workspace root

project root

Supports pipes, redirects, etc

🟨  encapsulated in a file

🟨  within the executor or script

🟨  within the script

Dependencies on other tasks

🟩  via deps

🟩  via dependsOn

🟩  via dependsOn

Runs task dependencies in parallel

🟩🟩🟩

Can run task dependencies in serial

🟩🟥🟥

File groups

🟩

🟦  via namedInputs

🟥

Environment variables

🟩  via env

🟨  within the executor or script

🟨  within the script

Inputs

🟩  files, globs, env vars

🟩  files, globs, env vars, runtime

🟩  files, globs

Outputs

🟩  files

🟩  files, globs

🟩  files

Output logging style

🟩  via outputStyle

🟩  via --output-style

🟩  via outputMode

Custom hash inputs

🟥

🟩  via runtimeCacheInputs

🟩  via globalDependencies

Token substitution

🟩🟥🟥

Configuration presets

🟥

🟩  via configurations

🟥

Configurable options

🟩🟩🟩

Runner

moon (8)nx (7)turborepo (6)

Known as

action or task runner

task runner

pipeline

Generates a dependency graph

🟩🟩🟩

Runs in topological order

🟩🟩🟩

Automatically retries failed tasks

🟩🟥🟥

Caches task outputs via a unique hash

🟩🟩🟩

Can customize the underlying runner

🟥🟩🟥

Can profile running tasks

🟩  cpu, heap

🟩  cpu

🟩  cpu

Can generate run reports

🟩🟥🟥

Continuous integration (CI) support

🟩🟨🟨

Continuous deployment (CD) support

🟥🟥🟥

Remote / cloud caching and syncing

🟥

🟩  with Nx cloud (paid)

🟩  requires a Vercel account (free)

Generator

moon (11)nx (11)turborepo (1)

Known as

generator

generator

n/a

Templates are configured with a schema

🟩  via template.yml

🟩🟥

Template files support frontmatter

🟩🟥🟥

Creates/copies files to destination

🟩🟩🟥

Updates/merges with existing files

🟥

🟩  using JavaScript

🟥

Renders with a template engine

🟩  via tera

🟩  via ejs

🟥

Variable interpolation in file content

🟩🟩🟥

Variable interpolation in file paths

🟩🟩🟥

Can define variable values via interactive prompts

🟩🟩🟥

Can define variable values via command line args

🟩🟥🟥

Supports dry runs

🟩🟩🟥

Supports render helpers, filters, and built-ins

🟩🟩🟥

Generators can compose other generators

🟥

🟩  using JavaScript

🟥

JavaScript ecosystem

moon (8)nx (0)turborepo (0)

Will automatically install node modules when lockfile changes

🟩🟥🟥

Can automatically dedupe when lockfile changes

🟩🟥🟥

Can alias package.json names for projects

🟩🟥🟥

Can add engines constraint to root package.json

🟩🟥🟥

Can sync version manager configs (.nvmrc, etc)

🟩🟥🟥

Can sync cross-project dependencies to package.json

🟩🟥🟥

Can sync project references to applicable tsconfig.json

🟩🟥🟥

Can auto-create missing tsconfig.json

🟩🟥🟥

Docker integration

moon (3)nx (0)turborepo (2)

Efficient scaffolding for Dockerfile layer caching

🟩🟥🟩

Automatic production-only dependency installation

🟩🟥🟥

Environment pruning to reduce image/container sizes

🟩🟥🟩