1OPAM-INFO(1)                      Opam Manual                     OPAM-INFO(1)
2
3
4

NAME

6       opam-info - An alias for show.
7

SYNOPSIS

9       opam info [OPTION]... [PACKAGES]...
10

DESCRIPTION

12       opam info is an alias for opam show.
13
14       See opam show --help for details.
15

ARGUMENTS

17       PACKAGES
18           List of package names, with an optional version or constraint, e.g
19           `pkg', `pkg.1.0' or `pkg>=0.5' ; or files or directory names
20           containing package description, with explicit directory (e.g.
21           `./foo.opam' or `.')
22

OPTIONS

24       --all-versions
25           Display information of all packages matching PACKAGES, not
26           restrained to a single package matching PACKAGES constraints.
27
28       --empty-fields
29           Show fields that are empty. This is implied when --field is given.
30
31       -f FIELDS, --field=FIELDS
32           Only display the values of these fields. Fields can be selected
33           among name, version, package, synopsis, synopsis-or-target,
34           description, <field>, <field>:, installed-version, pin,
35           source-hash, opam-file, all-installed-versions, available-versions,
36           all-versions, repository, installed-files, vc-ref, depexts.
37           Multiple fields can be separated with commas, in which case field
38           titles will be printed; the raw value of any opam-file field can be
39           queried by combinig with --raw
40
41       --file=FILE (absent=-)
42           Removed in 2.1, use --just-file instead.
43
44       --just-file
45           Load and display information from the given files (allowed PACKAGES
46           are file or directory paths), without consideration for the
47           repositories or state of the package. This implies --raw unless
48           --fields is used. Only raw opam-file fields can be queried. If no
49           PACKAGES argument is given, read opam file from stdin.
50
51       --list-files
52           List the files installed by the package. Equivalent to
53           --field=installed-files, and only available for installed packages
54
55       --no
56           Answer no to all opam yes/no questions without prompting. See also
57           --confirm-level. This is equivalent to setting $OPAMNO to "true".
58
59       --no-lint
60           Don't output linting warnings or errors when reading from files
61
62       --normalise
63           Print the values of opam fields normalised (no newlines, no
64           implicit brackets)
65
66       --raw
67           Print the raw opam file for this package
68
69       --sort
70           Sort opam fields
71
72       --where
73           Print the location of the opam file used for this package
74
75       -y, --yes
76           Answer yes to all opam yes/no questions without prompting. See also
77           --confirm-level. This is equivalent to setting $OPAMYES to "true".
78

COMMON OPTIONS

80       These options are common to all commands.
81
82       --best-effort
83           Don't fail if all requested packages can't be installed: try to
84           install as many as possible. Note that not all external solvers may
85           support this option (recent versions of aspcud or mccs should).
86           This is equivalent to setting $OPAMBESTEFFORT environment variable.
87
88       --cli=MAJOR.MINOR (absent=2.1)
89           Use the command-line interface syntax and semantics of MAJOR.MINOR.
90           Intended for any persistent use of opam (scripts, blog posts,
91           etc.), any version of opam in the same MAJOR series will behave as
92           for the specified MINOR release. The flag was not available in opam
93           2.0, so to select the 2.0 CLI, set the OPAMCLI environment variable
94           to 2.0 instead of using this parameter.
95
96       --color=WHEN
97           Colorize the output. WHEN must be one of `always', `never' or
98           `auto'.
99
100       --confirm-level=LEVEL
101           Confirmation level, LEVEL must be one of `ask', `no', `yes' or
102           `unsafe-yes'. Can be specified more than once. If --yes or --no are
103           also given, the value of the last --confirm-level is taken into
104           account. This is equivalent to setting  $OPAMCONFIRMLEVEL`.
105
106       --criteria=CRITERIA
107           Specify user preferences for dependency solving for this run.
108           Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
109           on the supported language, and the external solvers available, see
110           http://opam.ocaml.org/doc/External_solvers.html. A general guide to
111           using solver preferences can be found at
112           http://www.dicosmo.org/Articles/usercriteria.pdf.
113
114       --cudf=FILENAME
115           Debug option: Save the CUDF requests sent to the solver to
116           FILENAME-<n>.cudf.
117
118       --debug
119           Print debug message to stderr. This is equivalent to setting
120           $OPAMDEBUG to "true".
121
122       --debug-level=LEVEL
123           Like --debug, but allows specifying the debug level (--debug sets
124           it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
125
126       --git-version
127           Print the git version of opam, if set (i.e. you are using a
128           development version), and exit.
129
130       --help[=FMT] (default=auto)
131           Show this help in format FMT. The value FMT must be one of `auto',
132           `pager', `groff' or `plain'. With `auto', the format is `pager` or
133           `plain' whenever the TERM env var is `dumb' or undefined.
134
135       --ignore-pin-depends
136           Ignore extra pins required by packages that get pinned, either
137           manually through opam pin or through opam install DIR. This is
138           equivalent to setting IGNOREPINDEPENDS=true.
139
140       --json=FILENAME
141           Save the results of the opam run in a computer-readable file. If
142           the filename contains the character `%', it will be replaced by an
143           index that doesn't overwrite an existing file. Similar to setting
144           the $OPAMJSON variable.
145
146       --no-aspcud
147           Removed in 2.1.
148
149       --no-auto-upgrade
150           When configuring or updating a repository that is written for an
151           earlier opam version (1.2), opam internally converts it to the
152           current format. This disables this behaviour. Note that
153           repositories should define their format version in a 'repo' file at
154           their root, or they will be assumed to be in the older format. It
155           is, in any case, preferable to upgrade the repositories manually
156           using opam admin upgrade [--mirror URL] when possible.
157
158       --no-self-upgrade
159           Opam will replace itself with a newer binary found at OPAMROOT/opam
160           if present. This disables this behaviour.
161
162       -q, --quiet
163           Disables --verbose.
164
165       --root=ROOT
166           Use ROOT as the current root path. This is equivalent to setting
167           $OPAMROOT to ROOT.
168
169       --safe, --readonly
170           Make sure nothing will be automatically updated or rewritten.
171           Useful for calling from completion scripts, for example. Will fail
172           whenever such an operation is needed ; also avoids waiting for
173           locks, skips interactive questions and overrides the $OPAMDEBUG
174           variable. This is equivalent to set environment variable $OPAMSAFE.
175
176       --solver=CMD
177           Specify the CUDF solver to use for resolving package installation
178           problems. This is either a predefined solver (this version of opam
179           supports builtin-mccs+lp(), builtin-mccs+glpk,
180           builtin-dummy-z3-solver, builtin-dummy-0install-solver, aspcud,
181           mccs, aspcud-old, packup), or a custom command that should contain
182           the variables %{input}%, %{output}%, %{criteria}%, and optionally
183           %{timeout}%. This is equivalent to setting $OPAMEXTERNALSOLVER.
184
185       --strict
186           Fail whenever an error is found in a package definition or a
187           configuration file. The default is to continue silently if
188           possible.
189
190       --switch=SWITCH
191           Use SWITCH as the current compiler switch. This is equivalent to
192           setting $OPAMSWITCH to SWITCH.
193
194       --use-internal-solver
195           Disable any external solver, and use the built-in one (this
196           requires that opam has been compiled with a built-in solver). This
197           is equivalent to setting $OPAMNOASPCUD or $OPAMUSEINTERNALSOLVER.
198
199       -v, --verbose
200           Be more verbose. One -v shows all package commands, repeat to also
201           display commands called internally (e.g. tar, curl, patch etc.)
202           Repeating n times is equivalent to setting $OPAMVERBOSE to "n".
203
204       --version
205           Show version information.
206
207       -w, --working-dir
208           Whenever updating packages that are bound to a local,
209           version-controlled directory, update to the current working state
210           of their source instead of the last committed state, or the ref
211           they are pointing to. As source directory is copied as it is, if it
212           isn't clean it may result on a opam build failure.This only affects
213           packages explicitly listed on the command-line.It can also be set
214           with $OPAMWORKINGDIR.
215

ENVIRONMENT

217       Opam makes use of the environment variables listed here. Boolean
218       variables should be set to "0", "no", "false" or the empty string to
219       disable, "1", "yes" or "true" to enable.
220
221       OPAMALLPARENS surround all filters with parenthesis.
222
223       OPAMASSUMEDEPEXTS see option `--assume-depexts'.
224
225       OPAMAUTOREMOVE see remove option `--auto-remove'.
226
227       OPAMBESTEFFORT see option `--best-effort'.
228
229       OPAMBESTEFFORTPREFIXCRITERIA sets the string that must be prepended to
230       the criteria when the `--best-effort' option is set, and is expected to
231       maximise the `opam-query' property in the solution.
232
233       OPAMBUILDDOC Removed in 2.1.
234
235       OPAMBUILDTEST Removed in 2.1.
236
237       OPAMCLI see option `--cli'.
238
239       OPAMCOLOR when set to always or never, sets a default value for the
240       `--color' option.
241
242       OPAMCONFIRMLEVEL see option `--confirm-level`. OPAMCONFIRMLEVEL has
243       priority over OPAMYES and OPAMNO.
244
245       OPAMCRITERIA specifies user preferences for dependency solving. The
246       default value depends on the solver version, use `config report' to
247       know the current setting. See also option --criteria.
248
249       OPAMCUDFFILE save the cudf graph to file-actions-explicit.dot.
250
251       OPAMCUDFTRIM controls the filtering of unrelated packages during CUDF
252       preprocessing.
253
254       OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
255       for more options.
256
257       OPAMDEBUG see options `--debug' and `--debug-level'.
258
259       OPAMDEBUGSECTIONS if set, limits debug messages to the space-separated
260       list of sections. Sections can optionally have a specific debug level
261       (for example, CLIENT:2 or CLIENT CUDF:2), but otherwise use
262       `--debug-level'.
263
264       OPAMDIGDEPTH defines how aggressive the lookup for conflicts during
265       CUDF preprocessing is.
266
267       OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
268
269       OPAMDROPWORKINGDIR overrides packages previously updated with
270       --working-dir on update. Without this variable set, opam would keep
271       them unchanged unless explicitly named on the command-line.
272
273       OPAMDRYRUN see option `--dry-run'.
274
275       OPAMEDITOR sets the editor to use for opam file editing, overrides
276       $EDITOR and $VISUAL.
277
278       OPAMERRLOGLEN sets the number of log lines printed when a sub-process
279       fails. 0 to print all.
280
281       OPAMEXTERNALSOLVER see option `--solver'.
282
283       OPAMFAKE see option `--fake'.
284
285       OPAMFETCH specifies how to download files: either `wget', `curl' or a
286       custom command where variables %{url}%, %{out}%, %{retry}%,
287       %{compress}% and %{checksum}% will be replaced. Overrides the
288       'download-command' value from the main config file.
289
290       OPAMFIXUPCRITERIA same as OPAMUPGRADECRITERIA, but specific to fixup.
291
292       OPAMIGNORECONSTRAINTS see install option `--ignore-constraints-on'.
293
294       OPAMIGNOREPINDEPENDS see option `--ignore-pin-depends'.
295
296       OPAMINPLACEBUILD see option `--inplace-build'.
297
298       OPAMJOBS sets the maximum number of parallel workers to run.
299
300       OPAMJSON log json output to the given file (use character `%' to index
301       the files).
302
303       OPAMKEEPBUILDDIR see install option `--keep-build-dir'.
304
305       OPAMKEEPLOGS tells opam to not remove some temporary command logs and
306       some backups. This skips some finalisers and may also help to get more
307       reliable backtraces.
308
309       OPAMLOCKED combination of `--locked' and `--lock-suffix' options.
310
311       OPAMLOGS logdir sets log directory, default is a temporary directory in
312       /tmp
313
314       OPAMMAKECMD set the system make command to use.
315
316       OPAMMERGEOUT merge process outputs, stderr on stdout.
317
318       OPAMNO answer no to any question asked, see options `--no` and
319       `--confirm-level`. OPAMNO is ignored if either OPAMCONFIRMLEVEL or
320       OPAMYES is set.
321
322       OPAMNOAGGREGATE with `opam admin check', don't aggregate packages.
323
324       OPAMNOASPCUD Deprecated.
325
326       OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
327       in an earlier format to the current one, on 'update' or 'init'.
328
329       OPAMNOCHECKSUMS enables option --no-checksums when available.
330
331       OPAMNODEPEXTS disables system dependencies handling, see option
332       `--no-depexts'.
333
334       OPAMNOENVNOTICE Internal.
335
336       OPAMNOSELFUPGRADE see option `--no-self-upgrade'
337
338       OPAMPINKINDAUTO sets whether version control systems should be detected
339       when pinning to a local path. Enabled by default since 1.3.0.
340
341       OPAMPRECISETRACKING fine grain tracking of directories.
342
343       OPAMPREPRO set this to false to disable CUDF preprocessing. Less
344       efficient, but might help debugging solver issue.
345
346       OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
347       available (e.g. for `opam install').
348
349       OPAMRETRIES sets the number of tries before failing downloads.
350
351       OPAMREUSEBUILDDIR see option `--reuse-build-dir'.
352
353       OPAMROOT see option `--root'. This is automatically set by `opam env
354       --root=DIR --set-root'.
355
356       OPAMROOTISOK don't complain when running as root.
357
358       OPAMSAFE see option `--safe'.
359
360       OPAMSHOW see option `--show'.
361
362       OPAMSKIPUPDATE see option `--skip-updates'.
363
364       OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
365       compatibility testing only.
366
367       OPAMSOLVERALLOWSUBOPTIMAL (default `true') allows some solvers to still
368       return a solution when they reach timeout; while the solution remains
369       assured to be consistent, there is no guarantee in this case that it
370       fits the expected optimisation criteria. If `true', opam willcontinue
371       with a warning, if `false' a timeout is an error. Currently only the
372       builtin-z3 backend handles this degraded case.
373
374       OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
375       60.0, set to 0 for unlimited. Note that all solvers may not support
376       this option.
377
378       OPAMSTATS display stats at the end of command.
379
380       OPAMSTATUSLINE display a dynamic status line showing what's currently
381       going on on the terminal. (one of one of `always', `never' or `auto')
382
383       OPAMSTRICT fail on inconsistencies (file reading, switch import, etc.).
384
385       OPAMSWITCH see option `--switch'. Automatically set by `opam env
386       --switch=SWITCH --set-switch'.
387
388       OPAMUNLOCKBASE see install option `--unlock-base'.
389
390       OPAMUPGRADECRITERIA specifies user preferences for dependency solving
391       when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
392       are set. See also option --criteria.
393
394       OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
395
396       OPAMUSEOPENSSL force openssl use for hash computing.
397
398       OPAMUTF8 use UTF8 characters in output (one of one of `always', `never'
399       or `auto'). By default `auto', which is determined from the locale).
400
401       OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
402       Implies OPAMUTF8. This is set by default on OSX only.
403
404       OPAMVALIDATIONHOOK if set, uses the `%{hook%}' command to validate an
405       opam repository update.
406
407       OPAMVERBOSE see option `--verbose'.
408
409       OPAMVERSIONLAGPOWER do not use.
410
411       OPAMWITHDOC see install option `--with-doc'.
412
413       OPAMWITHTEST see install option `--with-test.
414
415       OPAMWORKINGDIR see option `--working-dir'.
416
417       OPAMYES see options `--yes' and `--confirm-level`. OPAMYES has has
418       priority over OPAMNO and is ignored if OPAMCONFIRMLEVEL is set.
419
420       OPAMVAR_var overrides the contents of the variable var when
421       substituting `%{var}%` strings in `opam` files.
422
423       OPAMVAR_package_var overrides the contents of the variable package:var
424       when substituting `%{package:var}%` strings in `opam` files.
425

CLI VERSION

427       All scripts and programmatic invocations of opam should use `--cli' in
428       order to ensure that they work seamlessly with future versions of the
429       opam client. Additionally, blog posts or other documentation can
430       benefit, as it prevents information from becoming stale.
431
432       Although opam only supports roots (~/.opam/) for the current version,
433       it does provide backwards compatibility for its command-line interface.
434
435       Since CLI version support was only added in opam 2.1, use OPAMCLI to
436       select 2.0 support (as opam 2.0 will just ignore it), and `--cli=2.1'
437       for 2.1 (or later) versions, since an environment variable controlling
438       the parsing of syntax is brittle. To this end, opam displays a warning
439       if OPAMCLI specifies a valid version other than 2.0, and also if
440       `--cli=2.0' is specified.
441
442       The command-line version is selected by using the `--cli' option or the
443       OPAMCLI environment variable. `--cli' may be specified morethan once,
444       where the last instance takes precedence. OPAMCLI is only inspected if
445       `--cli' is not given.
446

EXIT STATUS

448       As an exception to the following, the `exec' command returns 127 if the
449       command was not found or couldn't be executed, and the command's exit
450       value otherwise.
451
452       0   Success, or true for boolean queries.
453
454       1   False. Returned when a boolean return value is expected, e.g. when
455           running with --check, or for queries like opam lint.
456
457       2   Bad command-line arguments, or command-line arguments pointing to
458           an invalid context (e.g. file not following the expected format).
459
460       5   Not found. You requested something (package, version, repository,
461           etc.) that couldn't be found.
462
463       10  Aborted. The operation required confirmation, which wasn't given.
464
465       15  Could not acquire the locks required for the operation.
466
467       20  There is no solution to the user request. This can be caused by
468           asking to install two incompatible packages, for example.
469
470       30  Error in package definition, or other metadata files. Using
471           --strict raises this error more often.
472
473       31  Package script error. Some package operations were unsuccessful.
474           This may be an error in the packages or an incompatibility with
475           your system. This can be a partial error.
476
477       40  Sync error. Could not fetch some remotes from the network. This can
478           be a partial error.
479
480       50  Configuration error. Opam or system configuration doesn't allow
481           operation, and needs fixing.
482
483       60  Solver failure. The solver failed to return a sound answer. It can
484           be due to a broken external solver, or an error in solver
485           configuration.
486
487       99  Internal error. Something went wrong, likely due to a bug in opam
488           itself.
489
490       130 User interrupt. SIGINT was received, generally due to the user
491           pressing Ctrl-C.
492

FURTHER DOCUMENTATION

494       See https://opam.ocaml.org/doc.
495

AUTHORS

497       Vincent Bernardoff <vb@luminar.eu.org>
498       Raja Boujbel <raja.boujbel@ocamlpro.com>
499       Roberto Di Cosmo <roberto@dicosmo.org>
500       Thomas Gazagnaire <thomas@gazagnaire.org>
501       Louis Gesbert <louis.gesbert@ocamlpro.com>
502       Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
503       Anil Madhavapeddy <anil@recoil.org>
504       Guillem Rieu <guillem.rieu@ocamlpro.com>
505       Ralf Treinen <ralf.treinen@pps.jussieu.fr>
506       Frederic Tuong <tuong@users.gforge.inria.fr>
507

BUGS

509       Check bug reports at https://github.com/ocaml/opam/issues.
510
511
512
513Opam 2.1.2                                                        OPAM-INFO(1)
Impressum