{"record":{"id":"b3730c97a7026f6d","repo":"jdx/mise","slug":"bin-name-is-not-a-mise-bin-perhaps-you-need-to","errorCode":null,"errorMessage":"{bin_name} is not a mise bin. Perhaps you need to install it first.","messagePattern":"(.+?) is not a mise bin\\. Perhaps you need to install it first\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/which.rs","lineNumber":87,"sourceCode":"                    miseprintln!(\"{}\", path.unwrap().display());\n                }\n                Ok(())\n            }\n            None => {\n                if let Some(msg) = self.uninstalled_tool_message(&config, &ts) {\n                    bail!(msg);\n                }\n                if let Some(msg) =\n                    crate::shims::unavailable_configured_tool_message(&config, &ts, &bin_name)\n                {\n                    bail!(msg);\n                }\n                if self.has_shim(&bin_name) {\n                    bail!(\n                        \"{bin_name} is a mise bin however it is not currently active. Use `mise use` to activate it in this directory.\"\n                    )\n                } else {\n                    bail!(\"{bin_name} is not a mise bin. Perhaps you need to install it first.\",)\n                }\n            }\n        }\n    }\n    async fn complete(&self, config: &Arc<Config>) -> Result<()> {\n        let ts = self.get_toolset(config).await?;\n        let bins = ts\n            .list_paths(config)\n            .await\n            .into_iter()\n            .flat_map(|p| file::ls(&p).unwrap_or_default())\n            .map(|p| p.file_name().unwrap().to_string_lossy().to_string())\n            .unique()\n            .sorted()\n            .collect_vec();\n        for bin in bins {\n            println!(\"{bin}\");\n        }","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/which.rs#L69-L105","documentation":"Terminal fallback of `mise which <bin>`: when the bin has no mise shim and no match in the active toolset, mise concludes the binary is simply not managed by mise and bails with this message, suggesting the user install it first.","triggerScenarios":"`mise which <bin>` where `has_shim(&bin_name)` is false and the toolset lookup returned None — the name was never added to any mise config and no shim was generated.","commonSituations":"Typo in the binary name; using `mise which` for a system binary mise never manages; forgetting to add the tool to mise.toml before locating it.","solutions":["Add and install the tool: `mise use <tool>@<version>` then retry `mise which <bin>`.","Verify the binary name spelling; if the binary is system-installed and not mise-managed, use `command -v <bin>` instead.","Run `mise ls` to confirm the tool is present in the toolset."],"exampleFix":"// before\nmise which rg   # rg not managed by mise\n// after\nmise use ripgrep@14\nmise which rg","handlingStrategy":"fallback","validationCode":"mise ls --json | jq -e --arg b \"$bin\" 'any(.[]; .active == true)' >/dev/null || echo \"$bin not managed by mise\"","typeGuard":null,"tryCatchPattern":"if ! mise which \"$bin\" 2>/dev/null; then\n  command -v \"$bin\" || { mise use \"$tool\" && mise which \"$bin\"; }\nfi","preventionTips":["Only use `mise which` for mise-managed tools; use `command -v` for system binaries","Double-check binary names (mise which locates binaries, not tool names)","Add tools to config before trying to locate their binaries"],"tags":["cli","which","install"],"backgroundTag":"command-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}