mt import
mt import writes each record through the same destination guard as mt add. It refuses 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. Which files count as tasks defines the paths that qualify.
--dir <path> sends the whole batch there. A relative path resolves from the project root, and mt import takes an absolute one as-is. Without it, each record keeps the folder its file field names. mt import refuses the removed --into and --to with a hint to --dir.
Import tasks from JSON (the mt ls --json format), checking them all first
mt checks the whole batch against your project's rules before it writes any task.
To bring tasks in from another tracker, see Import & export. It describes the JSON format, jq adapters for Taskwarrior and GitHub Issues, and what a round trip keeps.
Runs on one project and refuses a set.
[FILE] | The JSON file to import, or
|
--dir <DIR> | The directory to write every task in A relative path resolves from the project root, and |
--into <DIR> | Removed. Use --dir |
--to <SUBDIR> | Removed. Use --dir |
--dry-run | Show what mt import would write, without writing anything |
--status <NAME> | The status, dated today, for a task that has none |
--map <OLD=NEW>… | Rename a status on the way in, as Repeat it for each status.
|
--drop-unmapped | Drop tags your project doesn't allow, instead of reporting an error Without it, mt keeps those tags and reports an error. |
mt import export.json --dry-run # from a file, preview only
mt import < export.json # canonical JSON from stdin
jq -f contrib/jq/import/taskwarrior.jq task-export.json | mt import # a Taskwarrior exportEvery command also takes the global flags.