1OPAM-INFO(1) Opam Manual OPAM-INFO(1)
2
3
4
6 opam-info - An alias for show.
7
9 opam info [OPTION]… [PACKAGES]…
10
12 opam info is an alias for opam show.
13
14 See opam show --help for details.
15
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
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
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 auto.
98
99 --confirm-level=LEVEL
100 Confirmation level, LEVEL must be one of ask, no, yes or
101 unsafe-yes. Can be specified more than once. If --yes or --no are
102 also given, the value of the last --confirm-level is taken into
103 account. This is equivalent to setting $OPAMCONFIRMLEVEL`.
104
105 --criteria=CRITERIA
106 Specify user preferences for dependency solving for this run.
107 Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
108 on the supported language, and the external solvers available, see
109 http://opam.ocaml.org/doc/External_solvers.html. A general guide to
110 using solver preferences can be found at
111 http://www.dicosmo.org/Articles/usercriteria.pdf.
112
113 --cudf=FILENAME
114 Debug option: Save the CUDF requests sent to the solver to
115 FILENAME-<n>.cudf.
116
117 --debug
118 Print debug message to stderr. This is equivalent to setting
119 $OPAMDEBUG to "true".
120
121 --debug-level=LEVEL
122 Like --debug, but allows specifying the debug level (--debug sets
123 it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
124
125 --git-version
126 Print the git version of opam, if set (i.e. you are using a
127 development version), and exit.
128
129 --help[=FMT] (default=auto)
130 Show this help in format FMT. The value FMT must be one of auto,
131 pager, groff or plain. With auto, the format is pager or plain
132 whenever the TERM env var is dumb or undefined.
133
134 --ignore-pin-depends
135 Ignore extra pins required by packages that get pinned, either
136 manually through opam pin or through opam install DIR. This is
137 equivalent to setting IGNOREPINDEPENDS=true.
138
139 --json=FILENAME
140 Save the results of the opam run in a computer-readable file. If
141 the filename contains the character `%', it will be replaced by an
142 index that doesn't overwrite an existing file. Similar to setting
143 the $OPAMJSON variable.
144
145 --no-aspcud
146 Removed in 2.1.
147
148 --no-auto-upgrade
149 When configuring or updating a repository that is written for an
150 earlier opam version (1.2), opam internally converts it to the
151 current format. This disables this behaviour. Note that
152 repositories should define their format version in a 'repo' file at
153 their root, or they will be assumed to be in the older format. It
154 is, in any case, preferable to upgrade the repositories manually
155 using opam admin upgrade [--mirror URL] when possible.
156
157 --no-self-upgrade
158 Opam will replace itself with a newer binary found at OPAMROOT/opam
159 if present. This disables this behaviour.
160
161 -q, --quiet
162 Disables --verbose.
163
164 --root=ROOT
165 Use ROOT as the current root path. This is equivalent to setting
166 $OPAMROOT to ROOT.
167
168 --safe, --readonly
169 Make sure nothing will be automatically updated or rewritten.
170 Useful for calling from completion scripts, for example. Will fail
171 whenever such an operation is needed ; also avoids waiting for
172 locks, skips interactive questions and overrides the $OPAMDEBUG
173 variable. This is equivalent to set environment variable $OPAMSAFE.
174
175 --solver=CMD
176 Specify the CUDF solver to use for resolving package installation
177 problems. This is either a predefined solver (this version of opam
178 supports builtin-mccs+lp(), builtin-mccs+glpk,
179 builtin-dummy-z3-solver, builtin-dummy-0install-solver, aspcud,
180 mccs, aspcud-old, packup), or a custom command that should contain
181 the variables %{input}%, %{output}%, %{criteria}%, and optionally
182 %{timeout}%. This is equivalent to setting $OPAMEXTERNALSOLVER.
183
184 --strict
185 Fail whenever an error is found in a package definition or a
186 configuration file. The default is to continue silently if
187 possible.
188
189 --switch=SWITCH
190 Use SWITCH as the current compiler switch. This is equivalent to
191 setting $OPAMSWITCH to SWITCH.
192
193 --use-internal-solver
194 Disable any external solver, and use the built-in one (this
195 requires that opam has been compiled with a built-in solver). This
196 is equivalent to setting $OPAMNOASPCUD or $OPAMUSEINTERNALSOLVER.
197
198 -v, --verbose
199 Be more verbose. One -v shows all package commands, repeat to also
200 display commands called internally (e.g. tar, curl, patch etc.)
201 Repeating n times is equivalent to setting $OPAMVERBOSE to "n".
202
203 --version
204 Show version information.
205
206 -w, --working-dir
207 Whenever updating packages that are bound to a local,
208 version-controlled directory, update to the current working state
209 of their source instead of the last committed state, or the ref
210 they are pointing to. As source directory is copied as it is, if it
211 isn't clean it may result on a opam build failure.This only affects
212 packages explicitly listed on the command-line.It can also be set
213 with $OPAMWORKINGDIR.
214
216 Opam makes use of the environment variables listed here. Boolean
217 variables should be set to "0", "no", "false" or the empty string to
218 disable, "1", "yes" or "true" to enable.
219
220 OPAMALLPARENS surround all filters with parenthesis.
221
222 OPAMASSUMEDEPEXTS see option `--assume-depexts'.
223
224 OPAMAUTOREMOVE see remove option `--auto-remove'.
225
226 OPAMBESTEFFORT see option `--best-effort'.
227
228 OPAMBESTEFFORTPREFIXCRITERIA sets the string that must be prepended to
229 the criteria when the `--best-effort' option is set, and is expected to
230 maximise the `opam-query' property in the solution.
231
232 OPAMBUILDDOC Removed in 2.1.
233
234 OPAMBUILDTEST Removed in 2.1.
235
236 OPAMCLI see option `--cli'.
237
238 OPAMCOLOR when set to always or never, sets a default value for the
239 `--color' option.
240
241 OPAMCONFIRMLEVEL see option `--confirm-level`. OPAMCONFIRMLEVEL has
242 priority over OPAMYES and OPAMNO.
243
244 OPAMCRITERIA specifies user preferences for dependency solving. The
245 default value depends on the solver version, use `config report' to
246 know the current setting. See also option --criteria.
247
248 OPAMCUDFFILE save the cudf graph to file-actions-explicit.dot.
249
250 OPAMCUDFTRIM controls the filtering of unrelated packages during CUDF
251 preprocessing.
252
253 OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
254 for more options.
255
256 OPAMDEBUG see options `--debug' and `--debug-level'.
257
258 OPAMDEBUGSECTIONS if set, limits debug messages to the space-separated
259 list of sections. Sections can optionally have a specific debug level
260 (for example, CLIENT:2 or CLIENT CUDF:2), but otherwise use
261 `--debug-level'.
262
263 OPAMDIGDEPTH defines how aggressive the lookup for conflicts during
264 CUDF preprocessing is.
265
266 OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
267
268 OPAMDROPWORKINGDIR overrides packages previously updated with
269 --working-dir on update. Without this variable set, opam would keep
270 them unchanged unless explicitly named on the command-line.
271
272 OPAMDRYRUN see option `--dry-run'.
273
274 OPAMEDITOR sets the editor to use for opam file editing, overrides
275 $EDITOR and $VISUAL.
276
277 OPAMERRLOGLEN sets the number of log lines printed when a sub-process
278 fails. 0 to print all.
279
280 OPAMEXTERNALSOLVER see option `--solver'.
281
282 OPAMFAKE see option `--fake'.
283
284 OPAMFETCH specifies how to download files: either `wget', `curl' or a
285 custom command where variables %{url}%, %{out}%, %{retry}%,
286 %{compress}% and %{checksum}% will be replaced. Overrides the
287 'download-command' value from the main config file.
288
289 OPAMFIXUPCRITERIA same as OPAMUPGRADECRITERIA, but specific to fixup.
290
291 OPAMIGNORECONSTRAINTS see install option `--ignore-constraints-on'.
292
293 OPAMIGNOREPINDEPENDS see option `--ignore-pin-depends'.
294
295 OPAMINPLACEBUILD see option `--inplace-build'.
296
297 OPAMJOBS sets the maximum number of parallel workers to run.
298
299 OPAMJSON log json output to the given file (use character `%' to index
300 the files).
301
302 OPAMKEEPBUILDDIR see install option `--keep-build-dir'.
303
304 OPAMKEEPLOGS tells opam to not remove some temporary command logs and
305 some backups. This skips some finalisers and may also help to get more
306 reliable backtraces.
307
308 OPAMLOCKED combination of `--locked' and `--lock-suffix' options.
309
310 OPAMLOGS logdir sets log directory, default is a temporary directory in
311 /tmp
312
313 OPAMMAKECMD set the system make command to use.
314
315 OPAMMERGEOUT merge process outputs, stderr on stdout.
316
317 OPAMNO answer no to any question asked, see options `--no` and
318 `--confirm-level`. OPAMNO is ignored if either OPAMCONFIRMLEVEL or
319 OPAMYES is set.
320
321 OPAMNOAGGREGATE with `opam admin check', don't aggregate packages.
322
323 OPAMNOASPCUD Deprecated.
324
325 OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
326 in an earlier format to the current one, on 'update' or 'init'.
327
328 OPAMNOCHECKSUMS enables option --no-checksums when available.
329
330 OPAMNODEPEXTS disables system dependencies handling, see option
331 `--no-depexts'.
332
333 OPAMNOENVNOTICE Internal.
334
335 OPAMNOSELFUPGRADE see option `--no-self-upgrade'
336
337 OPAMPINKINDAUTO sets whether version control systems should be detected
338 when pinning to a local path. Enabled by default since 1.3.0.
339
340 OPAMPRECISETRACKING fine grain tracking of directories.
341
342 OPAMPREPRO set this to false to disable CUDF preprocessing. Less
343 efficient, but might help debugging solver issue.
344
345 OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
346 available (e.g. for `opam install').
347
348 OPAMRETRIES sets the number of tries before failing downloads.
349
350 OPAMREUSEBUILDDIR see option `--reuse-build-dir'.
351
352 OPAMROOT see option `--root'. This is automatically set by `opam env
353 --root=DIR --set-root'.
354
355 OPAMROOTISOK don't complain when running as root.
356
357 OPAMSAFE see option `--safe'.
358
359 OPAMSHOW see option `--show'.
360
361 OPAMSKIPUPDATE see option `--skip-updates'.
362
363 OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
364 compatibility testing only.
365
366 OPAMSOLVERALLOWSUBOPTIMAL (default `true') allows some solvers to still
367 return a solution when they reach timeout; while the solution remains
368 assured to be consistent, there is no guarantee in this case that it
369 fits the expected optimisation criteria. If `true', opam willcontinue
370 with a warning, if `false' a timeout is an error. Currently only the
371 builtin-z3 backend handles this degraded case.
372
373 OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
374 60.0, set to 0 for unlimited. Note that all solvers may not support
375 this option.
376
377 OPAMSTATS display stats at the end of command.
378
379 OPAMSTATUSLINE display a dynamic status line showing what's currently
380 going on on the terminal. (one of one of always, never or auto)
381
382 OPAMSTRICT fail on inconsistencies (file reading, switch import, etc.).
383
384 OPAMSWITCH see option `--switch'. Automatically set by `opam env
385 --switch=SWITCH --set-switch'.
386
387 OPAMUNLOCKBASE see install option `--unlock-base'.
388
389 OPAMUPGRADECRITERIA specifies user preferences for dependency solving
390 when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
391 are set. See also option --criteria.
392
393 OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
394
395 OPAMUSEOPENSSL force openssl use for hash computing.
396
397 OPAMUTF8 use UTF8 characters in output (one of one of always, never or
398 auto). By default `auto', which is determined from the locale).
399
400 OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
401 Implies OPAMUTF8. This is set by default on OSX only.
402
403 OPAMVALIDATIONHOOK if set, uses the `%{hook%}' command to validate an
404 opam repository update.
405
406 OPAMVERBOSE see option `--verbose'.
407
408 OPAMVERSIONLAGPOWER do not use.
409
410 OPAMWITHDOC see install option `--with-doc'.
411
412 OPAMWITHTEST see install option `--with-test.
413
414 OPAMWORKINGDIR see option `--working-dir'.
415
416 OPAMYES see options `--yes' and `--confirm-level`. OPAMYES has has
417 priority over OPAMNO and is ignored if OPAMCONFIRMLEVEL is set.
418
419 OPAMVAR_var overrides the contents of the variable var when
420 substituting `%{var}%` strings in `opam` files.
421
422 OPAMVAR_package_var overrides the contents of the variable package:var
423 when substituting `%{package:var}%` strings in `opam` files.
424
426 All scripts and programmatic invocations of opam should use `--cli' in
427 order to ensure that they work seamlessly with future versions of the
428 opam client. Additionally, blog posts or other documentation can
429 benefit, as it prevents information from becoming stale.
430
431 Although opam only supports roots (~/.opam/) for the current version,
432 it does provide backwards compatibility for its command-line interface.
433
434 Since CLI version support was only added in opam 2.1, use OPAMCLI to
435 select 2.0 support (as opam 2.0 will just ignore it), and `--cli=2.1'
436 for 2.1 (or later) versions, since an environment variable controlling
437 the parsing of syntax is brittle. To this end, opam displays a warning
438 if OPAMCLI specifies a valid version other than 2.0, and also if
439 `--cli=2.0' is specified.
440
441 The command-line version is selected by using the `--cli' option or the
442 OPAMCLI environment variable. `--cli' may be specified morethan once,
443 where the last instance takes precedence. OPAMCLI is only inspected if
444 `--cli' is not given.
445
447 As an exception to the following, the `exec' command returns 127 if the
448 command was not found or couldn't be executed, and the command's exit
449 value otherwise.
450
451 0 Success, or true for boolean queries.
452
453 1 False. Returned when a boolean return value is expected, e.g. when
454 running with --check, or for queries like opam lint.
455
456 2 Bad command-line arguments, or command-line arguments pointing to
457 an invalid context (e.g. file not following the expected format).
458
459 5 Not found. You requested something (package, version, repository,
460 etc.) that couldn't be found.
461
462 10 Aborted. The operation required confirmation, which wasn't given.
463
464 15 Could not acquire the locks required for the operation.
465
466 20 There is no solution to the user request. This can be caused by
467 asking to install two incompatible packages, for example.
468
469 30 Error in package definition, or other metadata files. Using
470 --strict raises this error more often.
471
472 31 Package script error. Some package operations were unsuccessful.
473 This may be an error in the packages or an incompatibility with
474 your system. This can be a partial error.
475
476 40 Sync error. Could not fetch some remotes from the network. This can
477 be a partial error.
478
479 50 Configuration error. Opam or system configuration doesn't allow
480 operation, and needs fixing.
481
482 60 Solver failure. The solver failed to return a sound answer. It can
483 be due to a broken external solver, or an error in solver
484 configuration.
485
486 99 Internal error. Something went wrong, likely due to a bug in opam
487 itself.
488
489 130 User interrupt. SIGINT was received, generally due to the user
490 pressing Ctrl-C.
491
493 See https://opam.ocaml.org/doc.
494
496 Vincent Bernardoff <vb@luminar.eu.org>
497 Raja Boujbel <raja.boujbel@ocamlpro.com>
498 Roberto Di Cosmo <roberto@dicosmo.org>
499 Thomas Gazagnaire <thomas@gazagnaire.org>
500 Louis Gesbert <louis.gesbert@ocamlpro.com>
501 Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
502 Anil Madhavapeddy <anil@recoil.org>
503 Guillem Rieu <guillem.rieu@ocamlpro.com>
504 Ralf Treinen <ralf.treinen@pps.jussieu.fr>
505 Frederic Tuong <tuong@users.gforge.inria.fr>
506
508 Check bug reports at https://github.com/ocaml/opam/issues.
509
510
511
512Opam 2.1.5 OPAM-INFO(1)