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

ENVIRONMENT

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

CLI VERSION

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

EXIT STATUS

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

FURTHER DOCUMENTATION

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

AUTHORS

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

BUGS

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