← 返回命令列表

Linux command

task 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Add a new task

task add "[description]"

Add a task with project and due date

task add "[description]" project:[project_name] due:[tomorrow]

List all pending tasks

task list

Mark a task as done

task [task_id] done

Modify an existing task

task [task_id] modify priority:[H] due:[friday]

Delete a task

task [task_id] delete

Show detailed info

task [task_id] info

Start working on a task

task [task_id] start

说明

Taskwarrior is a command-line task management application that maintains a list of tasks with support for projects, tags, priorities, due dates, and custom attributes. It provides powerful filtering and reporting capabilities. Tasks can have attributes like project, priority (H/M/L), due dates, tags, wait dates, and user-defined attributes. Filters allow selecting tasks based on any combination of attributes. Reports provide customizable views of task data. Configuration is stored in ~/.taskrc and task data in ~/.task/. These locations can be overridden via environment variables TASKRC and TASKDATA. All commands can be abbreviated as long as the prefix is unique.

参数

add
Add a new task to the task list.
done
Mark a task as completed.
delete
Delete a task from the list.
modify
Modify attributes of an existing task.
start
Mark a task as started (active).
stop
Mark a task as no longer active.
annotate
Add an annotation to a task.
list
Display pending tasks using the default report.
info
Show all data and metadata for a task.
undo
Revert the most recent change.
log
Add a task that is already completed.
duplicate
Create a copy of a task.
projects
List all projects with task counts.
tags
List all tags in use.
--rc _file_
Use an alternative configuration file.
--force
Suppress confirmation prompts.
--verbose
Show more detailed output.
--quiet
Suppress non-essential output.
--debug
Enable debugging output.
--version
Display version information.

FAQ

What is the task command used for?

Taskwarrior is a command-line task management application that maintains a list of tasks with support for projects, tags, priorities, due dates, and custom attributes. It provides powerful filtering and reporting capabilities. Tasks can have attributes like project, priority (H/M/L), due dates, tags, wait dates, and user-defined attributes. Filters allow selecting tasks based on any combination of attributes. Reports provide customizable views of task data. Configuration is stored in ~/.taskrc and task data in ~/.task/. These locations can be overridden via environment variables TASKRC and TASKDATA. All commands can be abbreviated as long as the prefix is unique.

How do I run a basic task example?

Run `task add "[description]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does add do in task?

Add a new task to the task list.