jdx/mise · error

cli feature is not enabled

Error message

cli feature is not enabled

What it means

When the requested task isn't found, mise checks whether the current directory contains untrusted config files that might define tasks; if so it raises this error instead of a plain not-found, because mise refuses to execute tasks from untrusted configuration. Trust must be granted explicitly with `mise trust`.

Solutions

  1. Run `mise trust` (or `mise trust <path>`) to trust the config files, then retry.
  2. In CI, run `mise trust` once after checkout before running tasks.
  3. Verify you are in the intended project directory — the untrusted files may be unexpected.

Example fix

// before
mise run build   # fails: configs not trusted

// after
mise trust && mise run build
Defensive patterns

Strategy: validation

Validate before calling

# Check for untrusted configs before running tasks
mise trust --dry-run 2>/dev/null || mise trust

Try / catch

// On 'not trusted' errors, trust and retry once
if (err.message.includes('not trusted')) {
  execSync('mise trust');
  return runTask(name);
}

Prevention

When it happens

Trigger: `mise run <task>` in a directory where a config file (mise.toml, .mise.toml, etc.) exists but is not trusted, and no task with the given name resolves; err_no_task detects untrusted configs via config_trust_root/is_trusted.

Common situations: Cloning a fresh repository (configs untrusted by default); after mise upgrades that reset trust; running in CI on a freshly checked-out workspace without trusting configs first.

Understand the failure class

Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/fd7267108c5bac0a. Report an issue: GitHub.

Appendix: source

Thrown at crates/vfox/src/bin.rs:24

extern crate log;

#[cfg(feature = "cli")]
mod cli;

#[cfg(feature = "cli")]
#[tokio::main]
async fn main() -> std::process::ExitCode {
    env_logger::init_from_env(env_logger::Env::default().filter_or("VFOX_LOG", "info"));
    if let Err(err) = cli::run().await {
        error!("{err}");
        return std::process::ExitCode::FAILURE;
    }
    std::process::ExitCode::SUCCESS
}

#[cfg(not(feature = "cli"))]
fn main() {
    panic!("cli feature is not enabled");
}

View on GitHub (pinned to 533346cc37)