TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/moonrepo/moon/llms.txt
Use this file to discover all available pages before exploring further.
moon setup command can be used to setup the developer and pipeline environments. It achieves
this by downloading and installing all configured toolchains.
How It Works
The setup command:- Installs proto - Ensures proto (the toolchain manager) is available
- Reads toolchain config - Loads configuration from
.moon/toolchains.* - Installs toolchains - Downloads and installs each configured toolchain:
- Node.js
- Rust
- Go
- Python
- Deno
- Bun
- Custom toolchains
- Verifies installation - Ensures toolchains are properly installed
Automatic Setup
Moon automatically runs setup when needed, such as:- Running tasks via
moon run - Querying projects with
moon query - Generating code with
moon generate - Running checks with
moon check - CI workflows with
moon ci
moon setup if you want to:
- Pre-install toolchains before running tasks
- Verify toolchain configuration
- Troubleshoot installation issues
- Set up a fresh development environment
Output Messages
Success
Already Up to Date
No Toolchains Configured
.moon/toolchains.* configuration.
Partial Failure
Toolchain Configuration
Toolchains are configured in.moon/toolchains.yml:
Using with proto
If moon is installed via proto, toolchains are managed by proto:CI/CD Usage
In CI environments, setup happens automatically:Troubleshooting
Toolchain Installation Fails
If a toolchain fails to install:- Check internet connectivity
- Verify the version exists and is valid
- Check filesystem permissions
- Review proto logs:
~/.proto/logs/ - Try installing the toolchain directly with proto:
Version Conflicts
If you have existing toolchain installations:- Moon uses proto to manage versions
- Proto installs to
~/.proto/tools/ - These don’t conflict with system installations
- Moon tasks use proto-managed versions
Offline Installation
Moon requires internet to download toolchains. For offline environments:- Pre-install toolchains on a connected machine
- Copy
~/.proto/directory to offline machine - Or use system-installed toolchains by setting
version: system
Examples
Basic setup
Setup in CI
Verify setup worked
Configuration
*in.moon/toolchains.*- Toolchains guide - Configure toolchains
- proto documentation - Toolchain manager
See Also
moon teardown- Uninstall toolchainsmoon upgrade- Upgrade moon itselfmoon check- Verify workspace health