.\" Pipe this output to groff -man -Tutf8 | less .\" .TH "OPAM-CONFIG" 1 "" "Opam 1.2.0" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l .SH NAME .P opam\-config \- Display configuration options for packages. .SH SYNOPSIS .P \fBopam config\fR [\fIOPTION\fR]... [\fICOMMAND\fR] [\fIARG\fR]... .SH DESCRIPTION .P This command uses OPAM state to output information on how to use installed libraries, update the \fBPATH\fR, and substitute variables used in OPAM packages. .P Apart from \fBopam config env\fR, most of these commands are used by OPAM internally, and are of limited interest for the casual user. .SH COMMANDS .TP 4 \fBenv\fR Return the environment variables PATH, MANPATH, OCAML_TOPLEVEL_PATH and CAML_LD_LIBRARY_PATH according to the currently selected compiler. The output of this command is meant to be evaluated by a shell, for example by doing \fBeval `opam config env`\fR. .TP 4 \fBsetup\fR Configure global and user parameters for OPAM. Use \fB opam config setup\fR to display more options. Use \fB\-\-list\fR to display the current configuration options. You can use this command to automatically update: (i) user\-configuration files such as ~/.profile and ~/.ocamlinit; and (ii) global\-configaration files controlling which shell scripts are loaded on startup, such as auto\-completion. These configuration options can be updated using: \fBopam config setup \-\-global\fR to setup the global configuration files stored in \fB~/.opam/opam\-init/\fR and \fBopam config setup \-\-user\fR to setup the user ones. To modify both the global and user configuration, use \fBopam config setup \-\-all\fR. .TP 4 \fBexec\fR \fI[\-\-] COMMAND\fR \fI[ARG]...\fR Execute \fICOMMAND\fR with the correct environment variables. This command can be used to cross\-compile between switches using \fBopam config exec \-\-switch=SWITCH \-\- COMMAND ARG1 ... ARGn\fR .TP 4 \fBvar\fR \fIVAR\fR Return the value associated with variable \fIVAR\fR. Package variables can be accessed with the syntax \fIpkg:var\fR. .TP 4 \fBlist\fR \fI[PACKAGE]...\fR Without argument, prints a documented list of all available variables. With \fIPACKAGE\fR, lists all the variables available for these packages. .TP 4 \fBsubst\fR \fIFILE...\fR Substitute variables in the given files. The strings \fI%{var}%\fR are replaced by the value of variable \fIvar\fR (see \fBvar\fR). .TP 4 \fBreport\fR Prints a summary of your setup, useful for bug\-reports. .TP 4 \fBcudf\-universe\fR \fI[FILE]\fR Outputs the current available package universe in CUDF format. .SH OPTIONS .TP 4 \fB\-a\fR, \fB\-\-all\fR Enable all the global and user configuration options. .TP 4 \fB\-\-csh\fR Use csh\-compatible mode for configuring OPAM. .TP 4 \fB\-\-dot\-profile\fR=\fIFILENAME\fR Name of the configuration file to update instead of \fI~/.profile\fR or \fI~/.zshrc\fR based on shell detection. .TP 4 \fB\-\-fish\fR Use fish\-compatible mode for configuring OPAM. .TP 4 \fB\-g\fR, \fB\-\-global\fR Enable all the global configuration options. .TP 4 \fB\-\-inplace\-path\fR When updating the PATH variable, replace any pre\-existing OPAM path in\-place rather than putting the new path in front. This means programs installed in OPAM that were shadowed will remain so after \fBopam config env\fR .TP 4 \fB\-l\fR, \fB\-\-list\fR List the current configuration. .TP 4 \fB\-\-no\-complete\fR Do not load the auto\-completion scripts in the environment. .TP 4 \fB\-\-no\-switch\-eval\fR Do not install `opam\-switch\-eval` to switch & eval using a single command. .TP 4 \fB\-\-ocamlinit\fR Modify ~/.ocamlinit to make `#use "topfind"` works in the toplevel. .TP 4 \fB\-\-profile\fR Modify ~/.profile (or ~/.zshrc if running zsh) to setup an OPAM\-friendly environment when starting a new shell. .TP 4 \fB\-\-sexp\fR Display environment variables as an s\-expression .TP 4 \fB\-\-sh\fR Use sh\-compatible mode for configuring OPAM. .TP 4 \fB\-u\fR, \fB\-\-user\fR Enable all the user configuration options. .TP 4 \fB\-\-zsh\fR Use zsh\-compatible mode for configuring OPAM. .SH COMMON OPTIONS .P These options are common to all commands. .TP 4 \fB\-\-color\fR=\fIWHEN\fR (absent=auto) Colorize the output. \fIWHEN\fR must be `always', `never' or `auto'. .TP 4 \fB\-\-compat\-mode\-1.0\fR Compatibility mode with OPAM 1.0 .TP 4 \fB\-\-criteria\fR=\fICRITERIA\fR Specify user \fIpreferences\fR for dependency solving for this run. Overrides both \fB$OPAMCRITERIA\fR and \fB$OPAMUPGRADECRITERIA\fR. For details on the supported language, and the external solvers available, see \fI http://opam.ocaml.org/doc/Specifying_Solver_Preferences.html\fR. A general guide to using solver preferences can be found at \fI http://www.dicosmo.org/Articles/usercriteria.pdf\fR. The default value is \-count(down),\-count(removed),\-notuptodate(solution),\-count(new) for upgrades, and \-count(removed),\-notuptodate(request),\-count(down),\-notuptodate(changed),\-count(changed),\-notuptodate(solution) otherwise. .TP 4 \fB\-\-cudf\fR=\fIFILENAME\fR Debug option: Save the CUDF requests sent to the solver to \fIFILENAME\fR\-.cudf. .TP 4 \fB\-\-debug\fR Print debug message to stderr. This is equivalent to setting \fB$OPAMDEBUG\fR to "true". .TP 4 \fB\-\-debug\-level\fR=\fILEVEL\fR Like `\-\-debug', but allows specifying the debug level (`\-\-debug' sets it to 1). Equivalent to setting \fB$OPAMDEBUG\fR to a positive integer. .TP 4 \fB\-\-git\-version\fR Print the git version if it exists and exit. .TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 \fB\-\-no\-base\-packages\fR Do not install base packages (useful for testing purposes). This is equivalent to setting \fB$OPAMNOBASEPACKAGES\fR to a non\-empty string. .TP 4 \fB\-\-no\-self\-upgrade\fR OPAM will replace itself with a newer binary found at \fBOPAMROOT/opam\fR if present. This disables this behaviour. .TP 4 \fB\-q\fR, \fB\-\-quiet\fR Be quiet when installing a new compiler. .TP 4 \fB\-\-root\fR=\fIROOT\fR (absent=~/.opam) Use \fIROOT\fR as the current root path. This is equivalent to setting \fB$OPAMROOT\fR to \fIROOT\fR. .TP 4 \fB\-\-safe\fR Make sure nothing will be automatically updated or rewritten. Useful for calling from completion scripts, for example. Will fail whenever such an operation is needed ; also avoids waiting for locks, skips interactive questions and overrides the OPAMDEBUG variable. .TP 4 \fB\-\-solver\fR=\fICMD\fR Specify the name of the external dependency \fIsolver\fR. The default value is aspcud .TP 4 \fB\-\-strict\fR Fail whenever an error is found in a package definition or a configuration file. The default is to continue silently if possible. .TP 4 \fB\-\-switch\fR=\fISWITCH\fR Use \fISWITCH\fR as the current compiler switch. This is equivalent to setting \fB$OPAMSWITCH\fR to \fISWITCH\fR. .TP 4 \fB\-\-use\-internal\-solver\fR, \fB\-\-no\-aspcud\fR Force use of internal heuristics, even if an external solver is available. .TP 4 \fB\-v\fR, \fB\-\-verbose\fR Be more verbose. Show output of all sub\-commands. This is equivalent to setting \fB$OPAMVERBOSE\fR to "true". .TP 4 \fB\-\-version\fR Show version information. .TP 4 \fB\-y\fR, \fB\-\-yes\fR Disable interactive mode and answer yes to all questions that would otherwise be asked to the user. This is equivalent to setting \fB$OPAMYES\fR to "true". .SH ENVIRONMENT VARIABLES .P OPAM makes use of the environment variables listed here. Boolean variables should be set to "0", "no" of "false" to disable, "1", "yes" or "true" to enable. .P \fIOPAMCOLOR\fR, when set to \fIalways\fR or \fInever\fR, sets a default value for the \-\-color option. .P \fIOPAMCRITERIA\fR specifies user \fIpreferences\fR for dependency solving.The default value is \-count(removed),\-notuptodate(request),\-count(down),\-notuptodate(changed),\-count(changed),\-notuptodate(solution). See also option \-\-criteria .P \fIOPAMCURL\fR can be used to define an alternative for the 'curl' command\-line utility to download files. .P \fIOPAMDEBUG\fR see options `\-\-debug' and `\-\-debug\-level'. .P \fIOPAMEXTERNALSOLVER\fR see option `\-\-solver'. .P \fIOPAMJOBS\fR sets the maximum number of parallel workers to run. .P \fIOPAMNOASPCUD\fR see option `\-\-no\-aspcud'. .P \fIOPAMNOSELFUPGRADE\fR see option `\-\-no\-self\-upgrade'. .P \fIOPAMROOT\fR see option `\-\-root'. This is automatically set by `opam config env \-\-root=DIR' when DIR is non\-default. .P \fIOPAMSOLVERTIMEOUT\fR change the time allowance of the internal solver. .P \fIOPAMSWITCH\fR see option `\-\-switch'. Automatically set by `opam config env \-\-switch=SWITCH'. .P \fIOPAMUPGRADECRITERIA\fR specifies user \fIpreferences\fR for dependency solving when performing an upgrade. Overrides \fIOPAMCRITERIA\fR in upgrades if both are set.The default value is \-count(down),\-count(removed),\-notuptodate(solution),\-count(new). See also option \-\-criteria .P \fIOPAMUTF8MSGS\fR use nice UTF8 characters in OPAM messages. .P \fIOPAMVERBOSE\fR see option `\-\-verbose'. .P \fIOPAMVAR_var\fR overrides the contents of the variable \fIvar\fR when substituting `%{var}%` strings in `opam` files. .P \fIOPAMVAR_package_var\fR overrides the contents of the variable \fIpackage:var\fR when substituting `%{package:var}%` strings in `opam` files. .P \fIOPAMUSEINTERNALSOLVER\fR see option `\-\-use\-internal\-solver'. .P \fIOPAMYES\fR see option `\-\-yes'. .SH FURTHER DOCUMENTATION .P See https://opam.ocaml.org. .SH AUTHORS .P Thomas Gazagnaire .sp -1 .P Anil Madhavapeddy .sp -1 .P Fabrice Le Fessant .sp -1 .P Frederic Tuong .sp -1 .P Louis Gesbert .sp -1 .P Vincent Bernardoff .sp -1 .P Guillem Rieu .sp -1 .P Roberto Di Cosmo .SH BUGS .P Check bug reports at https://github.com/ocaml/opam/issues.