Moon CLI installs with a single command and needs no administrator rights. The installer picks the right binary for your machine, verifies its checksum, makes sure it starts, then adds the moon command to your PATH.
Install on WindowsLink to the Install on Windows section
In PowerShell (5.1 or 7):
irm https://realmoon.ai/install.ps1 | iexFrom the Command Prompt (CMD):
curl -fsSL https://realmoon.ai/install.cmd -o install.cmd && install.cmd && del install.cmdThen open a new terminal: the updated PATH is only read when a terminal starts.
- On an ARM64 PC, the installer uses the ARM64 build if one is published, otherwise the x64 build, which runs under emulation. It tells you which one it picked during the installation.
- On an x64 processor without AVX2 instructions, it picks the matching build on its own.
- In Git Bash or MSYS, the
install.shscript refuses to install: use PowerShell instead.
Install on macOS, Linux and WSLLink to the Install on macOS, Linux and WSL section
In a terminal:
curl -fsSL https://realmoon.ai/install.sh | shThe script needs curl, gzip, and either sha256sum or shasum. It detects the architecture (x64 or ARM), the C library (glibc or musl) and whether AVX2 instructions are available. On an Apple Silicon Mac, it installs the native build even if the terminal runs under Rosetta.
- WSL: run the command inside your Linux distribution.
- Alpine and other musl systems: Moon CLI needs the
libstdc++andlibgccpackages. If they are missing, the installer shows the command to run:
apk add libstdc++ libgcc- macOS: install with the script rather than downloading the binary in a browser, since macOS may block a binary downloaded that way.
Then open a new terminal, or reload your shell profile, so that moon can be found.
Supported platformsLink to the Supported platforms section
| System | Builds |
|---|---|
| Windows 10 and 11 | x64, x64 without AVX2, ARM64 (otherwise x64 under emulation) |
| macOS | Apple Silicon, Intel |
| Linux (glibc) | x64, x64 without AVX2, ARM64 |
| Linux (musl, Alpine for example) | x64, ARM64 |
If the version you asked for is not published for your machine, the installer stops without changing anything.
What the installer doesLink to the What the installer does section
- It reads the number of the latest published version, or uses the one you specified.
- It downloads the compressed binary for your platform, over HTTPS only.
- It checks the SHA-256 checksum of the downloaded file, then the checksum of the unpacked binary, against the list published for that version.
- It runs the binary (
moon) to make sure it starts on your machine. If that fails, nothing is replaced.--version - It stores the binary in a folder of its own for that version and makes that version active.
- It adds the folder that holds
moonto yourPATH. - It removes
moon-agent, the second binary shipped with the 0.1.x versions, which is no longer needed.
Where the PATH entry goes, depending on your shell:
| Shell | File changed |
|---|---|
| zsh | ~/.zshrc |
| bash | ~/.bashrc, or ~/ on macOS |
| fish | ~/ |
| other | ~/.profile |
| Windows | the Path variable of your user account |
In shell files, the added lines sit between # and # .
Installation optionsLink to the Installation options section
| Setting | macOS, Linux, WSL | Windows |
|---|---|---|
| Specific version | version number as an argument to the script | MOON_VERSION variable |
Leave the PATH alone | --no-modify-path option, or MOON_NO_MODIFY_PATH= variable | MOON_NO_MODIFY_PATH= variable |
| Another folder | MOON_INSTALL_DIR variable: folder for the moon link | MOON_INSTALL_DIR variable: folder for moon.exe and the versions |
# Specific version
curl -fsSL https://realmoon.ai/install.sh | sh -s -- 0.6.1
# Without touching the PATH
curl -fsSL https://realmoon.ai/install.sh | sh -s -- --no-modify-path
# moon command in ~/bin
curl -fsSL https://realmoon.ai/install.sh | MOON_INSTALL_DIR="$HOME/bin" sh# Specific version
$env:MOON_VERSION = '0.6.1'
irm https://realmoon.ai/install.ps1 | iex
# Without touching the PATH
$env:MOON_NO_MODIFY_PATH = '1'
irm https://realmoon.ai/install.ps1 | iex
# Another folder
$env:MOON_INSTALL_DIR = 'D:\Tools\Moon'
irm https://realmoon.ai/install.ps1 | iexOn macOS and Linux, put the variable after the |, just before sh: the script reads it, not curl.
Where the files liveLink to the Where the files live section
| Item | macOS, Linux, WSL | Windows |
|---|---|---|
moon command | ~/ (link to the active version) | %LOCALAPPDATA%\Moon\moon.exe |
| Installed versions (active and previous) | ~/ | %LOCALAPPDATA%\Moon\versions\<version>\ |
Moon CLI settings (moon.json) | ~/ | %USERPROFILE%\.config\moon\ |
| Your personal agent configuration | ~/ | %USERPROFILE%\.config\moon\ |
| Launcher session and state | ~/ | %USERPROFILE%\.local\share\moon\cli\ |
| Agent data (session history) | ~/ | %USERPROFILE%\.local\share\moon\ |
| Agent logs | ~/ | %USERPROFILE%\.local\share\moon\log\ |
| Agent cache and state | ~/, ~/ | %USERPROFILE%\.cache\moon\, %USERPROFILE%\.local\state\moon\ |
If you set XDG_CONFIG_HOME, XDG_DATA_HOME, XDG_CACHE_HOME or XDG_STATE_HOME, Moon CLI uses them. The sign-in token is stored in the system keychain when there is one: see Where the token is stored. The configuration files are described in Configuration.
Check the installationLink to the Check the installation section
moon --version
moon doctormoon prints Moon . moon doctor checks the installation, the network and your session, and tells you what to fix: see Troubleshooting.
Verify the checksumsLink to the Verify the checksums section
To run the installer’s check yourself:
curl -fsSL https://realmoon.ai/dl/releases/0.6.1/SHA256SUMS
sha256sum ~/.local/share/moon/versions/0.6.1/moonirm https://realmoon.ai/dl/releases/0.6.1/SHA256SUMS
Get-FileHash "$env:LOCALAPPDATA\Moon\versions\0.6.1\moon.exe" -Algorithm SHA256The binary’s checksum must match the moon-<version>-<platform> line of the list, for example moon-0.6.1-linux-x64 or moon-0.6.1-windows-x64.exe. On macOS, use shasum instead of sha256sum.
On Windows, since Moon CLI 0.5.3, moon.exe is signed in the name of STELLARR STUDIO (timestamped Authenticode signature). To check it:
Get-AuthenticodeSignature "$env:LOCALAPPDATA\Moon\versions\0.6.1\moon.exe"The result must show Valid and CN=.
Updates also check a signed manifest against a public key built into the binary. An update whose signature or checksum does not match is refused: see Checks.
Update or uninstallLink to the Update or uninstall section
Moon CLI updates itself, at most once a day. To update right away, go back to the previous version or uninstall, see Updates and uninstalling.
If it doesn’t workLink to the If it doesn’t work section
moonis not recognized after the installation: see Add Moon CLI to the PATH, on Windows or on macOS and Linux.- The installer is blocked (PowerShell execution policy, antivirus, missing
curl, proxy): see The installer won’t run. - The checksum or signature is refused: see The checksum or signature doesn’t match.
- WSL, macOS or Linux: see Platforms.