id = "opam"
name = "opam"
homepage = "https://opam.ocaml.org"
description = "A source-based package manager for OCaml."
executables = ["opam"]
[dotfiles]
paths = ["~/.opamrc", "~/.opam/config", "~/.opam/repo/repos-config", "~/.opam/repo/", "~/.opam/opam-init/"]
exclude = [
"~/.opam/download-cache/",
"~/.opam/log/",
"~/.opam/lock",
"~/.opam/*/",
]
secret = []
[commands]
format = 1
label = "opam"
description = "Install packages or list them with opam. Switches, pinning, repositories and removal are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.subcommand]]
path = ["install"]
label = "Install packages"
[[commands.subcommand.source]]
id = "man"
kind = "manual"
url = "https://opam.ocaml.org/doc/man/opam-install.html"
revision = "opam 2.7"
evidence = """
PACKAGES: List of package names, with an optional version or constraint, e.g 'pkg', 'pkg.1.0' or 'pkg>=0.5'
--deps-only: Install all its dependencies, but don't actually install the package.
--dry-run: Simulate the command, but don't actually perform any changes.
--show-actions: Call the solver and display the actions. Don't perform any changes.
-t, --with-test: Build and run the package unit-tests. This only affects packages listed on the command-line.
-d, --with-doc: Build the package documentation. This only affects packages listed on the command-line.
-j JOBS, --jobs=JOBS: Set the maximal number of concurrent jobs to use.
-b, --keep-build-dir: Keep the build directories after compiling packages.
--update-invariant: Allow changes to the packages set as switch base (typically, the main compiler). Use with caution.
--switch=SWITCH: Use SWITCH as the current compiler switch.
-y, --yes: Answer yes to all opam yes/no questions without prompting.
-v --verbose: Be more verbose.
"""
[[commands.subcommand.field]]
id = "packages"
label = "Packages"
description = "Package names, optionally with a version or constraint (pkg, pkg.1.0, pkg>=0.5) or a path to a project directory."
type = "string"
position = 0
multiple = true
sources = ["man"]
[[commands.subcommand.field]]
id = "deps_only"
label = "Dependencies only"
type = "boolean"
option = ["--deps-only"]
sources = ["man"]
[[commands.subcommand.field]]
id = "dry_run"
label = "Dry run"
type = "boolean"
option = ["--dry-run"]
sources = ["man"]
[[commands.subcommand.field]]
id = "show_actions"
label = "Show actions only"
type = "boolean"
option = ["--show-actions"]
sources = ["man"]
[[commands.subcommand.field]]
id = "with_test"
label = "Run tests"
type = "boolean"
option = ["--with-test", "-t"]
sources = ["man"]
[[commands.subcommand.field]]
id = "with_doc"
label = "Build documentation"
type = "boolean"
option = ["--with-doc", "-d"]
sources = ["man"]
[[commands.subcommand.field]]
id = "jobs"
label = "Parallel jobs"
type = "integer"
option = ["--jobs", "-j"]
validation = { min = 1 }
sources = ["man"]
[[commands.subcommand.field]]
id = "keep_build_dir"
label = "Keep build directories"
type = "boolean"
option = ["--keep-build-dir", "-b"]
sources = ["man"]
[[commands.subcommand.field]]
id = "update_invariant"
label = "Allow changing the switch compiler"
description = "Use with caution: lets the solver change the packages set as the switch base."
type = "boolean"
option = ["--update-invariant"]
sources = ["man"]
[[commands.subcommand.field]]
id = "switch"
label = "Switch"
type = "string"
option = ["--switch"]
sources = ["man"]
[[commands.subcommand.field]]
id = "yes"
label = "Answer yes to prompts"
type = "boolean"
option = ["--yes", "-y"]
sources = ["man"]
[[commands.subcommand.field]]
id = "verbose"
label = "Verbose"
type = "boolean"
option = ["--verbose"]
sources = ["man"]
[[commands.subcommand.task]]
id = "install"
label = "Install packages"
fields = ["packages", "jobs", "yes"]
required = ["packages"]
[[commands.subcommand.task]]
id = "preview"
label = "Preview the plan"
fields = ["packages", "show_actions"]
required = ["packages"]
set = { show_actions = [true] }
[[commands.subcommand.task]]
id = "project_deps"
label = "Install project dependencies"
fields = ["packages", "deps_only", "with_test", "with_doc"]
required = ["packages"]
set = { deps_only = [true], packages = ["."] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["packages", "deps_only", "dry_run", "show_actions", "with_test", "with_doc", "jobs", "yes"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["keep_build_dir", "update_invariant", "switch", "verbose"]
[[commands.subcommand]]
path = ["list"]
label = "List packages"
[[commands.subcommand.source]]
id = "man"
kind = "manual"
url = "https://opam.ocaml.org/doc/man/opam-list.html"
revision = "opam 2.7"
evidence = """
PATTERNS: Package patterns with globs. Unless --search is specified, they match against NAME or NAME.VERSION
-a, --available: List only packages that are available on the current system
-A, --all: Include all, even uninstalled or unavailable packages
-i, --installed: List installed packages only. This is the default when no further arguments are supplied
--roots, --installed-roots: List only packages that were explicitly installed, excluding the ones installed as dependencies
--pinned: List only the pinned packages
--latests-only: List only the latest version of each package.
--depends-on=PACKAGES: List only packages that depend on one of (comma-separated) PACKAGES.
--required-by=PACKAGES: List only the dependencies of (comma-separated) PACKAGES.
--recursive: With '--depends-on' and '--required-by', display all transitive dependencies rather than just direct dependencies.
--search: Match PATTERNS against the full descriptions of packages
--columns=COLUMNS: Select the columns to display among: name, version, package, synopsis, synopsis-or-target, description
-s, --short: Don't print a header, and sets the default columns to name only.
-S, --sort: Sort the packages in dependency order
--no-switch: List what is available from the repositories, without consideration for the current (or any other) switch
"""
[[commands.subcommand.field]]
id = "patterns"
label = "Patterns"
description = "Package patterns with globs; matched against NAME or NAME.VERSION."
type = "string"
position = 0
multiple = true
sources = ["man"]
[[commands.subcommand.field]]
id = "available"
label = "Available only"
type = "boolean"
option = ["--available", "-a"]
sources = ["man"]
[[commands.subcommand.field]]
id = "all"
label = "Include uninstalled and unavailable"
type = "boolean"
option = ["--all", "-A"]
sources = ["man"]
[[commands.subcommand.field]]
id = "installed"
label = "Installed only"
type = "boolean"
option = ["--installed", "-i"]
sources = ["man"]
[[commands.subcommand.field]]
id = "roots"
label = "Explicitly installed only"
type = "boolean"
option = ["--roots", "--installed-roots"]
sources = ["man"]
[[commands.subcommand.field]]
id = "pinned"
label = "Pinned only"
type = "boolean"
option = ["--pinned"]
sources = ["man"]
[[commands.subcommand.field]]
id = "latests_only"
label = "Latest version only"
type = "boolean"
option = ["--latests-only"]
sources = ["man"]
[[commands.subcommand.field]]
id = "depends_on"
label = "Depends on"
description = "Comma-separated packages."
type = "string"
option = ["--depends-on"]
sources = ["man"]
[[commands.subcommand.field]]
id = "required_by"
label = "Required by"
description = "Comma-separated packages."
type = "string"
option = ["--required-by"]
sources = ["man"]
[[commands.subcommand.field]]
id = "recursive"
label = "Transitive dependencies"
type = "boolean"
option = ["--recursive"]
sources = ["man"]
[[commands.subcommand.field]]
id = "search"
label = "Search descriptions"
type = "boolean"
option = ["--search"]
sources = ["man"]
[[commands.subcommand.field]]
id = "short"
label = "Names only, no header"
type = "boolean"
option = ["--short", "-s"]
sources = ["man"]
[[commands.subcommand.field]]
id = "no_switch"
label = "Ignore the current switch"
type = "boolean"
option = ["--no-switch"]
sources = ["man"]
[[commands.subcommand.task]]
id = "installed"
label = "List installed packages"
fields = ["installed", "short"]
set = { installed = [true] }
[[commands.subcommand.task]]
id = "search"
label = "Search package descriptions"
fields = ["patterns", "search", "available"]
required = ["patterns"]
set = { search = [true] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["patterns", "installed", "available", "all", "roots", "pinned", "short", "search"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["latests_only", "depends_on", "required_by", "recursive", "no_switch"]