Skip to content

mise tasks set ​

  • Usage: mise tasks set [FLAGS] <TASK> [-- RUN]…
  • Effect: modifies state
  • Source code: src/cli/tasks/set.rs

Change fields of an existing TOML task

Updates only the fields given and leaves the rest of the task, and the rest of the file, as they are. A list field such as --depends replaces the whole list; --env-var and --tools add or replace single entries of the task's env and tools tables. --unset removes a field, which is also how a flag such as hide goes back to false. A command given after -- replaces the task's run.

Without --env, --global or --path, edits the one config file that defines the task, and fails when several do. Like mise tasks add, it trusts the file's config root so mise loads it, except in safe mode (MISE_SAFE=1). File tasks are scripts: use mise tasks edit for them.

Arguments ​

  • <TASK> — Name of the task to change
  • [-- RUN]… — Command to run instead of the current one, given after --

Flags ​

  • -n --dry-run — Show what would be written without writing it

  • -J --json — Print what was written as JSON

  • -u --unset <FIELD> — Remove this field from the task; repeat for several

  • -e --env <ENV> — Use mise.<ENV>.toml in the current directory, or .mise.<ENV>.toml if that exists

    --env local uses mise.local.toml, which is for tasks you keep to yourself. Not the same as the global -E, which only chooses which config files are loaded.

  • -g --global — Use the global config file

  • -p --path <PATH> — Use this config file, or the config file in this directory

  • -a --alias <ALIAS> — Other names for the task

  • -d --depends <TASK> — Tasks to run before this one

  • -D --dir <DIR> — Run the task in a specific directory

  • -H --hide — Hide the task from mise tasks and completions

  • -q --quiet — Do not print the command before running

  • -r --raw — Connect the task directly to the terminal's stdin, stdout, and stderr

  • -s --sources <GLOB> — Glob patterns of files this task uses as input

  • -w --wait-for <TASK> — Wait for these tasks to finish if they are also being run

  • --confirm <MESSAGE> — Ask this question before the task runs, and run it only if the answer is yes

  • --depends-post <TASK> — Tasks to run after this one

  • --description <DESCRIPTION> — Description of the task

  • --env-var <KEY=VALUE> — Set an environment variable for the task; repeat for several

    Written to the task's env table. --env chooses the config file instead.

  • --outputs <GLOB> — Glob patterns of files this task creates, used to skip it when they are up to date

  • --run-windows <COMMAND> — Command to run on Windows (TOML tasks only; ignored with --file)

  • --shell <SHELL> — Run the task in a specific shell

  • --silent — Do not print the command or its output

  • --tools <TOOL@VERSION> — Tool the task needs, such as node@24 or npm:prettier@3; repeat for several

    Written to the task's tools table. Without a version, writes latest.

  • --usage <SPEC> — Usage spec for the task's arguments and flags: https://usage.jdx.dev/spec/

  • -h --help — Print help

Examples ​

Change a task's description

mise tasks set build --description "Build the app for release"

Add an environment variable and remove the quiet flag

mise tasks set test --env-var RUST_BACKTRACE=1 --unset quiet

Change the command of a task in mise.local.toml

mise tasks set --env local lint -- npx eslint --fix .
MIT LicenseCopyright © 2026jdx.dev