jdx/mise · error

unknown command: {}

Error message

unknown command: {}

What it means

Error "unknown command: {}" thrown in jdx/mise.

Source

Thrown at src/task/task_list.rs:267

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 6f52dcdf99)

Solutions

  1. Check the task name spelling with `mise tasks ls` and use an exact match.
  2. If you meant a monorepo path, use the `//path:task` or `:task` form.

When it happens

Trigger: Thrown at src/task/task_list.rs:267 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/c40903e53013e039. Report an issue: GitHub.