Skip to content

CLI Overview

The CLI gives you full access to your tasks from the terminal. List what’s due today, create tasks while you’re working, mark things done—all without leaving your command line. It’s designed for both humans (pretty output, fuzzy search, interactive prompts) and AI agents (structured data, exact paths, no prompts).

Terminal window
brew tap dannysmith/taproom
brew install tdn

Verify the installation:

Terminal window
tdn --version

Once installed, point tdn at your task directories. If you’re using the starter vault, create a config file:

Terminal window
tdn init

This walks you through setting up your tasks/, projects/, and areas/ directories.

See what needs attention today:

Terminal window
tdn today

List all your active tasks:

Terminal window
tdn list

Create a new task:

Terminal window
tdn new "Review quarterly report" --due friday --project "Q1 Planning"

Mark something done:

Terminal window
tdn set status "Review quarterly report" done

Get the full picture of a project:

Terminal window
tdn context project "Q1 Planning"

The CLI has three output modes, selected with flags:

FlagsOutputUse Case
(none)Formatted for terminalHumans at a terminal
--aiStructured MarkdownAI agents (Claude Code, etc.)
--jsonJSONScripts and automation

Colored, formatted output designed for terminal display. Interactive prompts appear when needed—for example, if your search matches multiple tasks, you’ll be asked to pick one.

Terminal window
tdn list --status ready

Add --ai to get structured Markdown that LLMs can parse easily. No prompts, no colors—just clean data with file paths included so agents can make follow-up calls.

Terminal window
tdn list --status ready --ai

AI mode is covered in detail in Working with AI.

Add --json for machine-readable output. Useful for scripting or piping to other tools.

Terminal window
tdn list --status ready --json

You can combine --ai --json to get AI-optimized Markdown wrapped in a JSON envelope—useful when an agent needs both structured data and the full context output.

Taskdn CLI looks for configuration in this order:

  1. Environment variablesTASKDN_TASKS_DIR, TASKDN_PROJECTS_DIR, TASKDN_AREAS_DIR
  2. Local config.taskdn.json in the current directory
  3. User config~/.taskdn.json
  4. Defaults./tasks, ./projects, ./areas relative to current directory

Create a .taskdn.json to set your directory paths:

.taskdn.json
{
"tasksDir": "~/notes/tasks",
"projectsDir": "~/notes/projects",
"areasDir": "~/notes/areas"
}

Paths can be absolute or relative, and ~ expands to your home directory.

Run tdn config to see your current effective configuration:

Terminal window
tdn config

If you have files in your task directories that aren’t tasks (like README.md or Overview.md), exclude them with ignore patterns:

.taskdn.json
{
"tasksDir": "~/notes/tasks",
"projectsDir": "~/notes/projects",
"areasDir": "~/notes/areas",
"ignore": [
"README.md",
"Overview.md",
"*.bak",
"*.tmp"
]
}

Patterns use .gitignore-style glob syntax and match filenames only (not paths).

The doctor command checks your vault for issues:

Terminal window
tdn doctor

It validates:

  • Configuration (are your directories accessible?)
  • File structure (can files be parsed?)
  • Field values (are statuses valid? are dates well-formed?)
  • References (do project/area links point to real files?)

Any problems are reported with suggestions for fixing them. Run doctor periodically, especially after editing files manually.

Tab completions are available for commands, options, and values.

Terminal window
tdn completion install

This adds completions to your shell configuration. After installation:

Terminal window
tdn <TAB> # Commands: list, show, new, set, etc.
tdn list <TAB> # Arguments: tasks, projects, areas
tdn set status <TAB> # Status values: inbox, ready, in-progress, etc.
tdn list --status=<TAB> # Option values