CABAL-INSTALL(1)

πŸ’– CABAL-INSTALL(1) πŸ’–

okay bestie, sit down, hydrate, because this is the manual page for cabal-install version 3.12.1.0 and it's literally the front door to the whole Haskell Cabal situation. no cap.


✨ NAME ✨

cabal-install β€” the manual page for cabal-install version 3.12.1.0. that's the whole name section, we move.


🌸 SYNOPSIS 🌸

cabal [GLOBAL FLAGS] [COMMAND [FLAGS]]

that's it. that's the shape of every single thing you're about to do. flags, command, more flags. iconic.


πŸ¦‹ DESCRIPTION πŸ¦‹

It's the command line interface to the Haskell Cabal infrastructure. the whole thing. your girl.

If you want more info (and honestly, who doesn't), it's at http://www.haskell.org/cabal/.


πŸ‘‘ Commands:

[global]

  • user-config β€” show and update your user's global cabal configuration. it's giving settings app but make it terminal.
  • help β€” help about commands. the classic. when in doubt, ask for help, no shame.

[package database]

  • update β€” updates the list of known packages. your package knowledge stays fresh, as it should.
  • list β€” list packages matching a search string. window shopping, but for packages.
  • info β€” display detailed information about a particular package. the deep dive, the lore, the backstory.

[initialization and download]

  • init β€” create a new cabal package. baby's first package, so cute.
  • fetch β€” downloads packages for later installation. saving them for later like a good little bookmark.
  • get β€” download/extract a package's source code (repository). yes the parenthetical is doing a lot of work there, i don't make the rules.

[project configuration]

  • configure β€” add extra project configuration.
  • freeze β€” freeze dependencies. lock them in place. periodt.
  • gen-bounds β€” generate dependency bounds. bounds are your friends, fr fr.
  • outdated β€” check for outdated dependencies. the vibe check your deps did NOT want.
  • path β€” query for simple project information. no period on that one, that's how the original rolls, i'm respecting it.

[project building and installing]

  • build β€” compile targets within the project. the main character command, honestly.
  • install β€” install packages.
  • haddock β€” build Haddock documentation.
  • haddock-project β€” generate Haddocks HTML documentation for the cabal project. yes, HTML, for the people who like pretty things (me).
  • clean β€” clean the package store and remove temporary files. spring cleaning energy, we love her.

[running and testing]

  • list-bin β€” list the path to a single executable. just the path. just the one. lowkey helpful.
  • repl β€” open an interactive session for the given component. poke at your code live, it's giving science experiment πŸ§ͺ
  • run β€” run an executable.
  • bench β€” run benchmarks. numbers go brrr.
  • test β€” run test-suites. the moment of truth, hold my hand 🫢
  • exec β€” give a command access to the store.

[sanity checks and shipping]

  • check β€” check the package for common mistakes. your friend who reads your essay before you submit it.
  • sdist β€” generate a source distribution file (.tar.gz).
  • upload β€” uploads source packages or documentation to Hackage. going public, bestie!
  • report β€” upload build reports to a remote server.

[deprecated]

⚠️ heads up: these are deprecated, meaning don't start anything new with them. they're still listed, so here they are, faithfully.
  • unpack β€” deprecated alias for get.
  • hscolour β€” generate HsColour colourised code, in HTML format. yes, "colourised" with a u, that's the spelling, i'm not touching it.

[new-style projects (forwards-compatible aliases)]

  • v2-build β€” compile targets within the project.
  • v2-configure β€” add extra project configuration.
  • v2-repl β€” open an interactive session for the given component.
  • v2-run β€” run an executable.
  • v2-test β€” run test-suites.
  • v2-bench β€” run benchmarks.
  • v2-freeze β€” freeze dependencies.
  • v2-haddock β€” build Haddock documentation.
  • v2-exec β€” give a command access to the store.
  • v2-update β€” updates the list of known packages.
  • v2-install β€” install packages.
  • v2-clean β€” clean the package store and remove temporary files.
  • v2-sdist β€” generate a source distribution file (.tar.gz).

[legacy command aliases]

  • v1-build β€” compile all/specific components.
  • v1-configure β€” prepare to build the package.
  • v1-repl β€” open an interpreter session for the given component.
  • v1-run β€” builds and runs an executable.
  • v1-test β€” run all/specific tests in the test suite.
  • v1-bench β€” run all/specific benchmarks.
  • v1-freeze β€” freeze dependencies.
  • v1-haddock β€” generate Haddock HTML documentation.
  • v1-install β€” install packages.
  • v1-clean β€” clean up after a build.
  • v1-copy β€” copy the files of all/specific components to install locations.
  • v1-register β€” register this package with the compiler.
  • v1-reconfigure β€” reconfigure the package if necessary.

πŸŽ€ For more information about a command use:

cabal COMMAND --help

or

cabal help COMMAND

two paths, same destination. pick your fighter πŸ’…


πŸ“ To install Cabal packages from hackage use:

cabal install foo [--dry-run]

the [--dry-run] is in brackets because it's optional, bestie, but honestly? try it first. look before you leap.


🌈 Occasionally you need to update the list of available packages:

cabal update

do it. don't skip it. your future self says thank you.


πŸ’œ Global flags:

  • -h, --help β€” show this help text.
  • -V, --version β€” print version information.
  • --numeric-version β€” print just the version number. just the number. no vibes, no frills.
  • --config-file=FILE β€” set an alternate location for the config file.
  • --ignore-expiry β€” ignore expiry dates on signed metadata. and listen: use only in exceptional circumstances. i'm serious, this one comes with a warning attached in the original and i am passing it straight to you.
  • --http-transport=HttpTransport β€” set a transport for http(s) requests. accepts 'curl', 'wget', 'powershell', and 'plain-http'. (default: 'curl')
  • --nix[=(True or False)] β€” [DEPRECATED] nix integration: run commands through nix-shell if a 'shell.nix' file exists (default is False).
  • --enable-nix β€” [DEPRECATED] enable Nix integration: run commands through nix-shell if a 'shell.nix' file exists.
  • --disable-nix β€” [DEPRECATED] disable Nix integration.
  • --store-dir=DIR β€” the location of the build store.
  • --active-repositories=REPOS β€” the active package repositories (set to ':none' to disable all repositories).
note that those three nix flags are all marked [DEPRECATED] in the original and i'm keeping that energy loud and clear. deprecated means deprecated. πŸ™ˆ

🧚 You can edit the cabal configuration file to set defaults:

/sbuild-nonexistent/.config/cabal/config

that exact path, character for character, don't come for me.

This file will be generated with sensible defaults if you run 'cabal update'.

compiled using version 3.12.1.0 of the Cabal library.


and that's the whole page, bestie!! you read all of it, i'm so proud, genuinely πŸ₯Ή this was cabal-install version 3.12.1.0, from February 2026, and it's page CABAL-INSTALL(1) of the User Commands manual. go forth and cabal build, you absolute icon. πŸ’–βœ¨

πŸ“¦ where this page comes from