{"id":39614955,"url":"https://github.com/raskell-io/hx","last_synced_at":"2026-01-25T09:00:51.627Z","repository":{"id":332805656,"uuid":"1135050223","full_name":"raskell-io/hx","owner":"raskell-io","description":"An extremely fast Haskell package and project manager, written in Rust. ","archived":false,"fork":false,"pushed_at":"2026-01-18T07:27:24.000Z","size":642,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-18T16:33:05.385Z","etag":null,"topics":["cabal","haskell","hx","package-manager","rust"],"latest_commit_sha":null,"homepage":"https://hx.raskell.io/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raskell-io.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-15T15:14:04.000Z","updated_at":"2026-01-18T08:58:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/raskell-io/hx","commit_stats":null,"previous_names":["raskell-io/hx"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/raskell-io/hx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raskell-io%2Fhx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raskell-io%2Fhx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raskell-io%2Fhx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raskell-io%2Fhx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raskell-io","download_url":"https://codeload.github.com/raskell-io/hx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raskell-io%2Fhx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28750624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T09:00:19.176Z","status":"ssl_error","status_checked_at":"2026-01-25T09:00:04.131Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cabal","haskell","hx","package-manager","rust"],"created_at":"2026-01-18T08:16:26.233Z","updated_at":"2026-01-25T09:00:51.603Z","avatar_url":"https://github.com/raskell-io.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\".github/static/hx-logo.svg\" alt=\"hx\" height=\"80\" /\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003eA fast, opinionated, batteries-included toolchain for Haskell.\u003c/em\u003e\u003cbr\u003e\n  \u003cem\u003eHaskell, finally fast.\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.rust-lang.org/\"\u003e\n    \u003cimg alt=\"Rust\" src=\"https://img.shields.io/badge/Rust-stable-000000?logo=rust\u0026logoColor=white\u0026style=for-the-badge\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.haskell.org/\"\u003e\n    \u003cimg alt=\"Haskell\" src=\"https://img.shields.io/badge/For-Haskell-5e5086?logo=haskell\u0026logoColor=white\u0026style=for-the-badge\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\n    \u003cimg alt=\"License\" src=\"https://img.shields.io/badge/License-MIT-c6a0f6?style=for-the-badge\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://hx.raskell.io/docs/\"\u003eDocumentation\u003c/a\u003e •\n  \u003ca href=\"https://hx.raskell.io/features/\"\u003eFeatures\u003c/a\u003e •\n  \u003ca href=\"https://hx.raskell.io/benchmarks/\"\u003eBenchmarks\u003c/a\u003e •\n  \u003ca href=\"CONTRIBUTING.md\"\u003eContributing\u003c/a\u003e\n\u003c/p\u003e\n\n\u003c/div\u003e\n\n---\n\nhx is a modern toolchain CLI for Haskell, written in Rust. It wraps existing tools (GHC, Cabal, GHCup, HLS) in a fast, unified interface with excellent error messages and deterministic builds.\n\n## Features\n\n- **Fast feedback loop** - Common workflows are snappy with parallel builds\n- **Deterministic builds** - Lockfile + frozen plans for reproducibility\n- **Native builds** - Direct GHC invocation without cabal for simple projects\n- **Excellent errors** - Actionable messages with fix suggestions\n- **Watch mode** - Auto-rebuild on file changes\n- **Test coverage** - Integrated hpc support with HTML reports\n- **Plugin system** - Extensible with Steel (Scheme) scripts\n- **Self-contained** - Manages GHC versions directly, no ghcup required\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\".github/static/demo.gif\" alt=\"hx demo\" width=\"600\" /\u003e\n\u003c/div\u003e\n\n## Installation\n\n### From releases\n\n```bash\n# macOS/Linux\ncurl -fsSL https://raw.githubusercontent.com/raskell-io/hx/main/install.sh | sh\n\n# Or download from releases\nhttps://github.com/raskell-io/hx/releases\n```\n\n### From source\n\n```bash\ncargo install --git https://github.com/raskell-io/hx hx-cli\n```\n\n### Verify installation\n\n```bash\nhx --version\nhx doctor\n```\n\n## Quick Start\n\n```bash\n# Create a new project\nhx init myapp\ncd myapp\n\n# Build and run\nhx build\nhx run\n\n# Lock dependencies for reproducibility\nhx lock\nhx sync\n\n# Watch for changes\nhx watch\n```\n\n## Commands\n\n### Project Management\n\n```bash\nhx init                      # Initialize in current directory\nhx init myapp                # Create myapp/ and initialize\nhx init --lib                # Create a library project\nhx init --ci                 # Include GitHub Actions workflow\n\nhx new webapp myapp          # Create web app (Servant)\nhx new cli myapp             # Create CLI app (optparse-applicative)\nhx new library mylib         # Create library with docs setup\nhx new --template user/repo  # Create from git template\n```\n\n### Building\n\n```bash\nhx build                     # Build the project\nhx build --release           # Build with optimizations\nhx build --native            # Use native GHC build (no cabal)\nhx build -j4                 # Parallel build with 4 jobs\nhx check                     # Fast type-check\nhx clean                     # Clean build artifacts\n```\n\n### Running \u0026 Testing\n\n```bash\nhx run                       # Build and run the executable\nhx run -- arg1 arg2          # Pass arguments to the program\nhx repl                      # Start an interactive GHCi session\nhx test                      # Run tests\nhx test --pattern \"Unit\"     # Filter tests by pattern\nhx bench                     # Run benchmarks\n```\n\n### Watch Mode\n\n```bash\nhx watch                     # Auto-rebuild on file changes\nhx watch --test              # Auto-run tests on changes\nhx watch --clear             # Clear terminal between runs\n```\n\n### Dependencies\n\n```bash\nhx lock                      # Generate/update hx.lock\nhx lock --update             # Update all dependencies\nhx sync                      # Build with locked dependencies\nhx fetch                     # Pre-fetch dependencies in parallel\n\nhx add text                  # Add a dependency\nhx add aeson \"\u003e=2.0\"         # Add with version constraint\nhx add --dev hspec           # Add dev dependency\nhx rm text                   # Remove a dependency\n\nhx why text                  # Show why a package is a dependency\nhx info aeson                # Show package details from Hackage\nhx info aeson --versions     # Include all available versions\nhx outdated                  # Check for outdated dependencies\nhx outdated --direct         # Only show direct dependencies\nhx update                    # Update dependencies (minor/patch)\nhx update --major            # Allow major version updates\nhx update --dry-run          # Preview updates without applying\nhx update aeson text         # Update specific packages\n\nhx tree                      # Show dependency tree\nhx tree --depth 2            # Limit tree depth\nhx list                      # List all dependencies\nhx list --direct             # List direct dependencies only\n\nhx deps graph --format dot   # Generate Graphviz graph\n\nhx search aeson              # Search Hackage for packages\nhx audit                     # Check for vulnerabilities\nhx audit --outdated          # Check for outdated packages\n```\n\n### Code Quality\n\n```bash\nhx fmt                       # Format code with fourmolu\nhx fmt --check               # Check formatting without changes\nhx lint                      # Run hlint\nhx lint --fix                # Apply automatic fixes\n```\n\n### Test Coverage\n\n```bash\nhx coverage                  # Run tests with coverage\nhx coverage --html           # Generate HTML report\nhx coverage --html --open    # Generate and open in browser\nhx coverage --threshold 80   # Fail if below 80% coverage\nhx coverage --json           # Output JSON for CI\n```\n\n### Profiling\n\n```bash\nhx profile                   # Run with time profiling\nhx profile --heap            # Run with heap profiling\nhx profile --time --heap     # Both time and heap\n```\n\n### Documentation\n\n```bash\nhx docs                      # Generate documentation\nhx docs --open               # Generate and open in browser\nhx docs --deps               # Include dependency docs\nhx docs --serve              # Serve locally on port 8080\n```\n\n### Toolchain Management\n\n```bash\nhx toolchain status          # Show installed versions\nhx toolchain list            # List all available versions\nhx toolchain list --installed # List installed versions only\n\nhx toolchain install 9.8.2   # Install GHC version\nhx toolchain install --set   # Install and set as active\nhx toolchain remove 9.6.4    # Remove a GHC version\n\nhx toolchain use 9.8.2       # Switch GHC version\nhx toolchain use project     # Use project's toolchain\n```\n\n### IDE Integration\n\n```bash\nhx ide setup                 # Generate hie.yaml for HLS\nhx ide status                # Check IDE configuration\nhx lsp                       # Start language server\n```\n\n### Publishing\n\n```bash\nhx publish                   # Publish to Hackage\nhx publish --dry-run         # Validate without uploading\nhx publish --docs            # Include documentation\nhx changelog                 # Generate CHANGELOG from commits\nhx changelog --preview       # Preview without writing\n```\n\n### Distribution\n\n```bash\nhx dist                      # Build release archive\nhx dist --target x86_64-unknown-linux-musl  # Cross-compile\nhx dist formula              # Generate Homebrew formula\nhx dist install-script       # Generate install script\n```\n\n### Utilities\n\n```bash\nhx doctor                    # Diagnose setup issues\nhx script file.hs            # Run single-file script\nhx import --from stack       # Import from stack.yaml\nhx nix flake                 # Generate flake.nix\nhx nix shell                 # Generate shell.nix\nhx completions install       # Auto-install completions for your shell\nhx completions generate bash # Generate completions to stdout\nhx upgrade                   # Upgrade hx to latest version\n```\n\n### Cache Management\n\n```bash\nhx cache status              # Show cache statistics\nhx cache prune --days 30     # Remove entries older than 30 days\nhx cache clean               # Clear entire cache\nhx index update              # Update Hackage package index\nhx index status              # Show index status\n```\n\n### Plugins\n\n```bash\nhx plugins list              # List available plugins\nhx plugins status            # Show plugin system status\nhx plugins run script.scm    # Run a Steel script\n```\n\n## Configuration\n\nhx uses `hx.toml` for project configuration:\n\n```toml\n[project]\nname = \"myapp\"\nkind = \"bin\"         # or \"lib\"\nresolver = \"cabal\"\n\n[toolchain]\nghc = \"9.8.2\"\ncabal = \"3.12.1.0\"\nhls = \"2.9.0.0\"\n\n[build]\noptimization = 2     # 0, 1, or 2\nwarnings = true\nnative = false       # Use native GHC builds\n\n[format]\nformatter = \"fourmolu\"\n\n[lint]\nhlint = true\n\n[plugins]\nenabled = true\nhook_timeout_ms = 30000\n\n[plugins.hooks]\npre_build = [\"./scripts/check.scm\"]\npost_test = [\"./scripts/notify.scm\"]\n```\n\n## Global Configuration\n\nhx supports global configuration at `~/.config/hx/config.toml` (Linux), `~/Library/Application Support/hx/config.toml` (macOS), or `%APPDATA%\\hx\\config\\config.toml` (Windows).\n\nGlobal settings provide defaults that can be overridden by project-local `hx.toml`:\n\n```toml\n# ~/.config/hx/config.toml\n\n[toolchain]\nghc = \"9.8.2\"\ncabal = \"3.12.1.0\"\n\n[build]\noptimization = 1\nwarnings = true\n\n[format]\nformatter = \"fourmolu\"\n\n[lint]\nhlint = true\n```\n\n### Managing Global Config\n\n```bash\nhx config show           # Show current global configuration\nhx config path           # Show path to global config file\nhx config edit           # Open config file in your $EDITOR\nhx config init           # Create default config file\nhx config set \u003ckey\u003e \u003cval\u003e # Set a configuration value\nhx config get \u003ckey\u003e      # Get a configuration value\n\n# Examples:\nhx config set toolchain.ghc 9.8.2\nhx config set build.optimization 2\nhx config set format.formatter ormolu\n```\n\n## Lockfile\n\nThe `hx.lock` file ensures reproducible builds:\n\n```toml\nversion = 1\ncreated_at = \"2026-01-16T00:00:00Z\"\n\n[toolchain]\nghc = \"9.8.2\"\ncabal = \"3.12.1.0\"\n\n[plan]\ncompiler_id = \"ghc-9.8.2\"\nplatform = \"x86_64-linux\"\nhash = \"sha256:...\"\n\n[[packages]]\nname = \"text\"\nversion = \"2.1.1\"\n```\n\n## Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `HX_VERBOSE` | Enable verbose output |\n| `HX_QUIET` | Suppress output |\n| `HX_NO_COLOR` | Disable colored output |\n| `HX_CONFIG_FILE` | Path to config file |\n| `HX_CACHE_DIR` | Cache directory location |\n| `HX_AUTO_INSTALL` | Auto-install missing toolchains |\n| `HX_NO_AUTO_INSTALL` | Never auto-install toolchains |\n\n## Exit Codes\n\n| Code | Meaning |\n|------|---------|\n| 0 | Success |\n| 1 | General error |\n| 2 | Usage error |\n| 3 | Configuration error |\n| 4 | Toolchain error |\n| 5 | Build/test failure |\n| 6 | Plugin hook failure |\n\n## Architecture\n\nhx is a Rust workspace with these crates:\n\n| Crate | Purpose |\n|-------|---------|\n| `hx-cli` | Command-line interface |\n| `hx-core` | Shared types and utilities |\n| `hx-config` | Configuration parsing |\n| `hx-lock` | Lockfile management |\n| `hx-toolchain` | GHC/Cabal detection and installation |\n| `hx-cabal` | Cabal wrapper and native builds |\n| `hx-cache` | Build cache management |\n| `hx-doctor` | Diagnostic checks |\n| `hx-solver` | Native dependency resolver |\n| `hx-lsp` | Language server protocol |\n| `hx-plugins` | Steel plugin runtime |\n| `hx-ui` | Terminal output utilities |\n| `hx-warnings` | Warning system |\n| `hx-telemetry` | Tracing and metrics |\n\n## Development\n\n```bash\n# Build\ncargo build\n\n# Run tests\ncargo test --workspace\n\n# Run clippy\ncargo clippy --workspace -- -D warnings\n\n# Format\ncargo fmt\n\n# Run hx locally\ncargo run -p hx-cli -- --help\n```\n\n## Philosophy\n\nhx follows the [Astral](https://astral.sh/) approach:\n\n1. **Wrap first** - Use existing tools (Cabal, GHC) rather than reimplementing\n2. **Tame second** - Add better UX, error messages, and workflows\n3. **Replace last** - Only replace components when truly necessary (native builds)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraskell-io%2Fhx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraskell-io%2Fhx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraskell-io%2Fhx/lists"}