Skip to content

Installation

Choose an installation method below. If you already selected a tab on the home page, your selection stays active here.

Terminal window
cabal update && cabal install canontra

Canontra is published on Hackage (canontra >= 0.4). If you have GHC (>= 9.6) and Cabal (>= 3.0) installed:

Terminal window
cabal update
cabal install canontra

Make sure your Cabal binary folder is on PATH:

  • Linux / macOS: ~/.cabal/bin (or ~/.local/bin if you pass --installdir)
  • Windows: %APPDATA%\cabal\bin

If you do not have Haskell installed, use the official release scripts. They detect your OS and CPU architecture, install the standalone binary, add it to your user PATH (no admin rights required), and set up shell autocompletions.

Terminal window
curl -fsSL https://raw.githubusercontent.com/symtrace/canontra/main/install.sh | bash
  • Installs into ~/.local/bin/canontra.
  • Linux x86_64 binaries are stripped standalone executables.
  • macOS aarch64 (Apple Silicon) binaries are ad-hoc codesigned.
  • Adds completions for Bash, Zsh, or Fish when present.

Preview what the script will do without changing any files:

Terminal window
curl -fsSL https://raw.githubusercontent.com/symtrace/canontra/main/install.sh -o install.sh
bash install.sh --dry-run
Terminal window
irm https://raw.githubusercontent.com/symtrace/canontra/main/install.ps1 | iex
  • Detects AMD64 or ARM64 and installs canontra.exe into %LOCALAPPDATA%\Programs\canontra.
  • Official Windows release binaries are Authenticode self-signed with SHA-256.
  • Adds %LOCALAPPDATA%\Programs\canontra to your User PATH and registers PowerShell completions in $PROFILE.

Preview without modifying files or environment variables:

Terminal window
.\install.ps1 -DryRun

In air-gapped or security-restricted environments, download the binary together with SHA256SUMS.txt from GitHub Releases and verify its SHA-256 checksum before running:

Terminal window
# Linux / macOS
sha256sum -c SHA256SUMS.txt --ignore-missing
Terminal window
# Windows PowerShell
Get-FileHash .\canontra-windows-AMD64.exe -Algorithm SHA256
Get-Content .\SHA256SUMS.txt

Requires GHC 9.6.6, Stack (LTS 22.28) or Cabal (>= 3.0), and Git. Canontra has no C/C++ library dependencies, so it builds cleanly offline once Haskell packages are cached.

Terminal window
git clone https://github.com/symtrace/canontra.git
cd canontra
stack build --fast
stack install

For an optimized -O2 release binary:

Terminal window
stack build --copy-bins --local-bin-path ./dist-bin --ghc-options="-O2"
Terminal window
canontra version

Expected output for v0.4.0.0:

canontra version 0.4.0