jdx/mise · error
unknown command: {} Did you mean: mise {cmd_name}
Error message
unknown command: {}
Did you mean:
mise {cmd_name} What it means
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.
Source
Thrown at src/task/task_list.rs:288
async fn err_no_task(
config: &Arc<Config>,
name: &str,
task_context: Option<&TaskLoadContext>,
) -> Result<Option<Task>> {
// Check early if the name looks like a mistyped CLI subcommand
let similar_cmds = suggest_similar_commands(name);
let (tasks_for_error, showing_all_tasks) = tasks_for_missing_task_error(config, name).await?;
if tasks_for_error.is_empty() {
// If the name matches a CLI subcommand closely, suggest that instead of
// the confusing "no tasks defined" message
if !similar_cmds.is_empty() {
let mut err_msg = format!("unknown command: {}", style::ered(name));
err_msg.push_str("\n\nDid you mean:");
for cmd_name in &similar_cmds {
err_msg.push_str(&format!("\n mise {cmd_name}"));
}
bail!(err_msg);
}
// Check if there are any untrusted config files in the current directory
// that might contain tasks.
if let Some(cwd) = &*dirs::CWD {
use crate::config::config_file::{config_trust_root, is_trusted};
use crate::config::{config_files_in_dir, is_tool_versions_file};
// In safe mode, config is inert and trust is not required, so there
// are no untrusted configs to warn about.
let safe_mode = config::Settings::safe_mode();
let config_files = config_files_in_dir(cwd);
let untrusted_configs: Vec<_> = config_files
.iter()
.filter(|p| {
!safe_mode
&& !is_tool_versions_file(p)
&& !is_trusted(&config_trust_root(p))View on GitHub (pinned to afd2eddd3a)
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
Example fix
# before mise run instal # after mise install # or: mise tasks (to see real task names)
Defensive patterns
Strategy: validation
Validate before calling
mise tasks ls --json | jq -e --arg t "$TASK" 'any(.[]; .name == $t)' || echo "task $TASK does not exist"
Prevention
- Check `mise tasks` before scripting task invocations
- Don't pass mise subcommand names as task arguments
- Use shell completion for task names
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- no task {} found Did you mean one of these? - {task_name}
- {msg}
- Unknown setting: {}
- Unknown setting: {}
- Task not found: {}, use `mise tasks ls --all --hidden` to li
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/24d56681e71cb490.
Report an issue: GitHub.