jackwener/OpenCLI · error

Plugin requires opencli ${manifest.opencli}, but current ver

Error message

Plugin requires opencli ${manifest.opencli}, but current version is incompatible.

What it means

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.

Source

Thrown at src/plugin.ts:722

      `  ssh://git@<host>/<path>/repo.git\n` +
      `  git@<host>:user/repo.git\n` +
      `  file:///absolute/path\n` +
      `  /absolute/path`
    );
  }

  const { name: repoName, subPlugin } = parsed;

  if (parsed.type === 'local') {
    return installLocalPlugin(parsed.localPath!, repoName);
  }

  return withTempClone(parsed.cloneUrl!, (tmpCloneDir) => {
    const manifest = readPluginManifest(tmpCloneDir);

    // Check top-level compatibility
    if (manifest?.opencli && !checkCompatibility(manifest.opencli)) {
      throw new Error(
        `Plugin requires opencli ${manifest.opencli}, but current version is incompatible.`
      );
    }

    if (manifest && isMonorepo(manifest)) {
      return installMonorepo(tmpCloneDir, parsed.cloneUrl!, repoName, manifest, subPlugin);
    }

    // Single plugin mode
    return installSinglePlugin(tmpCloneDir, parsed.cloneUrl!, repoName, manifest);
  });
}

/** Install a single (non-monorepo) plugin. */
function installSinglePlugin(
  cloneDir: string,
  cloneUrl: string,
  name: string,

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Upgrade opencli to a version satisfying the manifest requirement (`npm install -g @jackwener/opencli@latest`).
  2. Check the required range in the repo's opencli-plugin.json and compare with `opencli --version`.
  3. Install an older commit/branch of the plugin compatible with your opencli version.
  4. Ask the plugin maintainer to widen the `opencli` range if it is unnecessarily strict.

Example fix

// before
$ opencli --version
1.2.0
$ opencli plugin install github:user/repo // requires opencli ^2.0.0
// after
$ npm install -g @jackwener/opencli@latest
$ opencli plugin install github:user/repo
Defensive patterns

Strategy: try-catch

Try / catch

try {
  installPlugin(source);
} catch (err) {
  if (err.message.includes('current version is incompatible')) {
    const required = err.message.match(/requires opencli (\S+)/)?.[1];
    // prompt/perform: npm install -g @jackwener/opencli@latest, then retry
  } else throw err;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/a756721289cbd490. Report an issue: GitHub.