mt add
mt add writes a task source. It refuses a destination the loader would not read back. Those include a template directory, a reserved .mindtape or .git path, a destination that is itself a symlink, and a new file under a Git ignore rule. It doesn’t leave a file behind. Which files count as tasks defines the paths that qualify.
--set names a template slot or a core field mt set writes. mt add inserts a field the template has no slot for after fill, and mt add --set due=2026-12-01 works on any template. --dir <path> sets one destination: a relative path resolves from the project root, and mt add takes an absolute one as-is. mt add refuses the removed --into and --to with that hint.
--priority, --difficulty, --kind, --assignee, --due and --start are direct aliases for --set on those scalar fields. mt add runs the project’s [[on.add]] hooks after it collects the values, and a hook can fill a field or choose the destination. An explicit = value (a --set, a positional title or an --edit change) or an explicit --dir wins. An explicit += appends and does not block a hook set, and --no-hooks skips the hook list.
File a new task from a template
mt add fills a template, names the file and checks the task, so you don’t copy and edit a task file by hand. The title’s words come first. Fill the template’s other slots with key=value, key+=value and key@path tokens, after --set or bare after --. A YAML or JSON file given to -f fills them too, and so does the editor. Templates & slots describes all three. --dedup decides what happens when a task with the same stem exists. fail stops before writing, skip exits 0 without writing, and add-suffix adds -2, -3 and so on. Your project sets the default in [tasks.naming] dedup. If it doesn’t, the default is add-suffix when you set a stem template and fail otherwise. --format prints the result as text, path, path0 or json, and --json is the shorthand for --format json and wins when you give both. The JSON says whether mt wrote, skipped or suffixed the task, and opens with the URL of its schema. A text report ends on next: mt eval <slug>, the command that reads the task it named. The other formats contain no prose. mt checks the task before it writes. A refused add doesn’t write a file. --no-verify skips the check, and --verify demands it, whatever [add] verify-when says.
Runs on one project and refuses a set.
[TITLE]… | The task's title mt joins the words with spaces.
|
-t, --template <TEMPLATE> | The template to fill Defaults to your project's default template. |
-f, --values <PATH>… | Read slot values from a JSON or YAML file, or Repeat it to merge more than one file, and a later file wins on a shared key.
|
--set <KEY=VALUE>… | Set a slot or a core field, as
|
[KEY=VALUE]… | Slots or core fields to set after One line looks like
|
--dir <DIR> | The directory to write the task in A relative path resolves from the project root, and an absolute one stays as-is. Without it, an |
--into <DIR> | Removed. Use --dir |
--to <SUBDIR> | Removed. Use --dir |
--priority <VALUE> | The priority, as a number |
--difficulty <VALUE> | The difficulty, as a number |
--kind <VALUE> | The kind of work, such as feat or fix |
--assignee <NAME> | Who is working on the task |
--due <DATE> | The due date, as YYYY-MM-DD |
--start <DATE> | The start date, as YYYY-MM-DD |
--name <STEM> | The file name, without Defaults to a slug of the title. |
--status <NAME> | The status to file the task with Defaults to the template's status, else your project's first status that doesn't close a task. |
--edit | Fill the template's slots in your editor Needs a terminal. |
--describe <FORMAT> | Print the template's slots and the project's add hooks instead of filing a task
|
--print | Print the filled task instead of writing it |
--verify | Check the new task against your project's rules Whatever |
--no-verify | Don't check the new task against your project's rules Whatever |
--no-hooks | Don't run the project's [[on.add]] hooks |
--dedup <MODE> | What to do when a task with that file name exists Without it, mt follows your project's
|
--format <FORMAT> | How to report what
|
--json | Same as --format json |
$ mt add fix the login bug
wrote tasks/fix-the-login-bug.typ (sd8)
next: mt eval sd8
$ mt add --describe
title string required # Task title
e.g. Write the first task
$ mt add ship-it --format json
{
"$schema": "https://raw.githubusercontent.com/mlavrinenko/mindtape/main/schema/output/add/1.schema.json",
"outcome": "wrote",
"path": "tasks/ship-it.typ",
"slug": "g43"
}
$ mt add ship-it --dedup skip
skipped, already exists at tasks/ship-it.typ (g43)
next: mt eval g43
$ mt add ship-it --dedup add-suffix
suffixed, wrote tasks/ship-it-2.typ (fw7)
next: mt eval fw7Every command also takes the global flags.