{"record":{"id":"24d56681e71cb490","repo":"jdx/mise","slug":"unknown-command-did-you-mean-mise-cmd-nam","errorCode":null,"errorMessage":"unknown command: {}\n\nDid you mean:\n  mise {cmd_name}","messagePattern":"unknown command: (.+?)\n\nDid you mean:\n  mise (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/task/task_list.rs","lineNumber":288,"sourceCode":"async fn err_no_task(\n    config: &Arc<Config>,\n    name: &str,\n    task_context: Option<&TaskLoadContext>,\n) -> Result<Option<Task>> {\n    // Check early if the name looks like a mistyped CLI subcommand\n    let similar_cmds = suggest_similar_commands(name);\n    let (tasks_for_error, showing_all_tasks) = tasks_for_missing_task_error(config, name).await?;\n\n    if tasks_for_error.is_empty() {\n        // If the name matches a CLI subcommand closely, suggest that instead of\n        // the confusing \"no tasks defined\" message\n        if !similar_cmds.is_empty() {\n            let mut err_msg = format!(\"unknown command: {}\", style::ered(name));\n            err_msg.push_str(\"\\n\\nDid you mean:\");\n            for cmd_name in &similar_cmds {\n                err_msg.push_str(&format!(\"\\n  mise {cmd_name}\"));\n            }\n            bail!(err_msg);\n        }\n\n        // Check if there are any untrusted config files in the current directory\n        // that might contain tasks.\n        if let Some(cwd) = &*dirs::CWD {\n            use crate::config::config_file::{config_trust_root, is_trusted};\n            use crate::config::{config_files_in_dir, is_tool_versions_file};\n\n            // In safe mode, config is inert and trust is not required, so there\n            // are no untrusted configs to warn about.\n            let safe_mode = config::Settings::safe_mode();\n            let config_files = config_files_in_dir(cwd);\n            let untrusted_configs: Vec<_> = config_files\n                .iter()\n                .filter(|p| {\n                    !safe_mode\n                        && !is_tool_versions_file(p)\n                        && !is_trusted(&config_trust_root(p))","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/task/task_list.rs#L270-L306","documentation":"When a requested task name is not found, mise checks whether it closely resembles a known command/subcommand and, if so, throws 'unknown command' with 'Did you mean: mise <cmd>' suggestions. It is err_no_task's way of saying you probably typed a mise command name (like `mise runn` or `mise instal`) where a task was expected.","triggerScenarios":"Running `mise run <name>` (or another task-taking command) where <name> is not a defined task but is similar to a mise CLI subcommand, so the fuzzy suggestion path triggers instead of the plain 'no task' error.","commonSituations":"Typos of mise commands passed as task names (e.g. `mise run uploag` when intending `mise upload`); shell completion mistakes; scripts concatenating a command name into the task argument.","solutions":["Use the suggested command: run `mise <cmd_name>` as printed in the error instead of as a task name","List available tasks with `mise tasks` and pick the correct task name","Fix the typo in your script/alias that generated the wrong argument"],"exampleFix":"# before\nmise run instal\n\n# after\nmise install    # or: mise tasks  (to see real task names)","handlingStrategy":"validation","validationCode":"mise tasks ls --json | jq -e --arg t \"$TASK\" 'any(.[]; .name == $t)' || echo \"task $TASK does not exist\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check `mise tasks` before scripting task invocations","Don't pass mise subcommand names as task arguments","Use shell completion for task names"],"tags":["cli","tasks","typo","command-not-found"],"backgroundTag":"command-not-found","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}