OPAM-INIT(1)

NAME

opam-init - Initialize OPAM state.

SYNOPSIS

opam init [OPTION]... [NAME] [ADDRESS]

DESCRIPTION

The init command creates a fresh client state. This initializes OPAM configuration in ~/.opam and configures a default package repository.

Once the fresh client has been created, OPAM will ask the user if he wants ~/.profile (or i,~/.zshrc, depending on his shell) and ~/.ocamlinit to be updated. If --auto-setup is used, OPAM will modify the configuration files automatically, without asking the user. If --no-setup is used, OPAM will *NOT* modify anything outside of ~/.opam.

Additional repositories can be added later by using the opam repository command.

The state of repositories can be synchronized by using opam update.

The user and global configuration files can be setup later by using opam config setup.

ARGUMENTS

ADDRESS (absent=http://opam.ocamlpro.com)
    Address of the repository.

NAME (absent=default)
    Name of the repository.

OPTIONS

-a, --auto-setup
    Automatically setup all the global and user configuration options for OPAM.

-b, --keep-build-dir
    Keep the build directory. This is equivalent to setting $OPAMKEEPBUILDIR to a non-empty string.

--comp=VERSION (absent=system)
    Which compiler version to use.

--csh
    Use csh-compatible mode for configuring OPAM.

--csh
    Use sh-compatible mode for configuring OPAM.

--cudf=FILENAME
    Save the CUDF request sent to the solver to FILENAME-<n>.cudf.

-d, --build-doc
    Build the package documentation. This is equivalent to setting $OPAMBUILDDOC to a non-empty string.

--dot-profile=FILENAME
    Name of the configuration file to update instead of ~/.profile or ~/.zshrc based on shell detection.

--dry-run
    Simply call the solver without actually performing any build/install operations.

-e TAGS, --external=TAGS
    Display the external packages associated to the given tags.

--fake
    WARNING: This option is fo testing purposes only! Using this option without care is the best way to corrupt your current compiler environement. When using this option OPAM will run a dry-run of the solver and then fake the build and install commands

-j JOBS, --jobs=JOBS (absent=1)
    Number of jobs to use when building packages.

-k KIND, --kind=KIND
    Specify the kind of the repository to be set (the main ones are 'http', 'local', 'git' or 'darcs').

-m MAKE, --make=MAKE
    Use MAKE as the default 'make' command.

-n, --no-checksums
    Do not verify the checksum of downloaded archives.This is equivalent to setting $OPAMNOCHECKSUMS to a non-empty string.

-n, --no-setup
    Do not update the global and user configuration options to setup OPAM.

-t, --build-test
    Build and run the package unit-tests. This is equivalent to setting $OPAMBUILDTEST to a non-empty string.

--zsh
    Use zsh-compatible mode for configuring OPAM.

COMMON OPTIONS

These options are common to all commands.

--debug
    Print debug message on stdout. This is equivalent to setting $OPAMDEBUG to a value greater or equal to 2.

--git-version
    Print the git version if it exists and exit.

--help[=FMT] (default=pager)
    Show this help in format FMT (pager, plain or groff).

--no-base-packages
    Do not install base packages (useful for testing purposes). This is equivalent to setting $OPAMNOBASEPACKAGES to a non-empty string.

-q, --quiet
    Be quiet when installing a new compiler.

-r ROOT, --root=ROOT (absent=/Users/tgazagna/.opam)
    Use ROOT as the current root path. This is equivalent to setting $OPAMROOT to ROOT.

--switch=SWITCH
    Use SWITCH as the current compiler switch. This is equivalent to setting $OPAMSWITCH to SWITCH.

-v, --verbose
    Be more verbose. This is equivalent to setting either $OPAMDEBUG to a value greater or equal to 1 or $OPAMVERBOSE to a non-empty string.

--version
    Show version information.

-y, --yes
    Disable interactive mode and answer yes to all questions that would otherwise be asked to the user. This is equivalent to setting $OPAMYES to a non-empty string.

FURTHER DOCUMENTATION

See http://opam.ocamlpro.com.

AUTHORS

Thomas Gazagnaire <thomas.gazagnaire@ocamlpro.com>

Frederic Tuong <tuong@users.gforge.inria.fr>

Vincent Bernardoff <vb@luminar.eu.org>

Guillem Rieu <guillem.rieu@ocamlpro.com>

BUGS

Check bug reports at https://github.com/OCamlPro/opam/issues.