← All examples
Tool Installers homebrewnodepythonrustdocker

Toolchain Installers

Individually runnable install tasks for common dev tools — bootstrap only what you need, skip the rest.

Replaces: a wiki page of 'brew install X' one-liners

Unlike a monolithic setup script, each install is its own task — meriadoc task install-rust when you just need Rust, without pulling in Python and Docker along the way. Each one is self-contained and idempotent-ish (command -v guards, version pins via env vars), so re-running one to pick up a version bump is safe.

version: v1

tasks:
  install-node:
    description: "Install Node.js via NVM"
    cmds:
      - command -v nvm >/dev/null 2>&1 || curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
      - export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && nvm install $NODE_VERSION
    env:
      NODE_VERSION:
        type: string
        default: "20"

  install-python:
    description: "Install Python via pyenv"
    cmds:
      - command -v pyenv >/dev/null 2>&1 || brew install pyenv
      - pyenv install -s $PYTHON_VERSION
      - pyenv global $PYTHON_VERSION
    env:
      PYTHON_VERSION:
        type: string
        default: "3.12"

  install-rust:
    description: "Install Rust via rustup"
    cmds:
      - command -v rustc >/dev/null 2>&1 || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
      - source $HOME/.cargo/env

  install-docker:
    description: "Install Docker Desktop"
    cmds:
      - command -v docker >/dev/null 2>&1 || brew install --cask docker

Run one:

meriadoc task install-rust