Environment variables for configuring hx behavior.
General Settings
HX_HOME
Override the hx home directory:
export HX_HOME="$HOME/.hx"Default:
- Linux:
~/.local/share/hx - macOS:
~/Library/Application Support/hx - Windows:
%APPDATA%\hx
HX_CACHE_DIR
Override the cache directory:
export HX_CACHE_DIR="$HOME/.cache/hx"Default:
- Linux:
~/.cache/hx - macOS:
~/Library/Caches/hx - Windows:
%LOCALAPPDATA%\hx\cache
HX_CONFIG_DIR
Override the config directory:
export HX_CONFIG_DIR="$HOME/.config/hx"HX_LOG
Set logging level:
export HX_LOG=debug # trace, debug, info, warn, errorHX_LOG_FORMAT
Set log format:
export HX_LOG_FORMAT=json # text, jsonBuild Settings
HX_JOBS
Default parallel jobs:
export HX_JOBS=8Overridden by --jobs flag and [build].jobs config.
HX_RELEASE
Build in release mode by default:
export HX_RELEASE=1HX_GHC_OPTIONS
Additional GHC options:
export HX_GHC_OPTIONS="-Wall -Werror"Toolchain Settings
HX_GHC
Override GHC executable:
export HX_GHC=/opt/ghc/9.8.2/bin/ghcHX_CABAL
Override Cabal executable:
export HX_CABAL=/opt/cabal/3.10/bin/cabalHX_BHC
Override BHC executable:
export HX_BHC=/opt/bhc/0.2.0/bin/bhcHX_GHCUP
Override GHCup executable:
export HX_GHCUP=/usr/local/bin/ghcupOutput Settings
NO_COLOR
Disable colored output:
export NO_COLOR=1CLICOLOR
Enable/disable color:
export CLICOLOR=1 # Enable
export CLICOLOR=0 # DisableCLICOLOR_FORCE
Force colored output (even in non-TTY):
export CLICOLOR_FORCE=1HX_COLOR
Control color output:
export HX_COLOR=always # always, auto, neverHX_PROGRESS
Show/hide progress indicators:
export HX_PROGRESS=1 # Show progress
export HX_PROGRESS=0 # Hide progressNetwork Settings
HX_OFFLINE
Offline mode (no network requests):
export HX_OFFLINE=1HTTP_PROXY / HTTPS_PROXY
Proxy settings:
export HTTP_PROXY=http://proxy.example.com:8080
export HTTPS_PROXY=http://proxy.example.com:8080HX_HACKAGE_SERVER
Override Hackage server:
export HX_HACKAGE_SERVER=https://hackage.haskell.orgCI Detection
CI
hx detects CI environments:
export CI=trueIn CI mode:
- Progress indicators are simplified
- Prompts are disabled
- Timestamps are added to output
GITHUB_ACTIONS
Detected automatically:
# GitHub Actions - auto-detected
- run: hx buildPath Settings
PATH
Ensure toolchains are in PATH:
export PATH="$HOME/.ghcup/bin:$PATH"
export PATH="$HOME/.bhc/bin:$PATH"Debugging
HX_DEBUG
Enable debug mode:
export HX_DEBUG=1Shows:
- Full command invocations
- Timing information
- Detailed error messages
HX_TRACE
Enable tracing (very verbose):
export HX_TRACE=1RUST_BACKTRACE
Show Rust backtraces on panic:
export RUST_BACKTRACE=1Shell Configuration
Bash
Add to ~/.bashrc:
# hx configuration
export PATH="$HOME/.ghcup/bin:$PATH"
export HX_LOG=info
# Shell completions
eval "$(hx completions bash)"Zsh
Add to ~/.zshrc:
# hx configuration
export PATH="$HOME/.ghcup/bin:$PATH"
export HX_LOG=info
# Shell completions
eval "$(hx completions zsh)"Fish
Add to ~/.config/fish/config.fish:
# hx configuration
set -gx PATH $HOME/.ghcup/bin $PATH
set -gx HX_LOG info
# Shell completions
hx completions fish | sourceDocker/Container Usage
FROM haskell:9.8
# Install hx
RUN curl -fsSL https://get.arcanist.sh/hx | sh
# Configure for container environment
ENV HX_LOG=info
ENV HX_PROGRESS=0
ENV CI=trueSee Also
- Installation — Setup guide
- hx.toml Reference — Configuration file