Installation

macpine is intended for modern macOS versions and has a mandatory dependency on QEMU, which it uses for virtualization.

Prerequisites

You must have QEMU version >= 7.22.0 installed. The recommended way to install it is via Homebrew:

brew install qemu

Installation Methods

Choose one of the following methods to install macpine.

This is the simplest method, as it installs the alpine CLI and handles the qemu dependency automatically.

brew install macpine

MacPorts

If you use MacPorts, you can install macpine with:

sudo port install macpine

Binary Release

You can manually download the latest pre-compiled binary from the GitHub Releases page.

  1. Detect your architecture and download the correct binary:

    # This command automatically selects the amd64 or arm64 binary
    arch="$([ `uname -m` = 'x86_64' ] && echo 'amd64' || echo 'arm64')"
    wget "https://github.com/beringresearch/macpine/releases/latest/download/alpine_darwin_$arch"

  2. Make the binary executable and move it into your PATH:

    mv "alpine_darwin_$arch" alpine
    sudo chmod +x alpine
    sudo mv alpine /usr/local/bin/

From Source

Building from source requires a working Go compiler environment (version 1.25.3 or newer, as specified in go.mod).

  1. Install build dependencies:

    brew install go qemu

  2. Clone the repository:

    git clone https://github.com/beringresearch/macpine
    cd macpine

  3. Compile and install using the Makefile:

    # Compile the project into the local ./bin/ directory
    make
    
    # Install the binary to /usr/local/bin (may require sudo)
    make install
    
    # To install to a different location, set the PREFIX variable
    # PREFIX=/your/custom/path make install