Taskwarrior Flow (TWF)
Taskwarrior Flow (TWF) enhances your Taskwarrior workflow with a CLI that adds task templates, saved queries, multiple task databases, natural date parsing, and AI-powered natural language task creation.
Installation
Standard (no AI)
# pipx (recommended for CLI tools)
pipx install taskwarrior_flow
# uv
uv tool install taskwarrior_flow
With AI support
AI features require the ai extra, which bundles the Anthropic and OpenAI SDKs.
# pipx
pipx install "taskwarrior_flow[ai]"
# uv
uv tool install "taskwarrior_flow[ai]"
To add only one provider:
uv tool install taskwarrior_flow
uv add anthropic # or: uv add openai
Configuration
TWF reads its configuration from ~/.local/share/tw_flow/config.json by default. The file is created automatically on first run.
{
"flow_config": {
"personal": {"data": "~/.task", "config": "~/.taskrc"}
},
"ai": {
"provider": "anthropic",
"anthropic_api_key": "sk-ant-...",
"openai_api_key": "sk-..."
},
"add_templates": { ... },
"saved_queries": { ... }
}
Note: Avoid committing the config file to version control if it contains API keys. Environment variables are the safer option for CI or shared machines.
Using with m_taskwarrior_d.nvim
If you use the m_taskwarrior_d.nvim Neovim plugin, it manages its own config file. Point TWF at it by exporting TW_CONFIG in your shell profile (~/.bashrc, ~/.zshrc, ~/.config/fish/config.fish, etc.):
# bash / zsh
export TW_CONFIG="$HOME/.local/share/nvim/m_taskwarrior_d.json"
# fish
set -x TW_CONFIG "$HOME/.local/share/nvim/m_taskwarrior_d.json"
This lets both tools share the same groups, templates, and queries.
AI key resolution order
For the provider, TWF checks (first match wins):
--providerCLI flagTW_AI_PROVIDERenvironment variableai.providerin TW_CONFIG- Default:
anthropic
For the API key, TWF checks:
ANTHROPIC_API_KEY/OPENAI_API_KEYenvironment variableai.anthropic_api_key/ai.openai_api_keyin TW_CONFIG
Features
Multiple task groups
Route commands to different Taskwarrior databases by group name:
twf task add "Personal errand" due:tomorrow
twf work add "Write quarterly report" project:reports priority:H
Groups are defined under flow_config in TW_CONFIG.
Natural date parsing
Use @...@ to write dates in plain English anywhere in a command:
twf task add "Team sync" due:@next Monday at 10am@
twf work mod 3 wait:@in two weeks@
Task templates
Create reusable task blueprints with typed fields (text, list, date, annotation):
twf utils add template # define a new template
twf utils add task # create a task from a saved template
twf utils view template # inspect a template's fields
twf utils edit template # modify an existing template
Saved queries
Save and rerun complex Taskwarrior filter expressions:
twf utils add query # save a new query
twf utils view task # run a saved query
twf utils edit query # update a saved query
AI natural language input
Convert a plain-English description into a Taskwarrior command, preview it, then confirm:
twf ai "buy groceries by tomorrow, high priority"
# → add "buy groceries" due:tomorrow priority:H
twf ai "team meeting every Monday" --group work
# → add "team meeting" recur:weekly due:monday
twf ai "call John next Friday" --provider openai
# → add "call John" due:friday
Options:
| Flag | Short | Description |
|---|---|---|
--group |
-g |
Task group to add the task to (default: first group in config) |
--provider |
-p |
AI provider: anthropic or openai |
Development
# Clone and set up
git clone https://github.com/huantrinh1802/taskwarrior_flow
cd taskwarrior_flow
# Install with dev dependencies (uv)
uv sync --group dev
# Install with AI extras
uv sync --group dev --extra ai
# Run tests
uv run pytest
# Lint
uv run ruff check tools/
Related tools
- Taskwarrior — the task manager this tool wraps
- m_taskwarrior_d.nvim — Neovim plugin that shares the same TW_CONFIG format
Metadata
Release files for taskwarrior_flow 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| taskwarrior_flow-0.7.0.tar.gz | 106.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| taskwarrior_flow-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 123.5 kB
Release files / taskwarrior_flow-0.7.0.tar.gz
| Download URL | taskwarrior_flow-0.7.0.tar.gz |
|---|---|
| Size | 106.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c499559cf6c5a1fe08794f09d46081d2e9dcb5278728ff07ad271cd8430140a
|
|
BLAKE2b-256 checksum How to use checksums |
9c48f1c772a06d4149ff13f50e2b7d9d802647e084f3809a2dce13f3c9f9787c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / taskwarrior_flow-0.7.0-py3-none-any.whl
| Download URL | taskwarrior_flow-0.7.0-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fe09e6a57a30464a401074aaff47b7bf78a4b013bdd52f91c089d4ed257fe49
|
|
BLAKE2b-256 checksum How to use checksums |
0e9d7f9edef7ad36d20c3568d6471a97cdaf1c624ff725700b65d7b605c06cc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|