<!-- @generated by usage-cli from usage spec -->
# `mise tasks add`

- **Usage:** `mise tasks add [FLAGS] <TASK> [-- RUN]…`
- **Effect:** modifies state
- **Source code:** [`src/cli/tasks/add.rs`](https://github.com/jdx/mise/blob/main/src/cli/tasks/add.rs)

Create a new task

Adds a task to the local mise.toml file.
See <https://mise.jdx.dev/configuration.html#target-file-for-write-operations>

## Arguments
- **`<TASK>`** — Tasks name to add
- **`[-- RUN]…`**

## Flags
- **`-a --alias… <ALIAS>`** — Other names for the task
- **`-d --depends… <DEPENDS>`** — Add dependencies to the task
- **`-D --dir <DIR>`** — Run the task in a specific directory
- **`-f --file`** — Create a file task instead of a toml task
- **`-H --hide`** — Hide the task from `mise tasks` and completions
- **`-q --quiet`** — Do not print the command before running
- **`-r --raw`** — Directly connect stdin/stdout/stderr
- **`-s --sources… <SOURCES>`** — Glob patterns of files this task uses as input
- **`-w --wait-for… <WAIT_FOR>`** — Wait for these tasks to complete if they are to run
- **`--depends-post… <DEPENDS_POST>`** — Dependencies to run after the task runs
- **`--description <DESCRIPTION>`** — Description of the task
- **`--outputs… <OUTPUTS>`** — Glob patterns of files this task creates, to skip if they are not modified
- **`--run-windows <RUN_WINDOWS>`** — Command to run on windows
- **`--shell <SHELL>`** — Run the task in a specific shell
- **`--silent`** — Do not print the command or its output
- **`-h --help`** — Print help

Examples:

```
mise tasks add pre-commit --depends "test" --depends "render" -- echo pre-commit
```
