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

NAME

6       opam-show - Display information about specific packages.
7

SYNOPSIS

9       opam show [OPTION]… [PACKAGES]…
10

DESCRIPTION

12       This command displays the information block for the selected
13       package(s).
14
15       The information block consists of the name of the package, the
16       installed version if this package is installed in the currently
17       selected compiler, the list of available (installable) versions, and a
18       complete description.
19
20       opam list can be used to display the list of available packages as well
21       as a short description for each.
22
23       Paths to package definition files or to directories containing package
24       definitions can also be specified, in which case the corresponding
25       metadata will be shown.
26

ARGUMENTS

28       PACKAGES
29           List of package names, with an optional version or constraint, e.g
30           `pkg', `pkg.1.0' or `pkg>=0.5' ; or files or directory names
31           containing package description, with explicit directory (e.g.
32           `./foo.opam' or `.')
33

OPTIONS

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

COMMON OPTIONS

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

ENVIRONMENT

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

CLI VERSION

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

EXIT STATUS

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

FURTHER DOCUMENTATION

504       See https://opam.ocaml.org/doc.
505

AUTHORS

507       Vincent Bernardoff <vb@luminar.eu.org>
508       Raja Boujbel <raja.boujbel@ocamlpro.com>
509       Roberto Di Cosmo <roberto@dicosmo.org>
510       Thomas Gazagnaire <thomas@gazagnaire.org>
511       Louis Gesbert <louis.gesbert@ocamlpro.com>
512       Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
513       Anil Madhavapeddy <anil@recoil.org>
514       Guillem Rieu <guillem.rieu@ocamlpro.com>
515       Ralf Treinen <ralf.treinen@pps.jussieu.fr>
516       Frederic Tuong <tuong@users.gforge.inria.fr>
517

BUGS

519       Check bug reports at https://github.com/ocaml/opam/issues.
520
521
522
523Opam 2.1.3                                                        OPAM-SHOW(1)
Impressum