Standalone binary
The install script downloads a prebuilt binary and puts it on yourPATH. It supports macOS on Apple Silicon (arm64) and Linux on x86_64 — on any other platform it prints a message telling you to use npm instead and exits.
- Detects your OS and architecture and picks the matching release asset (
moodle-darwin-arm64ormoodle-linux-x64). - Downloads it from the latest GitHub release into a temporary directory.
- Makes it executable and runs
--versionas a sanity check. - Installs it to
~/.local/bin/moodle, creating the directory if needed.
Add the install directory to your
PATH if it isn’t already:
GitHub Releases may include other platform binaries. The install script itself only picks a binary for macOS arm64 and Linux x64; on any other OS or architecture it steps aside for npm.
npm
Bun
Node.js version
moodle-cli requires Node.js 22.13 or newer, because reading cookies out of a Chromium-based browser needs a feature Node only ships from that version on. On an older Node,moodle auth login fails with a message to upgrade Node or switch to Bun, which works on any version. Reading Safari’s cookie store doesn’t have this requirement.
If you’re on an older Node and can’t upgrade it, use Bun instead:
Update
moodle update upgrades through whichever installer put moodle-cli there: npm, Bun, or the standalone binary replacing itself. When you have a deployed MCP server that is behind the new release, it redeploys that too. --check only reports the installed and latest versions.
- It installs the exact release it just checked, so a registry mirror that lags behind fails loudly instead of installing an older build.
- An npm update goes into the same location as the copy you are running.
- A new standalone binary has to start and report its version before it replaces the current one; otherwise the old one stays.
MOODLE_NO_UPDATE_CHECK=1 to turn the check off; it is already off when CI is set.
Shell completion
moodle completion <shell> prints a completion script for zsh, bash or fish. It completes top-level command names only.
- Zsh
- Bash
- Fish
Save the script somewhere on your Then add this to Open a new shell to pick up the change.
fpath and let compinit pick it up:~/.zshrc, before compinit runs: