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