DocsOpen Moon AI
Browse the docs

Install Moon CLI

Install Moon CLI on Windows, macOS, Linux or WSL, pick a version or another folder, find where its files live and verify the published checksums.

On this page

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):

PowerShell
irm https://realmoon.ai/install.ps1 | iex

From the Command Prompt (CMD):

Command Prompt
curl -fsSL https://realmoon.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Then 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.sh script refuses to install: use PowerShell instead.

Install on macOS, Linux and WSLLink to the Install on macOS, Linux and WSL section

In a terminal:

Terminal
curl -fsSL https://realmoon.ai/install.sh | sh

The 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++ and libgcc packages. If they are missing, the installer shows the command to run:
Alpine
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

SystemBuilds
Windows 10 and 11x64, x64 without AVX2, ARM64 (otherwise x64 under emulation)
macOSApple 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

  1. It reads the number of the latest published version, or uses the one you specified.
  2. It downloads the compressed binary for your platform, over HTTPS only.
  3. It checks the SHA-256 checksum of the downloaded file, then the checksum of the unpacked binary, against the list published for that version.
  4. It runs the binary (moon --version) to make sure it starts on your machine. If that fails, nothing is replaced.
  5. It stores the binary in a folder of its own for that version and makes that version active.
  6. It adds the folder that holds moon to your PATH.
  7. 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:

ShellFile changed
zsh~/.zshrc
bash~/.bashrc, or ~/.bash_profile on macOS
fish~/.config/fish/conf.d/moon.fish
other~/.profile
Windowsthe Path variable of your user account

In shell files, the added lines sit between # >>> moon cli >>> and # <<< moon cli <<<.

Installation optionsLink to the Installation options section

SettingmacOS, Linux, WSLWindows
Specific versionversion number as an argument to the scriptMOON_VERSION variable
Leave the PATH alone--no-modify-path option, or MOON_NO_MODIFY_PATH=1 variableMOON_NO_MODIFY_PATH=1 variable
Another folderMOON_INSTALL_DIR variable: folder for the moon linkMOON_INSTALL_DIR variable: folder for moon.exe and the versions
macOS, Linux, WSL
# 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
Windows
# 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 | iex

On 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

ItemmacOS, Linux, WSLWindows
moon command~/.local/bin/moon (link to the active version)%LOCALAPPDATA%\Moon\moon.exe
Installed versions (active and previous)~/.local/share/moon/versions/<version>/%LOCALAPPDATA%\Moon\versions\<version>\
Moon CLI settings (moon.json)~/.config/moon/%USERPROFILE%\.config\moon\
Your personal agent configuration~/.config/moon/%USERPROFILE%\.config\moon\
Launcher session and state~/.local/share/moon/cli/%USERPROFILE%\.local\share\moon\cli\
Agent data (session history)~/.local/share/moon/%USERPROFILE%\.local\share\moon\
Agent logs~/.local/share/moon/log/%USERPROFILE%\.local\share\moon\log\
Agent cache and state~/.cache/moon/, ~/.local/state/moon/%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

Terminal
moon --version
moon doctor

moon --version prints Moon CLI 0.6.1. 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:

macOS, Linux, WSL
curl -fsSL https://realmoon.ai/dl/releases/0.6.1/SHA256SUMS
sha256sum ~/.local/share/moon/versions/0.6.1/moon
Windows
irm https://realmoon.ai/dl/releases/0.6.1/SHA256SUMS
Get-FileHash "$env:LOCALAPPDATA\Moon\versions\0.6.1\moon.exe" -Algorithm SHA256

The 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 -a 256 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:

Windows
Get-AuthenticodeSignature "$env:LOCALAPPDATA\Moon\versions\0.6.1\moon.exe"

The result must show Valid and CN=STELLARR STUDIO, O=STELLARR STUDIO, L=Pont-Audemer, C=FR.

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

See alsoLink to the See also section

Moon AI

Moon AI in action

0:00

Explore

Screenshots of chat.realmoon.ai taken on October 29, 2026, with fictional data.

Moon AI

Your preferences

Visits counted without cookies.

Our server counts visits without cookies or trackers. Your theme and your answer about ad measurement are remembered on this device.

Ad measurement

With your consent, our ad networks’ trackers (Google) measure our ads, from the visit to the sign-up and then to the first subscription and its amount, and may show you our ads. Your answer is valid for 13 months; you can change it here at any time.

No answer saved on this device.

After you decline, no tag is loaded anymore and the site deletes the cookies they had set on realmoon.ai. Those on the ad networks’ own domains are managed with them or in your browser.

The Moon AI app has its own privacy settings.