Commands
========
``cabal help`` groups commands into :ref:`global`,
:ref:`database`, :ref:`init`,
:ref:`configure`, :ref:`build`,
:ref:`run` and :ref:`ship` sections.
::
$ cabal help
Command line interface to the Haskell Cabal infrastructure.
See http://www.haskell.org/cabal/ for more information.
Usage: cabal [GLOBAL FLAGS] [COMMAND [FLAGS]]
Commands:
[global]
user-config Display and update the user's global cabal configuration.
help Help about commands.
path Display paths used by cabal.
[package database]
update Updates list of known packages.
list List packages matching a search string.
info Display detailed information about a particular package.
[initialization and download]
init Create a new cabal package.
fetch Downloads packages for later installation.
get Download/Extract a package's source code (repository).
[project configuration]
configure Add extra project configuration.
freeze Freeze dependencies.
gen-bounds Generate dependency bounds.
outdated Check for outdated dependencies.
[project building and installing]
build Compile targets within the project.
install Install packages.
haddock Build Haddock documentation.
haddock-project Generate Haddocks HTML documentation for the cabal project.
clean Clean the package store and remove temporary files.
[running and testing]
list-bin List the path to a single executable.
repl Open an interactive session for the given component.
run Run an executable.
bench Run benchmarks.
test Run test-suites.
exec Give a command access to the store.
[sanity checks and shipping]
check Check the package for common mistakes.
sdist Generate a source distribution file (.tar.gz).
upload Uploads source packages or documentation to Hackage.
report Upload build reports to a remote server.
[deprecated]
unpack Deprecated alias for 'get'.
hscolour Generate HsColour colourised code, in HTML format.
[new-style projects (forwards-compatible aliases)]
Since cabal-install-3.0.0.0, all 'v2-' prefixed names of commands are just
aliases for the simple unprefixed names. So v2-build is an alias for
build, v2-install for install and so on.
[legacy command aliases]
No legacy commands are described.
Common Arguments and Flags
--------------------------
Arguments and flags common to some or all commands are:
.. option:: --default-user-config=file
Allows a "default" ``cabal.config`` freeze file to be passed in
manually. This file will only be used if one does not exist in the
project directory already. Typically, this can be set from the
global cabal ``config`` file so as to provide a default set of
partial constraints to be used by projects, providing a way for
users to peg themselves to stable package collections.