{
  "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
    },
    "subcommand": [
      {
        "path": [
          "install"
        ],
        "label": "Install packages",
        "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'\n--deps-only: Install all its dependencies, but don't actually install the package.\n--dry-run: Simulate the command, but don't actually perform any changes.\n--show-actions: Call the solver and display the actions. Don't perform any changes.\n-t, --with-test: Build and run the package unit-tests. This only affects packages listed on the command-line.\n-d, --with-doc: Build the package documentation. This only affects packages listed on the command-line.\n-j JOBS, --jobs=JOBS: Set the maximal number of concurrent jobs to use.\n-b, --keep-build-dir: Keep the build directories after compiling packages.\n--update-invariant: Allow changes to the packages set as switch base (typically, the main compiler). Use with caution.\n--switch=SWITCH: Use SWITCH as the current compiler switch.\n-y, --yes: Answer yes to all opam yes/no questions without prompting.\n-v --verbose: Be more verbose.\n"
          }
        ],
        "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"
            ]
          },
          {
            "id": "deps_only",
            "label": "Dependencies only",
            "type": "boolean",
            "option": [
              "--deps-only"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "dry_run",
            "label": "Dry run",
            "type": "boolean",
            "option": [
              "--dry-run"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "show_actions",
            "label": "Show actions only",
            "type": "boolean",
            "option": [
              "--show-actions"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "with_test",
            "label": "Run tests",
            "type": "boolean",
            "option": [
              "--with-test",
              "-t"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "with_doc",
            "label": "Build documentation",
            "type": "boolean",
            "option": [
              "--with-doc",
              "-d"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "jobs",
            "label": "Parallel jobs",
            "type": "integer",
            "option": [
              "--jobs",
              "-j"
            ],
            "validation": {
              "min": 1
            },
            "sources": [
              "man"
            ]
          },
          {
            "id": "keep_build_dir",
            "label": "Keep build directories",
            "type": "boolean",
            "option": [
              "--keep-build-dir",
              "-b"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "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"
            ]
          },
          {
            "id": "switch",
            "label": "Switch",
            "type": "string",
            "option": [
              "--switch"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "yes",
            "label": "Answer yes to prompts",
            "type": "boolean",
            "option": [
              "--yes",
              "-y"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "verbose",
            "label": "Verbose",
            "type": "boolean",
            "option": [
              "--verbose"
            ],
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "install",
            "label": "Install packages",
            "fields": [
              "packages",
              "jobs",
              "yes"
            ],
            "required": [
              "packages"
            ]
          },
          {
            "id": "preview",
            "label": "Preview the plan",
            "fields": [
              "packages",
              "show_actions"
            ],
            "required": [
              "packages"
            ],
            "set": {
              "show_actions": [
                true
              ]
            }
          },
          {
            "id": "project_deps",
            "label": "Install project dependencies",
            "fields": [
              "packages",
              "deps_only",
              "with_test",
              "with_doc"
            ],
            "required": [
              "packages"
            ],
            "set": {
              "deps_only": [
                true
              ],
              "packages": [
                "."
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "packages",
              "deps_only",
              "dry_run",
              "show_actions",
              "with_test",
              "with_doc",
              "jobs",
              "yes"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "keep_build_dir",
              "update_invariant",
              "switch",
              "verbose"
            ]
          }
        ]
      },
      {
        "path": [
          "list"
        ],
        "label": "List packages",
        "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\n-a, --available: List only packages that are available on the current system\n-A, --all: Include all, even uninstalled or unavailable packages\n-i, --installed: List installed packages only. This is the default when no further arguments are supplied\n--roots, --installed-roots: List only packages that were explicitly installed, excluding the ones installed as dependencies\n--pinned: List only the pinned packages\n--latests-only: List only the latest version of each package.\n--depends-on=PACKAGES: List only packages that depend on one of (comma-separated) PACKAGES.\n--required-by=PACKAGES: List only the dependencies of (comma-separated) PACKAGES.\n--recursive: With '--depends-on' and '--required-by', display all transitive dependencies rather than just direct dependencies.\n--search: Match PATTERNS against the full descriptions of packages\n--columns=COLUMNS: Select the columns to display among: name, version, package, synopsis, synopsis-or-target, description\n-s, --short: Don't print a header, and sets the default columns to name only.\n-S, --sort: Sort the packages in dependency order\n--no-switch: List what is available from the repositories, without consideration for the current (or any other) switch\n"
          }
        ],
        "field": [
          {
            "id": "patterns",
            "label": "Patterns",
            "description": "Package patterns with globs; matched against NAME or NAME.VERSION.",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "man"
            ]
          },
          {
            "id": "available",
            "label": "Available only",
            "type": "boolean",
            "option": [
              "--available",
              "-a"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "all",
            "label": "Include uninstalled and unavailable",
            "type": "boolean",
            "option": [
              "--all",
              "-A"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "installed",
            "label": "Installed only",
            "type": "boolean",
            "option": [
              "--installed",
              "-i"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "roots",
            "label": "Explicitly installed only",
            "type": "boolean",
            "option": [
              "--roots",
              "--installed-roots"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "pinned",
            "label": "Pinned only",
            "type": "boolean",
            "option": [
              "--pinned"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "latests_only",
            "label": "Latest version only",
            "type": "boolean",
            "option": [
              "--latests-only"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "depends_on",
            "label": "Depends on",
            "description": "Comma-separated packages.",
            "type": "string",
            "option": [
              "--depends-on"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "required_by",
            "label": "Required by",
            "description": "Comma-separated packages.",
            "type": "string",
            "option": [
              "--required-by"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "recursive",
            "label": "Transitive dependencies",
            "type": "boolean",
            "option": [
              "--recursive"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "search",
            "label": "Search descriptions",
            "type": "boolean",
            "option": [
              "--search"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "short",
            "label": "Names only, no header",
            "type": "boolean",
            "option": [
              "--short",
              "-s"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "no_switch",
            "label": "Ignore the current switch",
            "type": "boolean",
            "option": [
              "--no-switch"
            ],
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "installed",
            "label": "List installed packages",
            "fields": [
              "installed",
              "short"
            ],
            "set": {
              "installed": [
                true
              ]
            }
          },
          {
            "id": "search",
            "label": "Search package descriptions",
            "fields": [
              "patterns",
              "search",
              "available"
            ],
            "required": [
              "patterns"
            ],
            "set": {
              "search": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "patterns",
              "installed",
              "available",
              "all",
              "roots",
              "pinned",
              "short",
              "search"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "latests_only",
              "depends_on",
              "required_by",
              "recursive",
              "no_switch"
            ]
          }
        ]
      }
    ]
  }
}
