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
- 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.
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
- 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.
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
- goproxy --version cannot be empty
- goproxy --version "${value}" is not a valid Go semver tag
- "${modulePath}" has no semver-shaped tags on proxy.golang.or
- grok export-all
- manifestPath row ${index + 1} must be an object
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/a756721289cbd490.
Report an issue: GitHub.