There are several ways to install morph. Pick the one that works best for you.
Pre-built binaries are available for all major platforms via cargo-dist. These one-liners download the latest release and install it for you.
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/alvinreal/morph/releases/latest/download/morph-installer.sh | shpowershell -ExecutionPolicy ByPass -c "irm https://github.com/alvinreal/morph/releases/latest/download/morph-installer.ps1 | iex"brew install alvinreal/tap/morphIf you have cargo-binstall installed, it will download pre-built binaries instead of compiling from source:
cargo binstall morphBuild and install directly from crates.io:
cargo install morph-cliNote: This compiles from source, which requires a working Rust toolchain (1.70+) and may take a minute or two.
Pre-built binaries for every release are available on the GitHub Releases page.
-
Download the archive for your platform:
Platform Archive macOS (Apple Silicon) morph-aarch64-apple-darwin.tar.xzmacOS (Intel) morph-x86_64-apple-darwin.tar.xzLinux (x86_64, glibc) morph-x86_64-unknown-linux-gnu.tar.xzLinux (x86_64, musl) morph-x86_64-unknown-linux-musl.tar.xzLinux (ARM64) morph-aarch64-unknown-linux-gnu.tar.xzWindows (x86_64) morph-x86_64-pc-windows-msvc.zip -
Extract the archive:
# macOS / Linux tar -xf morph-<target>.tar.xz # Windows # Use Explorer or: Expand-Archive morph-x86_64-pc-windows-msvc.zip
-
Move the binary to a directory in your
PATH:# macOS / Linux mv morph /usr/local/bin/ # Or to a user-local directory mv morph ~/.local/bin/
-
Verify the installation:
morph --version
git clone https://github.com/alvinreal/morph.git
cd morph
cargo build --releaseThe binary will be at target/release/morph. Copy it to a directory in your PATH:
cp target/release/morph /usr/local/bin/- Rust 1.70 or later (install via rustup)
- A C linker (usually already present on macOS/Linux; on Windows, install the MSVC build tools)
morph can generate completions for your shell. Run the appropriate command and follow the instructions for your shell below.
morph --completions bash > ~/.local/share/bash-completion/completions/morph
# Or system-wide:
sudo morph --completions bash > /etc/bash_completion.d/morphRestart your shell or run source ~/.bashrc to activate.
morph --completions zsh > ~/.zfunc/_morphMake sure ~/.zfunc is in your fpath. Add this to your ~/.zshrc (before compinit):
fpath=(~/.zfunc $fpath)
autoload -Uz compinit && compinitRestart your shell or run source ~/.zshrc to activate.
morph --completions fish > ~/.config/fish/completions/morph.fishCompletions are loaded automatically on the next shell session.
morph --completions powershell >> $PROFILERestart PowerShell to activate.
morph --completions elvish >> ~/.config/elvish/rc.elvRestart Elvish to activate.
Re-run the same install command — it will overwrite the existing binary with the latest version.
brew upgrade morphcargo binstall morph # downloads new pre-built binary
# or
cargo install morph-cli # rebuilds from sourceDownload the latest release from the Releases page and replace the existing binary.
Make sure the installation directory is in your PATH. Common locations:
/usr/local/bin(most systems)~/.local/bin(user-local installs)~/.cargo/bin(cargo install)
Check with:
echo $PATH
which morphIf ~/.cargo/bin is missing from your PATH, add it to your shell profile:
# bash / zsh
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
# fish
fish_add_path ~/.cargo/binMake sure the binary is executable:
chmod +x /usr/local/bin/morphIf macOS shows "cannot be opened because the developer cannot be verified":
- Open System Settings → Privacy & Security
- Scroll down — you'll see a message about morph being blocked
- Click "Allow Anyway"
- Run
morphagain and confirm
Alternatively, remove the quarantine attribute:
xattr -d com.apple.quarantine /usr/local/bin/morphIf Windows Defender SmartScreen blocks the executable:
- Click "More info"
- Click "Run anyway"
This happens because the binary is not code-signed. It is safe to allow.
If cargo install morph-cli fails:
- Make sure your Rust toolchain is up to date:
rustup update - On Linux, you may need development headers:
sudo apt install pkg-config libssl-dev(Ubuntu/Debian) - Try using
cargo binstall morphto download a pre-built binary instead