Skip to main content
The .moon/toolchains.* file configures the toolchain and the workspace development environment. This file is optional.

File Location

  • Path: .moon/toolchains.yml or .moon/toolchains.json
  • Format: YAML or JSON
  • Required: No

Overview

Managing tool versions within the toolchain ensures a deterministic environment across any machine (whether a developer, CI, or production machine).

Configuration Options

extends

Defines one or many external .moon/toolchains.*’s to extend and inherit settings from.
.moon/toolchains.yml
extends: 'https://raw.githubusercontent.com/organization/repository/master/.moon/toolchains.yml'
Settings will be merged recursively for blocks, with values defined in the local configuration taking precedence over those defined in the extended configuration.

moon

Configures how moon will receive information about latest releases and download locations.
Defines an HTTPS URL in which to fetch the current version information from.
.moon/toolchains.yml
moon:
  manifestUrl: 'https://proxy.corp.net/moon/version'
Defines an HTTPS URL in which the moon binary can be downloaded from. Defaults to downloading from GitHub.
.moon/toolchains.yml
moon:
  downloadUrl: 'https://github.com/moonrepo/moon/releases/latest/download'

proto

Configures how moon integrates with and utilizes proto.
.moon/toolchains.yml
proto:
  version: '0.51.0'
version: The version of proto to install and run toolchains with. If proto or this version has not been installed yet, it will be installed automatically when running a task.

Toolchain Reference

Each toolchain below can be configured in the .moon/toolchains.* file. For detailed configuration options, run moon toolchain info <name> to see all available settings.

Go

.moon/toolchains.yml
go:
  version: '1.21.0'
Run moon toolchain info go for all available settings.

JavaScript

Base configuration for JavaScript-based toolchains.
.moon/toolchains.yml
javascript:
  version: '20.0.0'
Run moon toolchain info javascript for all available settings.

Bun

This toolchain requires the javascript toolchain to also be enabled.
.moon/toolchains.yml
bun:
  version: '1.0.0'
Run moon toolchain info bun for all available settings.

Deno

This toolchain requires the javascript toolchain to also be enabled.
.moon/toolchains.yml
deno:
  version: '1.40.0'
Run moon toolchain info deno for all available settings.

Node

This toolchain requires the javascript toolchain to also be enabled.
.moon/toolchains.yml
node:
  version: '20.0.0'
Run moon toolchain info node for all available settings.

npm

This toolchain requires the node toolchain to also be enabled.
.moon/toolchains.yml
npm:
  version: '10.0.0'
Run moon toolchain info npm for all available settings.

pnpm

This toolchain requires the node toolchain to also be enabled.
.moon/toolchains.yml
pnpm:
  version: '8.0.0'
Run moon toolchain info pnpm for all available settings.

Yarn

This toolchain requires the node toolchain to also be enabled.
.moon/toolchains.yml
yarn:
  version: '4.0.0'
Run moon toolchain info yarn for all available settings.

TypeScript

.moon/toolchains.yml
typescript:
  version: '5.3.0'
Run moon toolchain info typescript for all available settings.

Python

.moon/toolchains.yml
unstable_python:
  version: '3.11.0'
Run moon toolchain info unstable_python for all available settings.

pip

This toolchain requires the unstable_python toolchain to also be enabled.
.moon/toolchains.yml
unstable_pip:
  version: '23.0.0'
Run moon toolchain info unstable_pip for all available settings.

uv

This toolchain requires the unstable_python toolchain to also be enabled.
.moon/toolchains.yml
unstable_uv:
  version: '0.1.0'
Run moon toolchain info unstable_uv for all available settings.

Rust

.moon/toolchains.yml
rust:
  version: '1.75.0'
Run moon toolchain info rust for all available settings.

Examples

Node.js with pnpm

.moon/toolchains.yml
proto:
  version: '0.51.0'

node:
  version: '20.11.0'

pnpm:
  version: '8.15.0'

typescript:
  version: '5.3.3'

Bun Runtime

.moon/toolchains.yml
proto:
  version: '0.51.0'

bun:
  version: '1.0.25'

typescript:
  version: '5.3.3'

Deno Runtime

.moon/toolchains.yml
proto:
  version: '0.51.0'

deno:
  version: '1.40.0'

Rust Project

.moon/toolchains.yml
proto:
  version: '0.51.0'

rust:
  version: '1.75.0'

Python with uv

.moon/toolchains.yml
proto:
  version: '0.51.0'

unstable_python:
  version: '3.11.7'

unstable_uv:
  version: '0.1.0'

Go Project

.moon/toolchains.yml
proto:
  version: '0.51.0'

go:
  version: '1.21.6'

Multi-Language Workspace

.moon/toolchains.yml
proto:
  version: '0.51.0'

# JavaScript/TypeScript projects
node:
  version: '20.11.0'

pnpm:
  version: '8.15.0'

typescript:
  version: '5.3.3'

# Rust projects
rust:
  version: '1.75.0'

# Python projects
unstable_python:
  version: '3.11.7'

unstable_pip:
  version: '23.3.0'

Custom Download URLs

.moon/toolchains.yml
moon:
  manifestUrl: 'https://proxy.corp.net/moon/version'
  downloadUrl: 'https://artifacts.corp.net/moon/releases'

proto:
  version: '0.51.0'

node:
  version: '20.11.0'

Complete Example

.moon/toolchains.yml
# Extend from organization defaults
extends: 'https://raw.githubusercontent.com/company/configs/main/.moon/toolchains.yml'

# Configure proto
proto:
  version: '0.51.0'

# Configure moon downloads (for corporate proxy)
moon:
  manifestUrl: 'https://proxy.corp.net/moon/version'
  downloadUrl: 'https://proxy.corp.net/moon/releases'

# Node.js stack
node:
  version: '20.11.0'

pnpm:
  version: '8.15.0'

typescript:
  version: '5.3.3'

# Additional toolchains
rust:
  version: '1.75.0'

go:
  version: '1.21.6'

Getting Detailed Configuration

For detailed configuration options for each toolchain, use the moon toolchain info command:
# Get all settings for Node.js
moon toolchain info node

# Get all settings for TypeScript
moon toolchain info typescript

# Get all settings for Rust
moon toolchain info rust

Build docs developers (and LLMs) love