需先手动创建 ~/.dstask 这个 git 仓库作为数据目录,否则无法正常使用;同步依赖 git,遇到冲突要自己解决合并;Windows 数据目录为 %USERPROFILE%.dstask,可用 DSTASK_GIT_REPO 覆盖
dstask
naggieMIT更新放缓基于 Git 的终端待办与笔记管理器,每个任务对应一个 Markdown 笔记页,单二进制文件即可运行,适合喜欢命令行和版本控制的人管理任务。
Git powered terminal-based todo/note manager -- markdown note page per task. Single binary!
mkdir ~/.dstask && git -C ~/.dstask initREADME 未说明;仅要求已安装 Git 和支持 256 色的终端,无 GPU 或显存要求
单二进制终端 TODO 管理器,用 git 同步任务、每个任务配 Markdown 笔记
基于 Git 的终端待办与笔记管理器,每个任务对应一个 Markdown 笔记页,单二进制文件即可运行,适合喜欢命令行和版本控制的人管理任务。
核心能力
- 用 git 仓库同步、撤销和解决冲突,无需自建同步服务器
- 为每个任务维护完整 Markdown 笔记,适合写清单
- 用 context 系统自动给查询和新建任务套用过滤与标签
- open 命令把任务摘要和笔记里的 URL 直接在浏览器打开
- 提供 bash/zsh/nushell/PowerShell 补全,含标签与项目
容易踩的坑
- v1.0.1最新正式版2026-01-10 · 2026-01-10 12:21 UTC
What's Changed
- Fix table layout -- header row was too long
- Add a section to the README to explain how to integrate fuzzy finders by @IngoMeyer441 in https://github.com/naggie/dstask/pull/218
- Support getting terminal size on windows by @philippbeckmann in https://github.com/naggie/dstask/pull/219
- Add an advanced fzf integration for
dstask modifyand multi-select by @IngoMeyer441 in https://github.com/naggie/dstask/pull/220 - fix P0 foreground color for tasks due now by @domlupo in https://github.com/naggie/dstask/pull/223
New Contributors
- @philippbeckmann made their first contribution in https://github.com/naggie/dstask/pull/219
- @domlupo made their first contribution in https://github.com/naggie/dstask/pull/223
Full Changelog: https://github.com/naggie/dstask/compare/1.0...v1.0.1
- 1.02025-11-03 · 2025-11-03 18:49 UTC
查看更新说明
7 years of dstask! I figured it's now feature complete and time for a 1.0 release.
Thanks to everyone that contributed over the years and recently too. :tada:
What's Changed
- Keep default color for resolved overdue tasks by @eduardofuncao in https://github.com/naggie/dstask/pull/213
- fix: change color of started tasks based on priority by @eduardofuncao in https://github.com/naggie/dstask/pull/214
- Fix truncated task view when running
show-openby @IngoMeyer441 in https://github.com/naggie/dstask/pull/217 - Allow arguments in the EDITOR environment variable. by @harkaitz in https://github.com/naggie/dstask/pull/215
- Windows port by @elpatron68 in https://github.com/naggie/dstask/pull/208
New Contributors
- @IngoMeyer441 made their first contribution in https://github.com/naggie/dstask/pull/217
- @harkaitz made their first contribution in https://github.com/naggie/dstask/pull/215
- @elpatron68 made their first contribution in https://github.com/naggie/dstask/pull/208
Full Changelog: https://github.com/naggie/dstask/compare/0.28...1.0
- 0.282025-10-08 · 2025-10-08 08:03 UTC
查看更新说明
What's Changed
- Add goreleaser by @dharsanb in https://github.com/naggie/dstask/pull/195
- main: do not initialize for version & completion commands by @remi-dupre in https://github.com/naggie/dstask/pull/197
- feat: Remove origin remote and master by @ylchen07 in https://github.com/naggie/dstask/pull/201
- ci: Have new golangci-lint version run in the CI against the repository by @ylchen07 in https://github.com/naggie/dstask/pull/202
- feat: enable golanglint-ci formatters by @ylchen07 in https://github.com/naggie/dstask/pull/203
- docs: Add description for P1 tasks and prettier the markdown file by @ylchen07 in https://github.com/naggie/dstask/pull/204
- chore(deps): bump golang.org/x/oauth2 from 0.24.0 to 0.27.0 by @dependabot[bot] in https://github.com/naggie/dstask/pull/205
- feat: implement due dates for tasks by @eduardofuncao in https://github.com/naggie/dstask/pull/207
New Contributors
- @remi-dupre made their first contribution in https://github.com/naggie/dstask/pull/197
- @ylchen07 made their first contribution in https://github.com/naggie/dstask/pull/201
- @eduardofuncao made their first contribution in https://github.com/naggie/dstask/pull/207
Full Changelog: https://github.com/naggie/dstask/compare/0.27...0.28
- 0.272024-12-22 · 2024-12-22 17:09 UTC
查看更新说明
dstask 0.27 fixes 2 bugs.
Summary:
- P0 tasks would be displayed independently, alongside the task list with
task next. They do not show up alongside the task list anymore. - Thanks to @newro, dstask can now properly display tasks that contain CJK characters such as Hangul or Kanji.
- fish shell completions thanks to @nucleogenesis
What's Changed
- Remove mention of taskwarrior issue since it's been fixed by @a13ph in https://github.com/naggie/dstask/pull/186
- bugfix: display of line including CJK characters in table by @newro in https://github.com/naggie/dstask/pull/183
- 🐛 Do not parse hidden files like .gitkeep by @thatInfrastructureGuy in https://github.com/naggie/dstask/pull/178
- Bump gopkg.in/yaml.v3 from 3.0.0-20200313102051-9f266ea9e77c to 3.0.0 by @dependabot in https://github.com/naggie/dstask/pull/190
- Move test and lint to GitHub actions by @dharsanb in https://github.com/naggie/dstask/pull/191
- Check for linting from revision 490e245 by @dharsanb in https://github.com/naggie/dstask/pull/192
New Contributors
- @a13ph made their first contribution in https://github.com/naggie/dstask/pull/186
- @newro made their first contribution in https://github.com/naggie/dstask/pull/183
- @thatInfrastructureGuy made their first contribution in https://github.com/naggie/dstask/pull/178
- @dependabot made their first contribution in https://github.com/naggie/dstask/pull/190
- @dharsanb made their first contribution in https://github.com/naggie/dstask/pull/191
Full Changelog: https://github.com/naggie/dstask/compare/v0.26.0...0.27
- P0 tasks would be displayed independently, alongside the task list with
- v0.26.02022-11-05 · 2022-11-05 18:47 UTC
查看更新说明
- https://github.com/naggie/dstask/pull/152 reduces sync issues, thanks to @dontlaugh
- https://github.com/naggie/dstask/pull/156 removes
import-twwhich now lives on the separate binary,dstask-importthanks to @Dieterbe - https://github.com/naggie/dstask/pull/154 corrects the critical task count
- https://github.com/naggie/dstask/pull/160 encodes the task name in the temporary file for convenience thanks to @dontlaugh
- https://github.com/naggie/dstask/pull/166 prevents a panic thanks to @dontlaugh
- https://github.com/naggie/dstask/pull/165 embeds bash/zsh completion generation commands thanks to @dontlaugh
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Dstask is a personal task tracker designed to help you focus. It is similar to Taskwarrior but uses git to synchronise instead of a special protocol.
If you're at home in the terminal, and with solving the occasional merge conflict, then dstask is for you!
https://github.com/user-attachments/assets/589d06fd-7486-46e4-b838-ce85af12f0fc
Video courtesy of xGoivo -- thanks!
Features:
- Powerful context system (automatically applies filter/tags to queries and new tasks)
- Git powered sync/undo/resolve (passwordstore.org style) which means no need to set up a sync server, and syncing between devices is easy!
- Task listing won't break with long task text
notecommand -- edit a full markdown note for each task. Checklists are useful here.opencommand -- open URLs found in specified task (including notes) in the browser- zsh/bash completion (including tags and projects in current context) for speed; PowerShell completion on Windows
- A single statically-linked binary
- import tool which can import GitHub issues or taskwarrior tasks.
Non-features:
- Collaboration. This is a personal task tracker. Use another system for projects that involve multiple people. Note that it can still be beneficial to use dstask to track what you are working on in the context of a multi-person project tracked elsewhere.
Requirements:
- Git
- A 256-color capable terminal
Screenshots
Installation
- Copy the executable (from the releases page) to somewhere in your PATH.
- Linux/macOS: name it
dstaskand mark it executable (e.g./usr/local/bin/). - Windows: use
dstask.exeand place it in a directory onPATH(e.g.%USERPROFILE%\bin).
- Linux/macOS: name it
- Enable shell completions:
- Bash: add
source <(dstask bash-completion)to your.bashrc. - Zsh: add
dstask zsh-completion > /usr/local/share/zsh/site-functions/_dstaskor sourcecompletions/zsh.shin your~/.zshrc. - Nushell: run
dstask nushell-completion | save -f ~/.config/nushell/completions/dstask.nuthen addsource ~/.config/nushell/completions/dstask.nuto yourconfig.nu. - PowerShell (Windows): see section "PowerShell completion" below.
- Bash: add
- Set up an alias in your
.bashrc:alias task=dstaskoralias t=dstaskto make task management slightly faster. - Create or clone a
~/.dstaskgit repository for the data, if you haven't already:- Linux/macOS:
mkdir ~/.dstask && git -C ~/.dstask init - Windows:
mkdir %USERPROFILE%\.dstaskthengit -C %USERPROFILE%\.dstask init
- Linux/macOS:
Windows notes
- Default data location:
%USERPROFILE%\.dstask(can be overridden viaDSTASK_GIT_REPO). - On first run, dstask may prompt to create the repository if it doesn't exist; answer
y/yesto proceed. - Terminal: use Windows Terminal or PowerShell with a 256-color capable profile for best results.
- Shell completions: PowerShell completion is supported; see next section.
PowerShell completion
To enable PowerShell tab completion for dstask on Windows, use the embedded script in completions/powershell.ps1.
One-off for the current session:
. ./completions/powershell.ps1
Enable permanently by dot-sourcing from your PowerShell profile:
# Create a profile if it doesn't exist
if (!(Test-Path -LiteralPath $PROFILE)) { New-Item -ItemType File -Path $PROFILE -Force | Out-Null }
# Open your profile for editing
notepad $PROFILE
# Add the following line (adjust path if needed):
. "$PSScriptRoot/completions/powershell.ps1"
Alternatively, hardcode the absolute path to the repository if PSScriptRoot is not suitable for your setup, e.g.:
. "C:\\Users\\<you>\\source\\repos\\dstask-win-port\\completions\\powershell.ps1"
There are also unofficial packages for:
Moving from Taskwarrior
We have a migration guide to make the transition from taskwarrior to dstask a simple process.
Usage
Usage: dstask [id...] <cmd> [task summary/filter]
Where [task summary] is text with tags/project/priority specified. Tags are
specified with + (or - for filtering) eg: +work. The project is specified with
a project:g prefix eg: project:dstask -- no quotes. Priorities run from P3
(low), P2 (default) to P1 (high) and P0 (critical). Text can also be specified
for a substring search of description and notes.
Cmd and IDs can be swapped, multiple IDs can be specified for batch
operations.
run "dstask help <cmd>" for command specific help.
Add -- to ignore the current context. / can be used when adding tasks to note
any words after.
Available commands:
next : Show most important tasks (priority, creation date -- truncated and default)
add : Add a task
template : Add a task template
log : Log a task (already resolved)
start : Change task status to active
note : Append to or edit note for a task
stop : Change task status to pending
done : Resolve a task
context : Set global context for task list and new tasks (use "none" to set no context)
modify : Set attributes for a task
edit : Edit task with text editor
undo : Undo last action with git revert
sync : Pull then push to git repository, automatic merge commit.
open : Open all URLs found in summary/annotations
git : Pass a command to git in the repository. Used for push/pull.
remove : Remove a task (use to remove tasks added by mistake)
show-projects : List projects with completion status
show-tags : List tags in use
show-active : Show tasks that have been started
show-paused : Show tasks that have been started then stopped
show-open : Show all non-resolved tasks (without truncation)
show-resolved : Show resolved tasks
show-templates : Show task templates
show-unorganised : Show untagged tasks with no projects (global context)
bash-completion : Print bash completion script to stdout
zsh-completion : Print zsh completion script to stdout
nushell-completion : Print nushell completion script to stdout
help : Get help on any command or show this message
version : Show dstask version information
Syntax
Priority
| Symbol | Name | Note |
|---|---|---|
P0 | Critical | Must be resolved immediately. May appear in all contexts in future. |
P1 | High | Need to be resolved in near future, display in highlighted |
P2 | Normal | Default priority |
P3 | Low | Shown at bottom and faded. |
Operators
| Symbol | Syntax | Description | Example |
|---|---|---|---|
+ | +<tag> | Include tag. Filter/context, or when adding task. | dstask add fix server +work |
- | -<tag> | Exclude tag. Filter/context only. | dstask next -feature |
-- | -- | Ignore context. When listing or adding tasks. | dstask --, task add -- +home do guttering |
/ | / | When adding a task, everything after will be a note. | dstask add check out ipfs / https://ipfs.io |
project: | project:<project> | Set project. Filter/context, or when adding task. | dstask context project:dstask |
-project: | -project:<project> | Exclude project, filter/context only. | dstask next -project:dstask -work |
template: | template:<id> | Base new task on a template. | dstask add template:24 |
due: | due:<date> | Set or filter by due date. | dstask add task due:friday |
due.[filter] | due.[filter]:<date> | Filter tasks based on due date filter (before, after, in/on). | dstask next due.before:tomorrow |
State
| State | Description |
|---|---|
| Pending | Tasks that have never been started |
| Active | Tasks that have been started |
| Paused | Tasks that have been started but then stopped |
| Resolved | Tasks that have been done/close/completed |
Due Dates
Due dates can be specified when adding tasks or filtering existing tasks.
Date Formats
| Format | Description | Examples |
|---|---|---|
| Relative dates | yesterday, today, tomorrow | due:tomorrow |
| Weekdays | Full names or 3-letter abbreviations | due:monday, due:wed, due:this-fri, due:next-tuesday |
| Full dates | YYYY-MM-DD format | due:2024-12-25 |
| Month-day | MM-DD format (sets current year automatically) | due:12-25 |
| Day of month | DD format (sets current month and year automatically) | due:15 |
Adding Tasks with Due Dates
dstask add task with due date due:next-monday
dstask add finish report due:friday
dstask add pay bills due:15 # 15th of current month
dstask add halloween party due:2025-10-31
Filtering Tasks by Due Date
dstask next due.before:friday # Tasks due before Friday
dstask next due.after:tomorrow # Tasks due after tomorrow
dstask next due.on:tue # Tasks due on Tuesday
dstask next due:overdue # Overdue tasks
dstask next due.before:2025-12-31 # Tasks due before end of year
Contexts
When dstask runs, a context can be set to filter the task output. Run dstask help context
for more examples. There are two ways to set a context.
- The
contextcommand, which sets a global context on disk. - The
DSTASK_CONTEXTenvironment variable. Contexts set by this environment variable override the global context on disk.
Use the context to set a context that will apply by default, no matter what
terminal window you're using.
Use the DSTASK_CONTEXT environment variable to override context in specific
uses. For instance, a direnv config can set a context for
particular directories.
Context is not synchronised between machines.
Dealing with merge conflicts
Dstask is written in such a way that merge conflicts should not happen, unless
a task is edited independently on 2 or more machines without synchronising. In
practice this happens rarely; however when it does happen dstask will fail to
commit and warn you. You'll then need to go to the underlying ~/.dstask git
repository and resolve manually before committing and running dstask sync. In
some rare cases the ID can conflict. This is something dstask will soon be
equipped to handle automatically when the sync command runs.
Performance
General tips
- Overwhelmed by tasks? Try focussing by prioritising (set priorities) or narrowing the context. The
show-tagsandshow-projectscommands are useful for creating a context. - Use dstask to track things you might forget, rather than everything. SNR is important. Don't track tasks for the sake of it, and don't track ideas. Track ideas separately.
- Spend regular time reviewing tasks. You'll probably find some you've already resolved, and many you've forgotten. The
show-unorganisedcommand is good for this. - Try to work through tasks from the top of the list. Dstask sorts by priority then creation date -- the most important tasks are at the top.
- Use
start/stopto mark what you're genuinely working on right now; it makes resuming work faster. Paused tasks will be slightly highlighted, so you won't lose track of them.show-pausedhelps if they start to pile up. - Keep a github-style check list in the markdown note of complex or procedural tasks
- Failing to get started working? Start with the smallest task
- Record only required tasks. Track ideas separately, else your task list will grow unboundedly! I keep an
ideas.mdfor various projects for this reason. - set
DSTASK_CONTEXTin a.envrcper-project repository. With direnv, this allows you to automatically switch context
Database
The default database location is:
- Linux/macOS:
~/.dstask/ - Windows:
%USERPROFILE%\\.dstask
It can be configured by the environment variable DSTASK_GIT_REPO.
Integration of fuzzy finders
Instead of passing task IDs to commands, a fuzzy finder like fzf can be used to
search tasks by their summary instead. This is not part of dstask itself, but can be achieved by defining a shell
wrapper like this in your .bashrc or .zshrc:
function dstask () {
local has_double_dash subcommand
if (( $# == 1 || $# == 2 )); then
has_double_dash="$( [[ "$1" == "--" || "$2" == "--" ]] && echo "1" || echo "0" )"
subcommand="$( [[ "$1" == "--" ]] && echo "$2" || echo "$1" )"
if (( $# == 1 || has_double_dash )) && \
[[ "${subcommand}" =~ ^(done|edit|note|open|remove|start|stop)$ ]]
then
command dstask show-open $( (( has_double_dash )) && echo "--" ) \
| jq -r '.[] | [.id, .summary] | @tsv' \
| fzf --delimiter='\t' --nth=2 --accept-nth=1 --preview='DSTASK_FAKE_PTY=1 dstask {1} --' \
| xargs -n1 dstask "${subcommand}"
return
fi
fi
command dstask "$@"
}
The wrapper function checks if dstask was called with a subcommand missing the task ID, and if so uses the show-open
command to get a list of tasks to choose from. -- can be used to ignore the current context for the fuzzy search. All
other commands are passed directly to dstask.
A more advanced version, which adds additional support for the dstask modify command by inserting the selected task ID
directly into the shell prompt, can be found in etc/fzf_integration.zsh (zsh only).
Alternatives
Alternatives listed must be capable of running in the terminal.
- TaskLite -- The CLI task manager for power users, written in Haskell
- Taskwarrior -- the closest analogue
- Taskbook -- board metaphor, note support
- todo.txt-cli
- etm -- event and task manager
- t -- a minimal todo list with an amusing philosophy
FAQ
Does dstask encrypt tasks?
Encryption is not a design goal of dstask. If you want to have your remote repository encrypted, you may consider git-remote-gcrypt or git-crypt. Note that dstask has not been tested with these tools, nor can any claims be made about the security of the tools themselves.
Is it possible to modify more than one task at once with a filter?
Yes.
- Set a context:
- Run a modify command without and ID
- Hit y to confirm to modify all tasks in context
This means it's natural to review the tasks that would be modified before modifying by listing all tasks in the current context first, instead of potentially operating blindly by matching tags or numbers.
You can also specify multiple task numbers at one time, as with any other command.
Is there a GUI or web interface?
Not as part of dstask itself. However, dstask can be used as a library -- @botto has started developing a web GUI, specifically to allow task management on-the-go via a smartphone: https://github.com/botto/dstask-gui . It's in early stages but is meaningful as having no smartphone-based control is a blocker for a lot of people.
Has dstask been featured in a magazine?
Yes! https://www.linux-magazine.com/Issues/2021/246/dstask :-)