Installation

Quick Install

The fastest way to install hx is via the install script:

curl -fsSL https://get.arcanist.sh/hx | sh

This script will:

  1. Detect your operating system and architecture
  2. Download the appropriate binary
  3. Install it to ~/.local/bin (or /usr/local/bin on macOS)
  4. Add the install directory to your PATH if needed

Platform Support

hx provides pre-built binaries for:

PlatformArchitectureStatus
Linuxx86_64✅ Fully supported
Linuxaarch64✅ Fully supported
macOSx86_64 (Intel)✅ Fully supported
macOSaarch64 (Apple Silicon)✅ Fully supported
Windowsx86_64✅ Fully supported

Alternative Installation Methods

From GitHub Releases

Download the latest release for your platform from GitHub Releases.

# Linux x86_64
curl -LO https://github.com/arcanist-sh/hx/releases/latest/download/hx-x86_64-unknown-linux-gnu.tar.gz
tar xzf hx-x86_64-unknown-linux-gnu.tar.gz
sudo mv hx /usr/local/bin/

# macOS Apple Silicon
curl -LO https://github.com/arcanist-sh/hx/releases/latest/download/hx-aarch64-apple-darwin.tar.gz
tar xzf hx-aarch64-apple-darwin.tar.gz
sudo mv hx /usr/local/bin/

# Windows (PowerShell)
Invoke-WebRequest -Uri https://github.com/arcanist-sh/hx/releases/latest/download/hx-x86_64-pc-windows-msvc.zip -OutFile hx.zip
Expand-Archive hx.zip -DestinationPath .
Move-Item hx.exe $env:LOCALAPPDATA\Programs\hx\

From Source

Building from source requires Rust 1.92.0 or later:

git clone https://github.com/arcanist-sh/hx
cd hx
cargo build --release
sudo mv target/release/hx /usr/local/bin/

Using Cargo

cargo install hx-cli

Verify Installation

After installation, verify hx is working:

hx --version

You should see output like:

hx 0.4.0

Shell Completions

hx provides shell completions for bash, zsh, fish, PowerShell, and elvish:

Bash

hx completions bash > ~/.local/share/bash-completion/completions/hx

Or add to your ~/.bashrc:

eval "$(hx completions bash)"

Zsh

hx completions zsh > ~/.zfunc/_hx

Make sure ~/.zfunc is in your fpath. Add to ~/.zshrc:

fpath=(~/.zfunc $fpath)
autoload -Uz compinit && compinit

Fish

hx completions fish > ~/.config/fish/completions/hx.fish

PowerShell

hx completions powershell >> $PROFILE

Elvish

hx completions elvish > ~/.elvish/lib/hx.elv

Post-Installation Setup

After installing hx, run the doctor command to verify your Haskell environment:

hx doctor

This will check for:

  • GHC (Glasgow Haskell Compiler)
  • Cabal
  • GHCup (optional, for toolchain management)
  • HLS (Haskell Language Server)
  • System dependencies

If any tools are missing, hx will provide installation instructions.

Installing the Haskell Toolchain

If you don’t have a Haskell toolchain installed, hx can install it for you:

# Install the recommended GHC version
hx toolchain install

# Or install a specific version
hx toolchain install --ghc 9.8.2

# Install with Cabal
hx toolchain install --ghc 9.8.2 --cabal 3.10.3.0

Updating hx

To update to the latest version:

# Using the install script
curl -fsSL https://get.arcanist.sh/hx | sh

# Or if installed via cargo
cargo install hx-cli --force

Uninstalling

To uninstall hx:

# Remove the binary
rm $(which hx)

# Remove configuration and cache (optional)
rm -rf ~/.config/hx
rm -rf ~/.cache/hx