| name | moonup |
| description | Manage MoonBit toolchain versions using moonup — install moonup itself, install, update, uninstall, pin, switch, and run commands with specific toolchains. Use this skill whenever the user needs to install moonup, install or set up MoonBit, switch between toolchain versions (latest, nightly), pin a version to a project, troubleshoot a missing or wrong MoonBit toolchain version, or manage MoonBit toolchain lifecycle. Also trigger on "install moonup", "moon not found", "set up MoonBit", "update moonbit", "switch moonbit version", or any moonup CLI usage.
|
Moonup — MoonBit Toolchain Version Manager
Moonup manages multiple MoonBit toolchain installations side by side. It installs
toolchains to ~/.moonup/toolchains/ and creates shims in ~/.moon/bin/ that
automatically select the right toolchain at runtime.
Key Behaviors
- Auto-install: Running
moon (or moonc, moonrun, etc.) via shims
auto-installs the required toolchain if not already present.
- Toolchain resolution order (highest priority first):
+<spec> inline syntax (e.g., moon +nightly build)
MOONUP_TOOLCHAIN_SPEC env var
moonbit-version file in current/parent directory
- Default toolchain (
~/.moonup/default)
- Falls back to
latest
- Channels:
latest (stable), nightly, or a specific version tag like
0.1.20241231+ba15a9a4e.
- Deprecated: The
bleeding channel is deprecated. Use nightly instead.
Quick Start
If moonup is not installed yet, see references/setup.md.
moonup install latest
moonup default latest
moon version --all
Workflow Routing
Read the relevant reference file before executing the corresponding workflow.
Environment Variables
| Variable | Default | Purpose |
|---|
MOONUP_HOME | ~/.moonup | moonup data directory |
MOON_HOME | ~/.moon | MoonBit home (shims live in bin/) |
MOONUP_DIST_SERVER | https://moonup.csu.moe/v3 | Distribution server |
Shell Setup
Shell completions are available for bash, zsh, fish, elvish, and powershell.
Generate shell completions with:
moonup completions <bash|zsh|fish|elvish|powershell>