{"record":{"id":"88bdb7d94fbbee40","repo":"xai-org/grok-build","slug":"plugin-name-not-found-run-grok-plugin-list","errorCode":null,"errorMessage":"Plugin \"{name}\" not found.\nRun `grok plugin list` to see installed plugins.","messagePattern":"Plugin \"(.+?)\" not found\\.\nRun `grok plugin list` to see installed plugins\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-grok-pager/src/plugin_cmd.rs","lineNumber":605,"sourceCode":"            }\n            RepoUpdateOutcome::Pinned { repo_key, ref_name } => {\n                println!(\"{repo_key}: pinned to {ref_name}, skipping\");\n            }\n            RepoUpdateOutcome::LiveLocal { repo_key } => {\n                println!(\"{repo_key}: local symlink, already live\");\n            }\n            RepoUpdateOutcome::Failed { repo_key, error } => {\n                eprintln!(\"{repo_key}: update failed: {error}\");\n            }\n        }\n    }\n    Ok(())\n}\n\nfn cmd_enable(name: &str) -> Result<()> {\n    let registry = InstallRegistry::load();\n    if registry.find_plugin(name).is_none() {\n        bail!(\n            \"Plugin \\\"{name}\\\" not found.\\n\\\n               Run `grok plugin list` to see installed plugins.\"\n        );\n    }\n    if let Err(e) = xai_grok_shell::config::remove_disabled_plugin(name) {\n        tracing::warn!(\"failed to remove from disabled list: {e}\");\n    }\n    xai_grok_shell::config::add_enabled_plugin(name)\n        .map_err(|e| anyhow::anyhow!(\"Failed to enable plugin: {e}\"))?;\n    println!(\"Enabled plugin: {name}\");\n    Ok(())\n}\n\nfn cmd_disable(name: &str) -> Result<()> {\n    let registry = InstallRegistry::load();\n    if registry.find_plugin(name).is_none() {\n        bail!(\n            \"Plugin \\\"{name}\\\" not found.\\n\\","sourceCodeStart":587,"sourceCodeEnd":623,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-grok-pager/src/plugin_cmd.rs#L587-L623","documentation":"`cmd_enable` looks the plugin up in the on-disk InstallRegistry; if `registry.find_plugin(name)` returns None, it bails with this message that includes a hint to run `grok plugin list`. Enabling requires the plugin to already be installed and registered; the command will not enable anything by name alone.","triggerScenarios":"`grok plugin enable <name>` where the name is absent from the install registry: never installed, typo'd, already uninstalled, or registry file stale/missing (e.g. plugins installed by hand or by another tool that doesn't write the registry).","commonSituations":"Fresh machine where the plugins directory was copied manually without the registry entry; registry reset by reinstalling the CLI; trying to enable a plugin from a marketplace that was never installed.","solutions":["Run grok plugin list to confirm the exact installed name, then retry","Install the plugin first: grok plugin install ... before enabling","Check the registry file exists and contains the entry if plugins were copied manually","Reinstall the plugin to regenerate its registry entry"],"exampleFix":"// before\n$ grok plugin enable widget\nError: Plugin \"widget\" not found.\n\n// after\n$ grok plugin install marketplace:official/widget --trust\n$ grok plugin enable widget","handlingStrategy":"validation","validationCode":"// check registry before enabling\nfn can_enable(registry: &InstallRegistry, name: &str) -> Result<(), String> {\n    if registry.find_plugin(name).is_none() {\n        return Err(format!(\"plugin '{name}' is not installed; run grok plugin list\"));\n    }\n    Ok(())\n}","typeGuard":"fn is_installed(registry: &InstallRegistry, name: &str) -> bool {\n    registry.find_plugin(name).is_some()\n}","tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"not found\") => {\n        eprintln!(\"Install the plugin first (grok plugin install ...), then enable.\");\n    }\n    other => other?,\n}","preventionTips":["Always install before enabling in setup scripts","Use names copied from grok plugin list","Don't hand-copy plugin dirs without registering them","Verify registry state after CLI reinstalls"],"tags":["cli","plugin-enable","not-found","registry"],"backgroundTag":"plugin-not-found","analyzedSha":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}