{"record":{"id":"a756721289cbd490","repo":"jackwener/OpenCLI","slug":"plugin-requires-opencli-manifest-opencli-but-c","errorCode":null,"errorMessage":"Plugin requires opencli ${manifest.opencli}, but current version is incompatible.","messagePattern":"Plugin requires opencli (.+?), but current version is incompatible\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugin.ts","lineNumber":722,"sourceCode":"      `  ssh://git@<host>/<path>/repo.git\\n` +\n      `  git@<host>:user/repo.git\\n` +\n      `  file:///absolute/path\\n` +\n      `  /absolute/path`\n    );\n  }\n\n  const { name: repoName, subPlugin } = parsed;\n\n  if (parsed.type === 'local') {\n    return installLocalPlugin(parsed.localPath!, repoName);\n  }\n\n  return withTempClone(parsed.cloneUrl!, (tmpCloneDir) => {\n    const manifest = readPluginManifest(tmpCloneDir);\n\n    // Check top-level compatibility\n    if (manifest?.opencli && !checkCompatibility(manifest.opencli)) {\n      throw new Error(\n        `Plugin requires opencli ${manifest.opencli}, but current version is incompatible.`\n      );\n    }\n\n    if (manifest && isMonorepo(manifest)) {\n      return installMonorepo(tmpCloneDir, parsed.cloneUrl!, repoName, manifest, subPlugin);\n    }\n\n    // Single plugin mode\n    return installSinglePlugin(tmpCloneDir, parsed.cloneUrl!, repoName, manifest);\n  });\n}\n\n/** Install a single (non-monorepo) plugin. */\nfunction installSinglePlugin(\n  cloneDir: string,\n  cloneUrl: string,\n  name: string,","sourceCodeStart":704,"sourceCodeEnd":740,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/src/plugin.ts#L704-L740","documentation":"After cloning, installPlugin reads the plugin's opencli-plugin.json manifest and, if it declares an `opencli` version requirement, checks it against the running opencli via checkCompatibility. On mismatch a plain Error is thrown — the plugin declares it needs a different (usually newer) opencli than the one installed, so installing would produce a broken plugin.","triggerScenarios":"installPlugin('github:user/repo') (or updatePlugin of a standalone/monorepo plugin) where the remote repo's manifest has an `opencli` field (e.g. \"^2.0.0\") that the current opencli version does not satisfy.","commonSituations":"Plugin released for a newer major of opencli while the host is on 1.x; pinned old plugin repo requiring an opencli version you've upgraded past; semver range written incorrectly by the plugin author.","solutions":["Upgrade opencli to a version satisfying the manifest requirement (`npm install -g @jackwener/opencli@latest`).","Check the required range in the repo's opencli-plugin.json and compare with `opencli --version`.","Install an older commit/branch of the plugin compatible with your opencli version.","Ask the plugin maintainer to widen the `opencli` range if it is unnecessarily strict."],"exampleFix":"// before\n$ opencli --version\n1.2.0\n$ opencli plugin install github:user/repo // requires opencli ^2.0.0\n// after\n$ npm install -g @jackwener/opencli@latest\n$ opencli plugin install github:user/repo","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  installPlugin(source);\n} catch (err) {\n  if (err.message.includes('current version is incompatible')) {\n    const required = err.message.match(/requires opencli (\\S+)/)?.[1];\n    // prompt/perform: npm install -g @jackwener/opencli@latest, then retry\n  } else throw err;\n}","preventionTips":["Keep the host opencli up to date before installing third-party plugins.","Read the plugin's opencli-plugin.json `opencli` requirement ahead of install.","Pin plugin repos to commits/branches compatible with your opencli major version."],"tags":["version-compatibility","semver","manifest","plugin-install"],"backgroundTag":"plugin-version-incompatible","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}