Quick Install
The fastest way to install hx is via the install script:
curl -fsSL https://get.arcanist.sh/hx | shThis script will:
- Detect your operating system and architecture
- Download the appropriate binary
- Install it to
~/.local/bin(or/usr/local/binon macOS) - Add the install directory to your PATH if needed
Platform Support
hx provides pre-built binaries for:
| Platform | Architecture | Status |
|---|---|---|
| Linux | x86_64 | ✅ Fully supported |
| Linux | aarch64 | ✅ Fully supported |
| macOS | x86_64 (Intel) | ✅ Fully supported |
| macOS | aarch64 (Apple Silicon) | ✅ Fully supported |
| Windows | x86_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-cliVerify Installation
After installation, verify hx is working:
hx --versionYou should see output like:
hx 0.4.0Shell Completions
hx provides shell completions for bash, zsh, fish, PowerShell, and elvish:
Bash
hx completions bash > ~/.local/share/bash-completion/completions/hxOr add to your ~/.bashrc:
eval "$(hx completions bash)"Zsh
hx completions zsh > ~/.zfunc/_hxMake sure ~/.zfunc is in your fpath. Add to ~/.zshrc:
fpath=(~/.zfunc $fpath)
autoload -Uz compinit && compinitFish
hx completions fish > ~/.config/fish/completions/hx.fishPowerShell
hx completions powershell >> $PROFILEElvish
hx completions elvish > ~/.elvish/lib/hx.elvPost-Installation Setup
After installing hx, run the doctor command to verify your Haskell environment:
hx doctorThis 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.0Updating 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 --forceUninstalling
To uninstall hx:
# Remove the binary
rm $(which hx)
# Remove configuration and cache (optional)
rm -rf ~/.config/hx
rm -rf ~/.cache/hx