macOS 用 cp -n 避免覆盖已有配置文件;Linux 用 make install 时需按系统调整 INSTALL_DIR、CONFIG_DIR 等默认路径;建议把配置模板复制到 todo.sh help 列出的位置而非直接用全局配置

brew install todo-txt
cp -n $(brew --prefix)/opt/todo-txt/todo.cfg ~/.todo.cfgREADME 未说明,作为 Shell 脚本无特殊硬件要求
用 Shell 脚本管理 todo.txt 文件的命令行工具,简单且可扩展
用纯 Shell 脚本管理 todo.txt 纯文本待办文件,支持增删改查、过滤和扩展,适合喜欢命令行和纯文本工作流的用户。
核心能力
- 用 todo.sh 命令增删改查 todo.txt 任务
- 支持 +project 和 @context 标记任务
- 提供配置文件模板,可自定义目录、颜色和高亮
- 附带 Bash 自动补全脚本
- 可通过 Makefile 指定安装路径
容易踩的坑
- v2.14.0最新正式版2026-09-01 · 2026-09-01 17:37 UTC
Added
TODOTXT_DEFAULT_ACTIONnow also allows action parameters ([#159], [#407])
Changed
- Improve compatibility with non-GNU sed command on BSD/Busybox ([#447])
Fixed
make installinstalled the Bash completion in the wrong directory ([#452])make uninstallfails ([#451])- Configured file locations can now be overridden ([#460])
Security
- todo.sh sources VERSION-FILE from CWD (GHSA-pm3w-5f88-pwpq)
- v2.13.02024-12-25 · 2024-12-25 10:30 UTC
查看更新说明
Added
- listpri action allows concatenation of multiple priorities [-ranges]
- replace action completely merges any combination of priority / date with existing (#386)
- Check for broken symlinks to custom actions and complain (#359)
Changed
- Add .sh extension to completion script
- Reuse the todo.sh alias for completion
- Return from user prompt without requiring Enter (#354)
- Default to user writable directory in config (#148)
Fixed
- Fix problem with spaces in directory path (#276)
- pri action takes multiple items + priorities on single run (#346)
- v2.12.02020-08-12 · 2020-08-12 04:38 UTC
查看更新说明
Added
- Added default priority variable
TODOTXT_PRIORITY_ON_ADD(#246) - Added
doneoption as alias ofdo(#169) - Added macOS 10.15.x support (#300)
- Highlighting of dates, metadata and item numbers (#264)
- Minimal config file / default filenames (todo.txt, done.txt, report.txt) (#289)
- Enable file completion for add-on actions via
_todo_file{1,2,3}_actions(#270) - Allow to customize what can be before / inside / after
+projectand@context(#271)
Changed
- Read the task's name and uses as default (#249)
- Updated interpreter reference to use environment variable (#160)
- Allow setting of bash completion path (#301)
Fixes
- Fixed no end-of-line bug. Supports todos with no end-of-line. (#295)
Thank you @inkarkat, @karbassi, @tpikonen, @kh80, @eightyfive, @otizonaizit, @guifeliper, and @dikeert for all the hard work and PRs.
- Added default priority variable
- v2.11.02018-03-26 · 2018-03-26 16:13 UTC
查看更新说明
Added
- Added support for
$XDG_CONFIG_HOMEconfig file/actions location - Created CODE_OF_CONDUCT.md (#217)
- Created CHANGELOG.md (#218)
Changed
- Updated
addcommand to accept lowercase priority (#230) - Clean tests and version file in Makefile. Don't ignore errors in tests.
- Updated README.md (#219)
- Update Downloads links to point at the Releases page (#228)
- Set the executable bit when preparing releases (#156)
Fixes
- Update links to use https
- Suppress todo.sh error messages when invoked during completion ([#8])
- Added support for
- v2.10.0Version 2.10.02013-12-06 · 2013-12-06 08:53 UTC
查看更新说明
Enhancements:
- Enable term filtering for listcon.
- Add make install command.
- Enable use of global config file in /etc/todo/config. make install installs a global config file.
- Allow use of post_filter_command for listall and listpri.
- Print usage help for custom action and all passed actions.
- Allow configuring null data files (done.txt and report.txt) and don't create them.
- Color contexts and projects without an add-on, just by setting vars in the config file.
- Place add-ons in subfolders (for easier git clone).
Fixes:
- Handle -h, shorthelp and help when a Fatal Error happens.
- Properly replace date when replacing task with priority and date.
- Fix todo_completion problem with Bash 3.1.
- Improve code commenting/documentation.
- Refactor code for speed/better organization.
- Improve test coverage and test library.
todo_completion
- Remove add date from line completion, ie, todo.sh ls 10[tab].
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
A simple and extensible shell script for managing your todo.txt file.

Read our contributing guide if you're looking to contribute (issues/PRs/etc).
Installation
Download
Download the latest stable release for use on your desktop or server.
OS X / macOS
brew install todo-txt
cp -n $(brew --prefix)/opt/todo-txt/todo.cfg ~/.todo.cfg
Note: The -n flag for cp makes sure you do not overwrite an existing file.
Linux
From command line
make
make install
make test
NOTE: Makefile defaults to several default paths for installed files. Adjust to your system:
INSTALL_DIR: PATH for executables (default/usr/local/bin)CONFIG_DIR: PATH for thetodo/configconfiguration template (default/usr/local/etc)BASH_COMPLETION: PATH for autocompletion scripts (default to/usr/local/share/bash-completion/completions)
# Note: Showcasing config overrides for legacy locations; NOT recommended!
make install CONFIG_DIR=/etc INSTALL_DIR=/usr/bin BASH_COMPLETION=/etc/bash_completion.d
Arch Linux
Configuration
No configuration is required; however, most users tweak the default settings
(e.g. relocating the todo.txt directory to a subdirectory of the user's home
directory, or onto a cloud drive (via the TODO_DIR variable)), modify the
colors, add additional highlighting of projects, contexts, dates, and so on. A
configuration template with a commented-out list of all available options is
included.
It is recommended to copy that template into one of the locations listed by
todo.sh help on -d CONFIG_FILE, even if it is installed in the global
configuration location (/etc/todo/config).
Usage
todo.sh [-+@aAcDfhMnNpPtTvVx] [-d todo_config] action [task_number] [task_description]
For example, to add a todo item, you can do:
todo.sh add "THING I NEED TO DO +project @context"
Read about all the possible commands in the USAGE.
Release History
See CHANGELOG.md
Support
- GitHub Discussions: questions, troubleshooting, ideas and suggestions
- GitHub Issues: report bugs and request features here (after positive feedback in the chat or discussions)
Community
- todo.txt-cli at Gitter.im: chat with the core team and interested users about this CLI in particular
- todotxt lobby at Gitter.im: chat with interested users about todo.txt in general
- Reddit: posts and discussions around the todo.txt philosophy and tools
- Twitter: official announcements and news
Contributing
We welcome all contributions. First read our Contributor Code of Conduct and then get started contributing. By participating in this project you agree to abide by its terms.
License
GNU General Public License v3.0 © todo.txt org
