1opam-search(1) Opam Manual opam-search(1)
2
3
4
6 opam-search - An alias for list --search.
7
9 opam search [OPTION]... [PATTERNS]...
10
12 opam search is an alias for opam list --search.
13
14 See opam list --help for details.
15
17 -A, --all
18 Include all, even uninstalled or unavailable packages
19
20 -a, --available
21 List only packages that are available on the current system
22
23 --base
24 List only the immutable base of the current switch (i.e. compiler
25 packages)
26
27 --coinstallable-with=PACKAGES
28 Only list packages that are compatible with all of PACKAGES.
29
30 --conflicts-with=PACKAGES
31 List packages that have declared conflicts with at least one of the
32 given list. This includes conflicts defined from the packages in
33 the list, from the other package, or by a common conflict-class:
34 field.
35
36 --depends-on=PACKAGES
37 List only packages that depend on one of (comma-separated)
38 PACKAGES.
39
40 --depopts
41 Include optional dependencies in dependency requests.
42
43 --dev
44 Include development packages in dependencies.
45
46 --field-match=FIELD:PATTERN
47 Filter packages with a match for PATTERN on the given FIELD
48
49 --has-flag=FLAG
50 Only include packages which have the given flag set. Package flags
51 are one of: light-uninstall verbose plugin compiler conf
52
53 --has-tag=TAG
54 Only includes packages which have the given tag set
55
56 -i, --installed
57 List installed packages only. This is the default when no further
58 arguments are supplied
59
60 --installable
61 List only packages that can be installed on the current switch
62 (this calls the solver and may be more costly; a package depending
63 on an unavailable package may be available, but is never
64 installable)
65
66 --no-switch
67 List what is available from the repositories, without consideration
68 for the current (or any other) switch (installed or pinned
69 packages, etc.)
70
71 --nobuild
72 Exclude build dependencies (they are included by default).
73
74 --or
75 Instead of selecting packages that match all the criteria, select
76 packages that match any of them
77
78 --owns-file=FILE
79 Finds installed packages responsible for installing the given file
80
81 --pinned
82 List only the pinned packages
83
84 --post
85 Include dependencies tagged as post.
86
87 --recursive
88 With `--depends-on' and `--required-by', display all transitive
89 dependencies rather than just direct dependencies.
90
91 --repos=REPOS
92 Include only packages that took their origin from one of the given
93 repositories (unless no-switch is also specified, this excludes
94 pinned packages).
95
96 --required-by=PACKAGES
97 List only the dependencies of (comma-separated) PACKAGES.
98
99 --resolve=PACKAGES
100 Restrict to a solution to install (comma-separated) PACKAGES, i.e.
101 a consistent set of packages including those. This is subtly
102 different from `--required-by --recursive`, which is more
103 predictable and can't fail, but lists all dependencies
104 independently without ensuring consistency. Without `--installed`,
105 the answer is self-contained and independent of the current
106 installation. With `--installed', it's computed from the set of
107 currently installed packages. `--no-switch` further makes the
108 solution independent from the currently pinned packages,
109 architecture, and compiler version. The combination with
110 `--depopts' is not supported.
111
112 --roots, --installed-roots
113 List only packages that were explicitly installed, excluding the
114 ones installed as dependencies
115
116 -t, --with-test, --test
117 Include test-only dependencies.
118
119 --with-doc, --doc
120 Include doc-only dependencies.
121
123 --columns=COLUMNS
124 Select the columns to display among: name, version, package,
125 synopsis, synopsis-or-target, description, <field>:,
126 installed-version, pin, source-hash, opam-file,
127 all-installed-versions, available-versions, all-versions,
128 repository, installed-files, vc-ref, depexts. The default is name
129 when --short is present and name, installed-version,
130 synopsis-or-target otherwise.
131
132 -e, --external, --depexts
133 Instead of displaying the packages, display their external
134 dependencies that are associated with the current system. This
135 excludes other display options. Rather than using this directly,
136 you should probably head for the `depext' plugin, that will use
137 your system package management system to handle the installation of
138 the dependencies. Run `opam depext'.
139
140 --normalise
141 Print the values of opam fields normalised
142
143 -S, --sort
144 Sort the packages in dependency order (i.e. an order in which they
145 could be individually installed.)
146
147 -s, --short
148 Don't print a header, and sets the default columns to name only. If
149 you need package versions included, use --columns=package instead
150
151 --separator=STRING (absent= )
152 Set the column-separator string
153
154 -V, --all-versions
155 Normally, when multiple versions of a package match, only one is
156 shown in the output (the installed one, the pinned-to one, or,
157 failing that, the highest one available or the highest one). This
158 flag disables this behaviour and shows all matching versions. This
159 also changes the default display format to include package versions
160 instead of just package names (including when --short is set). This
161 is automatically turned on when a single non-pattern package name
162 is provided on the command-line.
163
164 --vars=[VAR=STR,...]
165 Define the given variable bindings. Typically useful with
166 --external to override the values for arch, os, os-distribution,
167 os-version, os-family.
168
169 --wrap
170 Wrap long lines, the default being to truncate when displaying on a
171 terminal, or to keep as is otherwise
172
174 PATTERNS
175 Package patterns with globs. Unless --search is specified, they
176 match againsta NAME or NAME.VERSION
177
179 --help[=FMT] (default=auto)
180 Show this help in format FMT. The value FMT must be one of `auto',
181 `pager', `groff' or `plain'. With `auto', the format is `pager` or
182 `plain' whenever the TERM env var is `dumb' or undefined.
183
184 --silent
185 Don't write anything in the output, exit with return code 0 if the
186 list is not empty, 1 otherwise.
187
188 --version
189 Show version information.
190
192 These options are common to all commands.
193
194 --best-effort
195 Don't fail if all requested packages can't be installed: try to
196 install as many as possible. Note that not all external solvers may
197 support this option (recent versions of aspcud or mccs should).
198
199 --color=WHEN
200 Colorize the output. WHEN must be one of `always', `never' or
201 `auto'.
202
203 --criteria=CRITERIA
204 Specify user preferences for dependency solving for this run.
205 Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
206 on the supported language, and the external solvers available, see
207 http://opam.ocaml.org/doc/Specifying_Solver_Preferences.html. A
208 general guide to using solver preferences can be found at
209 http://www.dicosmo.org/Articles/usercriteria.pdf.
210
211 --cudf=FILENAME
212 Debug option: Save the CUDF requests sent to the solver to
213 FILENAME-<n>.cudf.
214
215 --debug
216 Print debug message to stderr. This is equivalent to setting
217 $OPAMDEBUG to "true".
218
219 --debug-level=LEVEL
220 Like --debug, but allows specifying the debug level (--debug sets
221 it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
222
223 --git-version
224 Print the git version of opam, if set (i.e. you are using a
225 development version), and exit.
226
227 --ignore-pin-depends
228 Ignore extra pins required by packages that get pinned, either
229 manually through opam pin or through opam install DIR. This is
230 equivalent to setting IGNOREPINDEPENDS=true.
231
232 --json=FILENAME
233 Save the results of the opam run in a computer-readable file. If
234 the filename contains the character `%', it will be replaced by an
235 index that doesn't overwrite an existing file. Similar to setting
236 the $OPAMJSON variable.
237
238 --no-auto-upgrade
239 When configuring or updating a repository that is written for an
240 earlier opam version (1.2), opam internally converts it to the
241 current format. This disables this behaviour. Note that
242 repositories should define their format version in a 'repo' file at
243 their root, or they will be assumed to be in the older format. It
244 is, in any case, preferable to upgrade the repositories manually
245 using opam admin upgrade [--mirror URL] when possible.
246
247 --no-self-upgrade
248 Opam will replace itself with a newer binary found at OPAMROOT/opam
249 if present. This disables this behaviour.
250
251 -q, --quiet
252 Disables --verbose.
253
254 --root=ROOT
255 Use ROOT as the current root path. This is equivalent to setting
256 $OPAMROOT to ROOT.
257
258 --safe, --readonly
259 Make sure nothing will be automatically updated or rewritten.
260 Useful for calling from completion scripts, for example. Will fail
261 whenever such an operation is needed ; also avoids waiting for
262 locks, skips interactive questions and overrides the $OPAMDEBUG
263 variable.
264
265 --solver=CMD
266 Specify the CUDF solver to use for resolving package installation
267 problems. This is either a predefined solver (this version of opam
268 supports builtin-mccs+lp(), builtin-mccs+glpk, aspcud, mccs,
269 aspcud-old, packup), or a custom command that should contain the
270 variables %{input}%, %{output}%, %{criteria}%, and optionally
271 %{timeout}%.
272
273 --strict
274 Fail whenever an error is found in a package definition or a
275 configuration file. The default is to continue silently if
276 possible.
277
278 --switch=SWITCH
279 Use SWITCH as the current compiler switch. This is equivalent to
280 setting $OPAMSWITCH to SWITCH.
281
282 --use-internal-solver, --no-aspcud
283 Disable any external solver, and use the built-in one (this
284 requires that opam has been compiled with a built-in solver).
285
286 -v, --verbose
287 Be more verbose. One -v shows all package commands, repeat to also
288 display commands called internally (e.g. tar, curl, patch etc.)
289 Repeating n times is equivalent to setting $OPAMVERBOSE to "n".
290
291 -w, --working-dir
292 Whenever updating packages that are bound to a local,
293 version-controlled directory, update to the current working state
294 of their source instead of the last committed state, or the ref
295 they are pointing to. This only affects packages explicitly listed
296 on the command-line.
297
298 -y, --yes
299 Answer yes to all yes/no questions without prompting. This is
300 equivalent to setting $OPAMYES to "true".
301
303 Opam makes use of the environment variables listed here. Boolean
304 variables should be set to "0", "no", "false" or the empty string to
305 disable, "1", "yes" or "true" to enable.
306
307 OPAMCOLOR, when set to always or never, sets a default value for the
308 --color option.
309
310 OPAMCRITERIA specifies user preferences for dependency solving. The
311 default value depends on the solver version, use `config report` to
312 know the current setting. See also option --criteria
313
314 OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
315 for more options.
316
317 OPAMDEBUG see options `--debug' and `--debug-level'.
318
319 OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
320
321 OPAMERRLOGLEN sets the number of log lines printed when a sub-process
322 fails. 0 to print all.
323
324 OPAMEXTERNALSOLVER see option `--solver'.
325
326 OPAMFETCH specifies how to download files: either `wget', `curl' or a
327 custom command where variables %{url}%, %{out}%, %{retry}%,
328 %{compress}% and %{checksum}% will be replaced. Overrides the
329 'download-command' value from the main config file.
330
331 OPAMJOBS sets the maximum number of parallel workers to run.
332
333 OPAMJSON log json output to the given file (use character `%' to index
334 the files)
335
336 OPAMLOCK see option `--lock'.
337
338 OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
339 in an earlier format to the current one, on 'update' or 'init'.
340
341 OPAMKEEPLOGS tells opam to not remove some temporary command logs and
342 some backups. This skips some finalisers and may also help to get more
343 reliable backtraces
344
345 OPAMLOCKRETRIES sets the number of tries after which OPAM gives up
346 acquiring its lock and fails. <= 0 means infinite wait.
347
348 OPAMNO answer no to any question asked.
349
350 OPAMNOASPCUD see option `--no-aspcud'.
351
352 OPAMNOSELFUPGRADE see option `--no-self-upgrade'.
353
354 OPAMPINKINDAUTO sets whether version control systems should be detected
355 when pinning to a local path. Enabled by default since 1.3.0.
356
357 OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
358 available (e.g. for `opam install`).
359
360 OPAMRETRY sets the number of tries before failing downloads.
361
362 OPAMROOT see option `--root'. This is automatically set by `opam env
363 --root=DIR --set-root'.
364
365 OPAMROOTISOK don't complain when running as root.
366
367 OPAMSAFE see option `--safe'
368
369 OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
370 compatibility testing only.
371
372 OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
373 60.0, set to 0 for unlimited. Note that all solvers may not support
374 this option.
375
376 OPAMSTATUSLINE display a dynamic status line showing what's currently
377 going on on the terminal. (one of one of `always', `never' or `auto')
378
379 OPAMSWITCH see option `--switch'. Automatically set by `opam env
380 --switch=SWITCH --set-switch'.
381
382 OPAMUPGRADECRITERIA specifies user preferences for dependency solving
383 when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
384 are set. See also option --criteria
385
386 OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
387
388 OPAMUTF8 use UTF8 characters in output (one of one of `always', `never'
389 or `auto'). By default `auto', which is determined from the locale).
390
391 OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
392 Implies OPAMUTF8. This is set by default on OSX only.
393
394 OPAMVAR_var overrides the contents of the variable var when
395 substituting `%{var}%` strings in `opam` files.
396
397 OPAMVAR_package_var overrides the contents of the variable package:var
398 when substituting `%{package:var}%` strings in `opam` files.
399
400 OPAMVERBOSE see option `--verbose'.
401
402 OPAMYES see option `--yes'.
403
405 As an exception to the following, the `exec' command returns 127 if the
406 command was not found or couldn't be executed, and the command's exit
407 value otherwise.
408
409 0 Success, or true for boolean queries.
410
411 1 False. Returned when a boolean return value is expected, e.g. when
412 running with --check, or for queries like opam lint.
413
414 2 Bad command-line arguments, or command-line arguments pointing to
415 an invalid context (e.g. file not following the expected format).
416
417 5 Not found. You requested something (package, version, repository,
418 etc.) that couldn't be found.
419
420 10 Aborted. The operation required confirmation, which wasn't given.
421
422 15 Could not acquire the locks required for the operation.
423
424 20 There is no solution to the user request. This can be caused by
425 asking to install two incompatible packages, for example.
426
427 30 Error in package definition, or other metadata files. Using
428 --strict raises this error more often.
429
430 31 Package script error. Some package operations were unsuccessful.
431 This may be an error in the packages or an incompatibility with
432 your system. This can be a partial error.
433
434 40 Sync error. Could not fetch some remotes from the network. This can
435 be a partial error.
436
437 50 Configuration error. Opam or system configuration doesn't allow
438 operation, and needs fixing.
439
440 60 Solver failure. The solver failed to return a sound answer. It can
441 be due to a broken external solver, or an error in solver
442 configuration.
443
444 99 Internal error. Something went wrong, likely due to a bug in opam
445 itself.
446
447 130 User interrupt. SIGINT was received, generally due to the user
448 pressing Ctrl-C.
449
451 See https://opam.ocaml.org/doc.
452
454 Vincent Bernardoff <vb@luminar.eu.org>
455 Raja Boujbel <raja.boujbel@ocamlpro.com>
456 Roberto Di Cosmo <roberto@dicosmo.org>
457 Thomas Gazagnaire <thomas@gazagnaire.org>
458 Louis Gesbert <louis.gesbert@ocamlpro.com>
459 Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
460 Anil Madhavapeddy <anil@recoil.org>
461 Guillem Rieu <guillem.rieu@ocamlpro.com>
462 Ralf Treinen <ralf.treinen@pps.jussieu.fr>
463 Frederic Tuong <tuong@users.gforge.inria.fr>
464
466 Check bug reports at https://github.com/ocaml/opam/issues.
467
468
469
470Opam 2.0.1 opam-search(1)