{"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":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/cli/which.rs","lineNumber":70,"sourceCode":"                    miseprintln!(\"{p}\");\n                } else {\n                    let path = p.which(&config, &tv, &bin_name).await?;\n                    miseprintln!(\"{}\", path.unwrap().display());\n                }\n                Ok(())\n            }\n            None => {\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":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/cli/which.rs#L52-L88","documentation":"`mise which <bin>` resolved nothing and found no shim for the bin either (src/cli/which.rs:70): mise has never managed this name — it is neither active in the toolset nor present in the shims directory. `mise which` can only report paths for mise-managed binaries.","triggerScenarios":"`mise which git` when git is a system binary and not mise-managed; `mise which <typo>`; a tool that exists on PATH but was never installed through mise.","commonSituations":"Assuming mise tracks every executable on PATH; probing for optional tools; typo'd bin names; checking before a tool was ever `mise use`d/installed.","solutions":["If you want mise to manage it: find the tool name (`mise registry | grep -i <name>` or `mise a <partial>`) then `mise use <tool>`","If it's a system binary, query the shell instead: `command -v <bin>`","If you expected it via a tool, check which bins an installed tool provides: `mise which --tool=<tool>@<version> <bin>` or ls the install's bin dir"],"exampleFix":"# before\n$ mise which jq\n# error: jq is not a mise bin. Perhaps you need to install it first.\n\n# after\n$ mise use jq   # installs and activates\n$ mise which jq","handlingStrategy":"fallback","validationCode":"bin=\"jq\"\nmise which \"$bin\" >/dev/null 2>&1 || command -v \"$bin\" >/dev/null 2>&1 || { mise registry | grep -i \"^$bin \" && mise use \"$bin\"; }","typeGuard":null,"tryCatchPattern":"path=\"$(mise which \"$bin\" 2>/dev/null)\" || path=\"$(command -v \"$bin\" 2>/dev/null)\" || { echo \"$bin neither mise-managed nor on PATH\" >&2; exit 1; }","preventionTips":["Use `command -v` for system binaries; reserve `mise which` for mise-managed tools","`mise use` a tool before probing its bins with mise which"],"tags":["mise","which","shims","command-not-found","cli"],"backgroundTag":"command-not-found","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}