Skip to main content

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):

  1. --provider CLI flag
  2. TW_AI_PROVIDER environment variable
  3. ai.provider in TW_CONFIG
  4. Default: anthropic

For the API key, TWF checks:

  1. ANTHROPIC_API_KEY / OPENAI_API_KEY environment variable
  2. ai.anthropic_api_key / ai.openai_api_key in 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/

Metadata

Release files for taskwarrior_flow 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for taskwarrior_flow 0.6.0
File Size Uploaded
taskwarrior_flow-0.6.0.tar.gz 105.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for taskwarrior_flow 0.6.0
File Interpreter ABI Platform
taskwarrior_flow-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 121.3 kB

Release files / taskwarrior_flow-0.6.0.tar.gz

Download URL taskwarrior_flow-0.6.0.tar.gz
Size 105.2 kB
Tags Source
SHA-256 checksum
How to use checksums
367bb5384d10eec9266e1a7a2a9ed7d004fd6795aac532b6cd2d1b23b1caf471
BLAKE2b-256 checksum
How to use checksums
559ec7c6df01aceddea9b5c776225d97ec3d88aac6397c68bfbdd393eb6515df
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.6.0-py3-none-any.whl

Download URL taskwarrior_flow-0.6.0-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
09c1b25d7c6a91a7a1f510ea1a3443c75ba1eb003786f150328caa15b1d808be
BLAKE2b-256 checksum
How to use checksums
4701f5857054df22ba25e2f0dfd19f98cce7648f999f599b04659d72758a638c
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 history Release notifications | RSS feed

0.7.0

2 release files

This release

0.6.0 This release

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page