{"record":{"id":"83d1665a4bbb7f41","repo":"jackwener/OpenCLI","slug":"sub-plugin-subplugin-is-disabled-in-the-manif","errorCode":null,"errorMessage":"Sub-plugin \"${subPlugin}\" is disabled in the manifest.","messagePattern":"Sub-plugin \"(.+?)\" is disabled in the manifest\\.","errorType":"validation","errorClass":"PluginError","httpStatus":null,"severity":"error","filePath":"src/plugin.ts","lineNumber":872,"sourceCode":"  const repoDir = path.join(monoreposDir, repoName);\n  const repoAlreadyInstalled = fs.existsSync(repoDir);\n  const repoRoot = repoAlreadyInstalled ? repoDir : cloneDir;\n  const effectiveManifest = repoAlreadyInstalled ? readPluginManifest(repoDir) : manifest;\n\n  if (!effectiveManifest || !isMonorepo(effectiveManifest)) {\n    throw new PluginError(`Monorepo manifest missing or invalid at ${repoRoot}`);\n  }\n\n  let pluginsToInstall = getEnabledPlugins(effectiveManifest);\n\n  // If a specific sub-plugin was requested, filter to just that one\n  if (subPlugin) {\n    pluginsToInstall = pluginsToInstall.filter((p) => p.name === subPlugin);\n    if (pluginsToInstall.length === 0) {\n      // Check if it exists but is disabled\n      const disabled = effectiveManifest.plugins?.[subPlugin];\n      if (disabled) {\n        throw new PluginError(`Sub-plugin \"${subPlugin}\" is disabled in the manifest.`);\n      }\n      throw new PluginError(\n        `Sub-plugin \"${subPlugin}\" not found in monorepo. Available: ${Object.keys(effectiveManifest.plugins ?? {}).join(', ')}`\n      );\n    }\n  }\n\n  const installedNames: string[] = [];\n  const lock = readLockFile();\n  const eligiblePlugins: Array<{ name: string; entry: typeof pluginsToInstall[number]['entry'] }> = [];\n\n  fs.mkdirSync(PLUGINS_DIR, { recursive: true });\n\n  for (const { name, entry } of pluginsToInstall) {\n    // Check sub-plugin level compatibility (overrides top-level)\n    if (entry.opencli && !checkCompatibility(entry.opencli)) {\n      log.warn(`Skipping \"${name}\": requires opencli ${entry.opencli}`);\n      continue;","sourceCodeStart":854,"sourceCodeEnd":890,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/src/plugin.ts#L854-L890","documentation":"When installing a specific sub-plugin from a monorepo, opencli filters the enabled plugins from the manifest. If the filter yields nothing, it distinguishes two cases: the sub-plugin exists in the manifest but is disabled, which produces this error. It tells you the name is correct but the manifest has it turned off.","triggerScenarios":"Running a monorepo install targeting a sub-plugin name that is present in effectiveManifest.plugins but has `disabled: true`, so getEnabledPlugins excluded it and the filter matched zero entries.","commonSituations":"A monorepo maintainer disabled a plugin upstream and you pull the updated manifest; you disabled the plugin locally in config earlier and forgot; copying a manifest snippet with a disabled flag.","solutions":["Enable the sub-plugin in the monorepo manifest (remove `disabled: true` from its entry).","If disabled via local config/override, re-enable it there and retry.","If you don't need this specific sub-plugin, install a different enabled one or the whole monorepo."],"exampleFix":"// before (monorepo manifest)\n\"lint\": { \"path\": \"packages/lint\", \"disabled\": true }\n// after\n\"lint\": { \"path\": \"packages/lint\" }","handlingStrategy":"try-catch","validationCode":"const manifest = JSON.parse(fs.readFileSync(path.join(cloneDir, 'opencli.json'), 'utf8'));\nconst entry = manifest.plugins?.[subPlugin];\nif (entry?.disabled) console.warn(`Sub-plugin ${subPlugin} is disabled in the manifest`);","typeGuard":"function isSubPluginEnabled(m: { plugins?: Record<string, { disabled?: boolean }> }, name: string): boolean {\n  const e = m.plugins?.[name];\n  return !!e && !e.disabled;\n}","tryCatchPattern":"try {\n  await opencli.plugin.installFromMonorepo(repo, subPlugin);\n} catch (e) {\n  if (e.message.includes('is disabled in the manifest')) {\n    console.error(`Enable \"${subPlugin}\" in the monorepo manifest or pick an enabled plugin.`);\n  } else throw e;\n}","preventionTips":["Check the `disabled` flag in the monorepo manifest before requesting a sub-plugin.","Track upstream manifest changes if you rely on specific sub-plugins.","Keep local enable/disable overrides documented to avoid surprises."],"tags":["plugin","monorepo","disabled","manifest"],"backgroundTag":"plugin-disabled-in-manifest","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}