Skip to main content

Install moon

2 min

The following guide can be used to install moon and integrate it into an existing repository (with or without incremental adoption), or to a fresh repository.


The entirety of moon is packaged and shipped as a single binary. It works on all major operating systems, and does not require any external dependencies. For convenience, we provide the following scripts to download and install moon.

Linux, macOS, WSL

In a terminal that supports Bash, run:

curl -fsSL | bash

This will install moon to ~/.moon/tools/moon and create a symlink in /usr/local/bin. On WSL, we prepand the PATH environment variable.


In Powershell or Windows Terminal, run:

irm | iex

This will install moon to ~\.moon\tools\moon and prepend to the PATH environment variable for the current session. To persist across sessions, update PATH manually.


Install with Homebrew:

brew tap moonrepo/tap
brew install moonrepo/tap/moon


moon is also packaged and shipped as a single binary through the @moonrepo/cli npm package. Begin by installing this package at the root of the repository. This is also useful in pinning the exact version the repository should be using.

yarn add --dev @moonrepo/cli


moon can also be downloaded and installed manually, by downloading an asset from Be sure to rename the file after downloading, and apply the executable bit (chmod +x) on macOS and Linux.


moon can be upgraded with the moon upgrade command. However, this will only upgrade moon if installed with the official scripts (moon exists in ~/.moon).

moon upgrade

Otherwise, you can re-run the installers above and it will download, install, and overwrite with the latest version.

Next steps