Skip to content

Installation

mdm is a single, statically-linked Go binary with no runtime dependencies.

One-line install

curl -fsSL https://raw.githubusercontent.com/sethcarney/mdm/main/install.sh | bash
irm https://raw.githubusercontent.com/sethcarney/mdm/main/install.ps1 | iex

Both installers place the binary at ~/.local/bin/mdm and warn if that directory isn't on your PATH.

Install to a custom directory

Set INSTALL_DIR before running the installer:

INSTALL_DIR=/usr/local/bin curl -fsSL https://raw.githubusercontent.com/sethcarney/mdm/main/install.sh | bash

Dev container

mdm is published as a Dev Container Feature, so a repository can declare the CLI in devcontainer.json instead of scripting an install:

"features": {
  "ghcr.io/sethcarney/mdm/mdm:1": {}
}

The feature detects the container's architecture, downloads the matching release binary, verifies it against that release's sha256sums.txt, and installs it to /usr/local/bin/mdm - on PATH for every user, and no Go toolchain required in the image.

Pin a release when the container needs to be reproducible:

"features": {
  "ghcr.io/sethcarney/mdm/mdm:1": {
    "version": "2.0.0"
  }
}
Option Type Default Description
version string latest Release of mdm to install. latest, or a release tag such as 2.0.0 (the leading v is optional).

Features install during image build, before the workspace is mounted, so the feature only puts the binary on PATH. Anything that reads or writes the repo goes in a lifecycle command:

"features": {
  "ghcr.io/sethcarney/mdm/mdm:1": {}
},
"postCreateCommand": "mdm skills install"

That restores every skill recorded in the repo's mdm.lock when the container is created - see mdm skills install. mdm rules link fits the same slot.

Supported platforms

Debian- and Ubuntu-based images on linux/amd64 and linux/arm64. On an Apple Silicon host the container is normally arm64 and gets the arm64 binary; an amd64 container under emulation gets the x64 one.

Other methods

go install github.com/sethcarney/mdm@latest

This installs to $GOPATH/bin. The version reported by mdm --version will be dev for go install builds - released binaries carry the real tag.

Grab a prebuilt binary from the GitHub Releases page - Linux and macOS in x64 and ARM64, Windows in x64, then move it onto your PATH.

git clone https://github.com/sethcarney/mdm
cd mdm
make build      # compiles to ./mdm
make install    # go install . → $GOPATH/bin

Verify the install

mdm --version
mdm --help

Shell completion

mdm ships completion scripts for bash, zsh, fish, and PowerShell:

# Print a script to stdout
mdm completion zsh

# Or write it into your shell rc automatically
mdm completion install

Keeping mdm up to date

mdm upgrade            # download and replace the binary with the latest release
mdm upgrade --beta     # opt into the latest prerelease

See the upgrade guide for details, and uninstall to remove the binary.

Next steps