Haskell's tooling is powerful — and scattered. Starting a project means juggling ghcup, cabal, stack, fourmolu, hlint, and hpc, each with its own flags, config, and failure modes.
hx collapses all of it into a single, fast binary. Written in Rust, it drives the tools you already trust behind one coherent interface — with deterministic builds, errors that tell you how to fix them, and a feedback loop quick enough to stay out of your way.
One command to install. One file to configure. One tool to learn.
Why hx?
- Batteries included — Build, test, run, format, lint, profile, and publish. Watch mode, coverage reports, and IDE setup. Everything in one tool.
- Managed toolchains — Automatic GHC installation and per-project version pinning in
hx.toml. No ghcup required. - Deterministic builds — TOML lockfiles with fingerprint verification. Reproducible across machines and CI — correct by construction, not by luck.
- Excellent errors — Actionable messages with fix suggestions.
hx doctordiagnoses your setup and tells you exactly what to do. - Drop-in compatible — Works with existing
.cabalfiles and Hackage. Import from Stack or Cabal — your workflow stays the same, just better. - Extensible — Plugin system with Steel (Scheme), pre/post-build hooks, and Nix integration.
- Blazingly fast — Native builds bypass Cabal overhead: ~5.6× faster cold builds, ~7.8× faster incremental.
- Futuristic — A first-class BHC backend: a next-generation Haskell compiler with curated Platform snapshots.
Installation
From releases
# macOS/Linux
|
# Or download from releases
Windows
winget install raskell-io.hx
From source
Verify installation
Quick Start
# Create a new project
# Build and run
# Lock dependencies for reproducibility
# Watch for changes
Commands
Project Management
Building
Running & Testing
Watch Mode
Dependencies
Code Quality
Test Coverage
Profiling
Documentation
Toolchain Management
IDE Integration
Publishing
Distribution
Utilities
Cache Management
Plugins
Project-local plugins (.hx/plugins/*.scm) only run after you trust the
project with hx plugins trust - cloning a repository never grants its
scripts execution rights.
Configuration
hx uses hx.toml for project configuration:
[]
= "myapp"
= "bin" # or "lib"
= "cabal"
[]
= "9.8.2"
= "3.12.1.0"
= "2.9.0.0"
[]
= 2 # 0, 1, or 2
= true
= false # Use native GHC builds
[]
= "fourmolu"
[]
= true
[]
= true
= 30000
[]
= ["./scripts/check.scm"]
= ["./scripts/notify.scm"]
Global Configuration
hx supports global configuration at ~/.config/hx/config.toml (Linux), ~/Library/Application Support/hx/config.toml (macOS), or %APPDATA%\hx\config\config.toml (Windows).
Global settings provide defaults that can be overridden by project-local hx.toml:
# ~/.config/hx/config.toml
[]
= "9.8.2"
= "3.12.1.0"
[]
= 1
= true
[]
= "fourmolu"
[]
= true
Managing Global Config
# Examples:
Lockfile
The hx.lock file ensures reproducible builds:
= 1
= "2026-01-16T00:00:00Z"
[]
= "9.8.2"
= "3.12.1.0"
[]
= "ghc-9.8.2"
= "x86_64-linux"
= "sha256:..."
[[]]
= "text"
= "2.1.1"
Environment Variables
| Variable | Description |
|---|---|
HX_VERBOSE |
Enable verbose output |
HX_QUIET |
Suppress output |
HX_NO_COLOR |
Disable colored output |
HX_CONFIG_FILE |
Path to config file |
HX_CACHE_DIR |
Cache directory location |
HX_AUTO_INSTALL |
Auto-install missing toolchains |
HX_NO_AUTO_INSTALL |
Never auto-install toolchains |
HX_ALLOW_UNVERIFIED_DOWNLOADS |
Allow toolchain installs without a published checksum |
HX_BHC_PLATFORM_PUBKEY |
Pinned Ed25519 key for BHC Platform snapshot verification |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Usage error |
| 3 | Configuration error |
| 4 | Toolchain error |
| 5 | Build/test failure |
| 6 | Plugin hook failure |
Architecture
hx is a Rust workspace with these crates:
| Crate | Purpose |
|---|---|
hx-cli |
Command-line interface |
hx-core |
Shared types and utilities |
hx-config |
Configuration parsing |
hx-lock |
Lockfile management |
hx-toolchain |
GHC/Cabal detection and installation |
hx-cabal |
Cabal wrapper and native builds |
hx-cache |
Build cache management |
hx-doctor |
Diagnostic checks |
hx-solver |
Native dependency resolver |
hx-lsp |
Language server protocol |
hx-plugins |
Steel plugin runtime |
hx-ui |
Terminal output utilities |
hx-warnings |
Warning system |
hx-telemetry |
Tracing and metrics |
hx-compiler |
Compiler backend abstraction (GHC, BHC) |
hx-bhc |
BHC (Basel Haskell Compiler) native build pipeline |
Development
# Build
# Run tests
# Run clippy
# Format
# Run hx locally
Philosophy
hx follows the Astral playbook — earn trust by improving what exists before replacing any of it:
- Wrap first — Drive the tools you already rely on (GHC, Cabal) instead of reimplementing them.
- Tame second — Layer on better UX, error messages, and workflows until the rough edges disappear.
- Replace last — Swap in faster paths (native builds) and a next-generation compiler (BHC) only where they earn their place.
The destination: a Haskell toolchain that's fast, unified, and futuristic — without asking you to throw away what already works.
License
MIT — part of arcanist.sh.