← 返回命令列表

Linux command

todo.txt-cli 命令

安全

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

常用示例

Add a new task

todo.sh add "[Buy groceries +shopping @errands]"

List all tasks

todo.sh list

List tasks matching term

todo.sh list "[search term]"

Mark task as done

todo.sh do [1]

Set priority on task

todo.sh pri [1] [A]

Append text to task

todo.sh append [1] "[additional text]"

Archive completed tasks

todo.sh archive

Delete a task

todo.sh del [1]

说明

todo.txt-cli (todo.sh) is a shell script for managing tasks in a plain text file. It follows the todo.txt format, which uses simple conventions for priorities, projects (+project), contexts (@context), and dates. Tasks are stored in todo.txt, one per line. Completed tasks are optionally archived to done.txt. The plain text format ensures portability and compatibility with any text editor, sync service, or scripting tool. The script supports tab completion for priorities, contexts, and projects. Configuration is done through a .todo.cfg file which can customize colors, file locations, and default behaviors. Install via package manager or Homebrew: `brew install todo-txt`

参数

-f
Force actions without confirmation.
-h
Display help.
-p
Plain mode (no colors).
-a
Don't auto-archive done tasks.
-n
Don't preserve line numbers.
-t
Don't prepend date on add.
-v
Verbose mode.
-V
Display version.
-d _file_
Use alternate config file.

FAQ

What is the todo.txt-cli command used for?

todo.txt-cli (todo.sh) is a shell script for managing tasks in a plain text file. It follows the todo.txt format, which uses simple conventions for priorities, projects (+project), contexts (@context), and dates. Tasks are stored in todo.txt, one per line. Completed tasks are optionally archived to done.txt. The plain text format ensures portability and compatibility with any text editor, sync service, or scripting tool. The script supports tab completion for priorities, contexts, and projects. Configuration is done through a .todo.cfg file which can customize colors, file locations, and default behaviors. Install via package manager or Homebrew: `brew install todo-txt`

How do I run a basic todo.txt-cli example?

Run `todo.sh add "[Buy groceries +shopping @errands]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -f do in todo.txt-cli?

Force actions without confirmation.