Skip to content

Commit

Permalink
Update install docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Oct 11, 2023
1 parent 0cc0c27 commit 5343ebb
Showing 1 changed file with 48 additions and 20 deletions.
68 changes: 48 additions & 20 deletions website/docs/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,30 @@ The entirety of moon is packaged and shipped as a single binary. It works on all
systems, and does not require any external dependencies. For convenience, we provide the following
scripts to download and install moon.

### proto

moon can be installed and managed in [proto's toolchain](/proto) using a TOML plugin. This will
install moon to `~/.proto/tools/moon` and make the binary available at `~/.proto/bin`.

```shell
proto add-plugin moon "source:https://raw.githubusercontent.com/moonrepo/moon/master/proto-plugin.toml"
proto install moon
```

Furthermore, the version of moon can be pinned on a per-project basis using the `.prototools` file.

```toml title=".prototools"
moon = "1.3.0"
```

:::info

We suggest using proto to manage moon (and other tools), as it allows for multiple versions to be
installed and used. The other installation options only allow for a single version (typically the
latest).

:::

### Linux, macOS, WSL

In a terminal that supports Bash, run:
Expand All @@ -27,8 +51,8 @@ In a terminal that supports Bash, run:
curl -fsSL https://moonrepo.dev/install/moon.sh | bash
```

This will install moon to `~/.moon/bin` and create a symlink in `/usr/local/bin`. If the symlink
fails, you'll need to set the `PATH` manually in your shell.
This will install moon to `~/.moon/bin`. You'll then need to set `PATH` manually in your shell
profile.

```shell
export PATH="$HOME/.moon/bin:$PATH"
Expand All @@ -45,22 +69,6 @@ irm https://moonrepo.dev/install/moon.ps1 | iex
This will install moon to `~\.moon\bin` and prepend to the `PATH` environment variable for the
current session. To persist across sessions, update `PATH` manually.

### proto

moon can be installed and managed in [proto's toolchain](/proto) using a TOML plugin. This will
install moon to `~/.proto/tools/moon` and make the binary available at `~/.proto/bin`.

```shell
proto add-plugin moon "source:https://raw.githubusercontent.com/moonrepo/moon/master/proto-plugin.toml"
proto install moon
```

Furthermore, the version of moon can be pinned on a per-project basis using the `.prototools` file.

```toml title=".prototools"
moon = "1.3.0"
```

### Node.js

moon is also packaged and shipped as a single binary through the
Expand All @@ -78,8 +86,14 @@ rename the file after downloading, and apply the executable bit (`chmod +x`) on

## Upgrading

moon can be upgraded with the [`moon upgrade`](./commands/upgrade) command. However, this will only
upgrade moon if it was installed in `~/.moon/bin`.
If using proto, moon can be upgraded using the following command:

```shell
proto install moon --pin
```

Otherwise, moon can be upgraded with the [`moon upgrade`](./commands/upgrade) command. However, this
will only upgrade moon if it was installed in `~/.moon/bin`.

```shell
moon upgrade
Expand All @@ -88,6 +102,20 @@ moon upgrade
Otherwise, you can re-run the installers above and it will download, install, and overwrite with the
latest version.

## Nightly releases

moon supports nightly releases, which are built and published once a day, and for each merged
feature to our develop branches. When using a nightly release, you'll need to download and execute
the binaries manually.

Nightlies are published to the following channels:

- To our npm package
[`@moonrepo/cli`](https://www.npmjs.com/package/@moonrepo/cli?activeTab=versions) under the
`nightly` tag. Releases are versioned by date.
- As a [GitHub prerelease](https://github.com/moonrepo/moon/releases/tag/nightly) using the
`nightly` tag. This tag always represents the latest release, and is not historical.

## Next steps

<NextSteps
Expand Down

0 comments on commit 5343ebb

Please sign in to comment.