Skip to content

Installation

Migrax is a command line tool. It needs Java 17 or newer; nothing else has to be installed, and no administrator rights are needed.

With a package manager

The quickest way, if you use one of these:

brew install fsmutimeer/migrax/migrax

Homebrew installs Java with it. When JAVA_HOME is set, Migrax uses that Java instead.

scoop bucket add migrax https://github.com/fsmutimeer/scoop-migrax
scoop install migrax

Migrax needs Java 17 or newer. If you don't have it, install one with Scoop too: scoop bucket add java, then scoop install java/temurin21-jdk.

Then check it with migrax version and continue with the Quick start. The package managers get every stable release on the day it is published.

Without a package manager, install Migrax from its ZIP in three steps:

1. Get Migrax

  1. Open the Download page and click Download migrax-<version>.zip.
  2. Extract it (on Windows: right-click the file, Extract All…). You get a folder migrax-<version> containing install.ps1, install.sh, bin and lib.

Download the .zip, not a .jar

The Download page also lists .jar files. Those are libraries for build tools and frameworks (the Maven plugin, the Gradle plugin, the startup integrations); they don't contain the command line tool or the installer. Only the ZIP does.

git clone https://github.com/fsmutimeer/migrax.git
cd migrax
mvn clean install

This also installs the Maven plugin and the libraries the integrations use into your local Maven repository.

2. Run the installer

Open a terminal in the extracted folder (or the source folder) and run the installer:

In Command Prompt or PowerShell, for example with the folder extracted to D:\:

cd /d D:\migrax-0.19.0
powershell -ExecutionPolicy Bypass -File install.ps1

(In PowerShell, use cd D:\migrax-0.19.0.) The installer copies Migrax to %LOCALAPPDATA%\migrax and adds its bin folder to your user PATH. After that you can delete the extracted folder and the ZIP.

sh install.sh

Installs to ~/.local/share/migrax and links ~/.local/bin/migrax. Set MIGRAX_INSTALL_DIR and MIGRAX_BIN_DIR to choose other folders.

3. Check it

Close the terminal and open a new one, then:

$ migrax version
migrax 0.19.0

migrax is not recognized?

A terminal reads PATH once, when it starts, so a window that was open while the installer ran doesn't see the new entry: open a new terminal. Terminals inside an editor (VS Code, IntelliJ IDEA) copy the editor's PATH from when the editor started, so close every editor window and open it again.

To keep using the current window instead:

set "PATH=%PATH%;%LOCALAPPDATA%\migrax\bin"
$env:Path = [Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [Environment]::GetEnvironmentVariable('Path','User')

The D:\> prompt is Command Prompt; PS D:\> is PowerShell. Their commands differ.

In a container

To run migrations in Kubernetes or a CI job without installing anything, use the container image ghcr.io/fsmutimeer/migrax (from Migrax 0.3.0); see Containers and Kubernetes.

Which Java does Migrax use?

Migrax uses JAVA_HOME when it is set, otherwise the java on your PATH. To run it with a different Java for one terminal session, set JAVA_HOME there:

$env:JAVA_HOME = "C:\path\to\jdk-25"
export JAVA_HOME=/path/to/jdk-25

Extra JVM options go in MIGRAX_JAVA_OPTS.

Keep that Java up to date: Migrax gets Java's security fixes from it. For CVE-2026-114938 (November 2026, Java's Base64 decoder on x86-64), use at least Java 17.0.21.1, 21.0.13.1 or 25.0.5.1; java -version shows which one you have.

Updating and uninstalling

With Homebrew: brew upgrade migrax and brew uninstall migrax. With Scoop: scoop update migrax and scoop uninstall migrax.

Otherwise, run the installer of the new version again to update. To uninstall, delete the install folder (%LOCALAPPDATA%\migrax on Windows, ~/.local/share/migrax and the ~/.local/bin/migrax link on macOS and Linux) and remove its bin folder from your user PATH.

Next: Quick start.