### Development Setup and Build Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Commands for cloning the repository, installing dependencies, building the TypeScript project, and running in development mode. ```bash # Clone the repository git clone https://github.com/gasolin/todomd-cli.git cd todomd-cli # Install dependencies npm install # Build TypeScript npm run build # Run in development mode npm run dev # Link for global usage npm link ``` -------------------------------- ### Initialize todomd Directory Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Initialize a new todomd directory to start managing your tasks. ```bash todomd init ``` -------------------------------- ### Install todomd-cli Globally Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Install the todomd-cli package globally using npm for command-line access. ```bash npm install -g @gasolin/todomd-cli ``` -------------------------------- ### Build and Link todomd-cli Locally Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Clone the repository, install dependencies, build the project, and link it locally for development or testing. ```bash git clone https://github.com/gasolin/todomd-cli.git cd todomd-cli npm install npm run build npm link ``` -------------------------------- ### Start MCP Server Source: https://context7.com/gasolin/todomd-cli/llms.txt Command to run the todomd-cli as a Model Context Protocol server for AI integration. ```bash # Run as MCP server todomd serve ``` -------------------------------- ### Post-Completion Hook Script Example Source: https://context7.com/gasolin/todomd-cli/llms.txt Example bash script to be executed when a task is marked as done, demonstrating access to the task description via an environment variable. ```bash #!/bin/bash # ~/bin/task_done_notify # Task description is available via TASK_DESCRIPTION environment variable echo "Task completed: $TASK_DESCRIPTION" >> ~/task_log.txt # Example: Append to Logseq daily journal # LOGSEQ_DIR="~/Documents/Logseq" # JOURNAL_FILE="$LOGSEQ_DIR/journals/$(date +'%Y_%m_%d').md" # echo "- DONE $TASK_DESCRIPTION" >> "$JOURNAL_FILE" ``` -------------------------------- ### Add Tasks with Metadata Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Examples of adding new tasks with various metadata like priority, context, project, and due dates. ```bash # Add a high-priority work task with due date todomd add "(A) Prepare quarterly report @office +work due:2025-08-15" ``` ```bash # Add a recurring personal task todomd add "Exercise for 30 minutes @gym +health rec:d" ``` ```bash # Add a task with subtasks (note: subtasks must be added manually to the file) todomd add "Plan vacation +personal" # Then edit todo.md to add: # - [ ] Plan vacation +personal # - [ ] Research destinations # - [ ] Book flights # - [ ] Reserve hotel ``` -------------------------------- ### TodoMD Default File Structure Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Shows the default directory structure created by `todomd init`, including the main task file, archive, and configuration example. ```bash ~/.todomd/ # Default directory (or your TODOMD_DIR) ├── todo.md # Main task file ├── done.md # Completed tasks archive └── .env.example # Configuration example ``` -------------------------------- ### Markdown Task Format Example Source: https://context7.com/gasolin/todomd-cli/llms.txt Illustrates the structure and metadata supported within a Markdown todo file. ```markdown # todo.md file format - [ ] (A) High priority task +project @context due:2025-08-10 cr:2025-01-15 - [ ] Regular task with metadata +work @office - [~] Task in progress - [x] Completed task cm:2025-01-20 - [-] Cancelled task # Nested/Subtasks (hierarchical structure) - [ ] Parent task +project - [ ] Subtask 1 - [ ] Subtask 2 - [ ] Sub-subtask ``` -------------------------------- ### MCP Server Configuration (npx) Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Alternative MCP server configuration using `npx` for running without global installation. Only `TODOMD_DIR` is required. ```json { "mcpServers": { "todomd": { "command": "npx", "args": ["-y", "@gasolin/todomd-cli", "serve"], "env": { "TODOMD_DIR": "/path/to/your/todos" } } } } ``` -------------------------------- ### Modify Task Metadata Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Examples of modifying existing tasks, including setting priority, due dates using natural language, marking as done, and adding contexts. ```bash # Set priority for existing task todomd pri 1 A ``` ```bash # Set a due date using natural language todomd due 1 "next tuesday" ``` ```bash # Mark task as done todomd done 1 ``` ```bash # Add context to existing task todomd context 2 home ``` -------------------------------- ### Initialize TodoMD Directory Source: https://context7.com/gasolin/todomd-cli/llms.txt Creates a new todomd directory with default todo.md and done.md files. Can be used with a custom directory path specified via the TODOMD_DIR environment variable. ```bash # Initialize default directory (~/.todomd) todomd init ``` ```bash # With custom directory via environment variable export TODOMD_DIR="$HOME/Documents/todos" todomd init ``` -------------------------------- ### Search and List Tasks Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Demonstrates how to search for tasks by keyword and how to output results in JSON format for automation. ```bash # Search for tasks todomd list "report" ``` ```bash # Get JSON output for automation todomd list --json ``` -------------------------------- ### MCP Server Configuration (Default) Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Configuration for acting as an MCP server with default environment variables. `TODOMD_DIR` is required. ```json { "mcpServers": { "todomd": { "command": "todomd", "args": ["serve"], "env": { "TODOMD_DIR": "/path/to/your/todos", "TODOMD_WHEN_DONE": "/path/to/your/tools/append_journal.sh", "TODOMD_JOURNAL_PATH": "/path/to/your/logseq/journals", "TODOMD_NEAR_DAYS": "3" } } } } ``` -------------------------------- ### Claude Desktop MCP Server Configuration Source: https://context7.com/gasolin/todomd-cli/llms.txt JSON configuration for setting up todomd-cli as an MCP server in Claude Desktop, including environment variables. ```json { "mcpServers": { "todomd": { "command": "todomd", "args": ["serve"], "env": { "TODOMD_DIR": "/path/to/your/todos", "TODOMD_WHEN_DONE": "/path/to/your/tools/append_journal.sh", "TODOMD_NEAR_DAYS": "3" } } } } ``` -------------------------------- ### Environment Variables Configuration Source: https://context7.com/gasolin/todomd-cli/llms.txt Demonstrates setting environment variables in shell profiles or a .env file to configure todomd-cli behavior. ```bash # Set in shell profile (~/.bashrc, ~/.zshrc) export TODOMD_DIR="$HOME/Documents/todos" export TODOMD_NEAR_DAYS=3 export TODOMD_WHEN_DONE="$HOME/bin/task_done_notify" # Or create a .env file in project directory echo "TODOMD_DIR=/path/to/your/todos" > .env echo "TODOMD_NEAR_DAYS=3" >> .env echo "TODOMD_WHEN_DONE=~/bin/task_done_notify" >> .env ``` -------------------------------- ### Basic todomd-cli Operations Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Common commands for managing tasks, including listing, adding, completing, and deleting. ```bash todomd list, ls [search terms] ``` ```bash todomd add, a ``` ```bash todomd done, do ``` ```bash todomd undone, ud ``` ```bash todomd delete, rm, del ``` -------------------------------- ### Configure todomd-cli with Environment Variables Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Set environment variables in your shell profile or a .env file to customize the todo directory and other options like highlighting near-due tasks. ```bash # In your shell profile (~/.bashrc, ~/.zshrc, etc.) export TODOMD_DIR="$HOME/Documents/todos" export TODOMD_NEAR_DAYS=3 # Highlight tasks due in the next 3 days (default is 2) ``` ```bash # Or create a .env file in your project directory echo "TODOMD_DIR=/path/to/your/todos" > .env echo "TODOMD_NEAR_DAYS=3" >> .env echo "TODOMD_WHEN_DONE=~/bin/task_done_notify" >> .env ``` -------------------------------- ### MCP Tools Available Source: https://context7.com/gasolin/todomd-cli/llms.txt Lists the three tools exposed by the MCP server for AI assistants: list_tasks, add_task, and complete_task, along with their input/output specifications. ```typescript // list_tasks - Returns all tasks as structured JSON // Input: none // Output: Array of Task objects with isNearDue flag // add_task - Adds a new task // Input: { description: string } // Output: Success/error message // complete_task - Marks a task as completed // Input: { id: number } // Output: Success/error message ``` -------------------------------- ### Execute Custom Command on Task Completion Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Configure the TODOMD_WHEN_DONE environment variable to run a custom script when a task is marked as done. The task description is passed via the TASK_DESCRIPTION environment variable. ```bash # Example script ~/bin/task_done_notify #!/bin/bash echo "Task completed: $TASK_DESCRIPTION" >> ~/task_log.txt ``` ```bash # Example script tools/append_journal.sh for Logseq #!/bin/bash # This script appends the content of TASK_DESCRIPTION to today's Logseq journal. LOGSEQ_DIR="~/Documents/Logseq" JOURNAL_FILE="$LOGSEQ_DIR/journals/$(date +'%Y_%m_%d').md" echo "- DONE $TASK_DESCRIPTION" >> "$JOURNAL_FILE" ``` ```bash TODOMD_WHEN_DONE=~/tools/append_journal.sh ``` -------------------------------- ### Work with Specific Files Source: https://context7.com/gasolin/todomd-cli/llms.txt Allows operating on a specific `todo.md` file or a directory containing `todo.md` files, overriding the default `TODOMD_DIR` location. ```bash # List tasks from a specific file todomd /path/to/project/todo.md ``` ```bash # List tasks from todo.md in a specific directory todomd /path/to/project/ ``` -------------------------------- ### List All Tasks Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Display all tasks, including completed and cancelled ones. Subtasks are shown in a tree structure. ```bash todomd list ``` -------------------------------- ### Work with Specific Files or Directories Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Operate on specific todomd files or directories by providing their paths as arguments to the commands. ```bash # List tasks from a specific file todomd path/to/another/todo.md ``` ```bash # List tasks from todo.md in a specific directory todomd path/to/a/project/ ``` -------------------------------- ### TodoMD Task Metadata Syntax Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Illustrates the standard Markdown task list format with additional metadata for priority, projects, contexts, dates, and recurrence. ```markdown - [ ] (A) Task description @context +project due:2025-08-10 rec:w - [ ] Subtask 1 - [ ] Subtask 2 - [x] Completed task cm:2025-08-01 - [-] Cancelled task ``` -------------------------------- ### List Tasks by Project Source: https://context7.com/gasolin/todomd-cli/llms.txt Filters tasks by a specific project or lists all available projects. Aids in managing and viewing tasks associated with different projects. ```bash # List all projects todomd listproj todomd lsproj ``` ```bash # List tasks with specific project todomd listproj work todomd lsproj personal ``` -------------------------------- ### List Tasks by Context Source: https://context7.com/gasolin/todomd-cli/llms.txt Filters tasks by a specific context or lists all available contexts. Useful for organizing and viewing tasks related to specific environments or situations. ```bash # List all contexts todomd listcon todomd lsc ``` ```bash # List tasks with specific context todomd listcon office todomd lsc home ``` -------------------------------- ### Add Tasks to todomd Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Add new tasks to your todomd file. Tasks can include metadata like context (@home), project (+personal), and due dates. ```bash todomd add "Buy groceries @home +personal due:2025-08-10" ``` ```bash todomd add "(A) Important meeting preparation @office +work" ``` ```bash todomd add "Call dentist for appointment" ``` -------------------------------- ### List Tasks Source: https://context7.com/gasolin/todomd-cli/llms.txt Displays all tasks with colorized output, hierarchical structure, and status indicators. Can filter tasks by keyword or output results in JSON format for automation. ```bash # List all tasks todomd list ``` ```bash # Using alias todomd ls ``` ```bash # Search/filter tasks by keyword todomd list "report" todomd ls meeting ``` ```bash # Output as JSON for automation todomd list --json ``` -------------------------------- ### TodoParser Class Source: https://context7.com/gasolin/todomd-cli/llms.txt Parses and serializes Markdown task format. ```APIDOC ## TodoParser Class ### Description Parses and serializes Markdown task format. ### Usage ```typescript import { TodoParser } from './lib/TodoParser' import { Task, Status } from './types/Task' const parser = new TodoParser() // Parse markdown content const content = ` - [ ] (A) Important task +work @office due:2025-08-15 - [x] Completed task cm:2025-01-20 - [ ] Regular task - [ ] Subtask 1 - [ ] Subtask 2 ` const tasks: Task[] = parser.parse(content) // Parse single task line const task = parser.parseTaskLine('- [ ] (B) Single task +project', 0, 0) // Serialize tasks back to markdown const markdown = parser.serialize(tasks) // Serialize for archive (without preserving original lines) const archiveMarkdown = parser.serialize(tasks, true) ``` ### Task Object Structure ```json { "id": 0, "description": "Important task", "status": "todo", "priority": "A", "projects": ["work"], "contexts": ["office"], "dueDate": "2025-08-15", "level": 0, "lineNumber": 1 } ``` ``` -------------------------------- ### Metadata Attributes Reference Source: https://context7.com/gasolin/todomd-cli/llms.txt Lists and explains the supported metadata attributes for tasks, including custom key-value pairs. ```markdown # Supported metadata - [ ] Task description +project @context due:2025-08-10 cr:2025-01-15 rec:w # Attribute reference: # +project - Project name (multiple allowed) # @context - Context/location (multiple allowed) # #tag - Tag for categorization # due:DATE - Due date (YYYY-MM-DD) # cr:DATE - Creation date (auto-added) # cm:DATE - Completion date (auto-added when done) # rec:d/w/m/y - Recurrence (daily/weekly/monthly/yearly) # key:value - Custom attributes ``` -------------------------------- ### Add Task to Specific File Source: https://context7.com/gasolin/todomd-cli/llms.txt Use this command to add a new task to a specified todo.md file. ```bash todomd /path/to/project/todo.md add "Project-specific task" ``` -------------------------------- ### Add Project to Task Source: https://context7.com/gasolin/todomd-cli/llms.txt Associates a task with one or more projects for better organization and filtering. ```bash # Add project to task #3 todomd project 3 work ``` ```bash # Using alias todomd proj 3 personal ``` -------------------------------- ### Execute CLI Commands with Commander Source: https://context7.com/gasolin/todomd-cli/llms.txt The Commander class facilitates high-level CLI operations. Instantiate it with directory and file paths, then use the 'run' method to execute various commands like listing, adding, or completing tasks. ```typescript import { Commander } from './commands/Commander' const commander = new Commander( '/path/to/tododir', 'todo.md', // optional 'done.md' // optional ) // Execute commands and get results const listResult = await commander.run('list', []) // Returns: Task[] or string message const addResult = await commander.run('add', ['New task +project']) // Returns: 'Task added successfully' const doneResult = await commander.run('done', ['1']) // Returns: 'Task completed' const searchResult = await commander.run('list', ['keyword']) // Returns: Task[] matching search ``` -------------------------------- ### Mark Task as Complete Source: https://github.com/gasolin/todomd-cli/blob/main/README.md Mark a task as completed using its ID. ```bash todomd done 1 ``` -------------------------------- ### Set Task as In Progress Source: https://context7.com/gasolin/todomd-cli/llms.txt Marks a task as currently being worked on, providing better visibility into active tasks. ```bash # Set task #2 as in progress todomd inprogress 2 ``` ```bash # Using alias todomd ip 2 ``` -------------------------------- ### Add a New Task Source: https://context7.com/gasolin/todomd-cli/llms.txt Adds a new task to the todo list. Supports adding metadata such as priority, projects, contexts, due dates, and recurrence patterns directly in the command. ```bash # Add a simple task todomd add "Buy groceries" ``` ```bash # Add task with priority (A-Z, A being highest) todomd add "(A) Important meeting preparation" ``` ```bash # Add task with project and context todomd add "Review pull requests +work @office" ``` ```bash # Add task with due date todomd add "Submit report due:2025-08-15" ``` ```bash # Add task with all metadata todomd add "(B) Prepare quarterly report +work @office due:2025-08-15" ``` ```bash # Using alias todomd a "Quick task note" ``` -------------------------------- ### Archive Completed Tasks Source: https://context7.com/gasolin/todomd-cli/llms.txt Moves all tasks marked as done from the `todo.md` file to the `done.md` file, helping to keep the active task list clean. ```bash todomd archive ``` -------------------------------- ### Mark Task as Done Source: https://context7.com/gasolin/todomd-cli/llms.txt Completes a task by its ID. Optionally, a post-completion script can be triggered if defined via the TODOMD_WHEN_DONE environment variable. ```bash # Mark task #1 as done todomd done 1 ``` ```bash # Using alias todomd do 1 ``` ```bash # With post-completion hook (configured via environment) export TODOMD_WHEN_DONE="$HOME/bin/task_done_notify" todomd done 2 ``` -------------------------------- ### TodoManager Class Initialization and Basic Operations Source: https://context7.com/gasolin/todomd-cli/llms.txt Core TypeScript class for programmatic task management, including initialization, loading, adding, updating, deleting, and archiving tasks. ```typescript import { TodoManager } from './lib/TodoManager' import { Status } from './types/Task' // Initialize manager const manager = new TodoManager( '/path/to/tododir', // todoDir 'todo.md', // todoFile (optional, default: 'todo.md') 'done.md' // doneFile (optional, default: 'done.md') ) // Initialize directory and files await manager.init() // Load tasks from file const tasks = await manager.loadTasks() // Get loaded tasks const currentTasks = manager.getTasks() // Add a new task await manager.addTask('New task +project @context due:2025-08-15') // Update task properties await manager.updateTask(0, { status: Status.Done, priority: 'A', projects: ['work', 'urgent'], contexts: ['office'], dueDate: '2025-08-20' }) // Delete a task by index await manager.deleteTask(0) // Archive completed tasks to done.md await manager.archive() // Get todo file path const filePath = manager.getTodoFilePath() ``` -------------------------------- ### Due Date Parser Source: https://context7.com/gasolin/todomd-cli/llms.txt Parses natural language dates into Date objects. ```APIDOC ## Due Date Parser ### Description Parses natural language dates into Date objects. ### Usage ```typescript import { getDueDate, isNearDue } from './lib/DueDate' // Parse various date formats getDueDate('2025-08-15') // Date object for Aug 15, 2025 getDueDate('today') // Current date getDueDate('tomorrow') // Tomorrow's date getDueDate('yesterday') // Yesterday's date getDueDate('monday') // Next upcoming Monday getDueDate('this friday') // Friday of current week getDueDate('next friday') // Friday of next week getDueDate('in 2 days') // 2 days from now getDueDate('in 3 weeks') // 3 weeks from now getDueDate('in 1 month') // 1 month from now getDueDate('in 1 year') // 1 year from now // Check if due date is near (within TODOMD_NEAR_DAYS, default 2) isNearDue('2025-01-20') // true/false based on proximity ``` ``` -------------------------------- ### Commander Class Source: https://context7.com/gasolin/todomd-cli/llms.txt High-level command executor for CLI operations. ```APIDOC ## Commander Class ### Description High-level command executor for CLI operations. ### Usage ```typescript import { Commander } from './commands/Commander' const commander = new Commander( '/path/to/tododir', 'todo.md', // optional 'done.md' // optional ) // Execute commands and get results const listResult = await commander.run('list', []) // Returns: Task[] or string message const addResult = await commander.run('add', ['New task +project']) // Returns: 'Task added successfully' const doneResult = await commander.run('done', ['1']) // Returns: 'Task completed' const searchResult = await commander.run('list', ['keyword']) // Returns: Task[] matching search ``` ### Available Commands - 'init' - 'add/a' - 'list/ls' - 'done/do' - 'undone/ud' - 'inprogress/ip' - 'cancel/x' - 'delete/rm/del' - 'edit/e/replace' - 'priority/pri' - 'project/proj' - 'context/ctx' - 'due' - 'listcon/lsc' - 'listproj/lsproj' - 'archive' ``` -------------------------------- ### Mark Task as Incomplete Source: https://context7.com/gasolin/todomd-cli/llms.txt Reverts a task that was previously marked as done back to an incomplete status. ```bash # Mark task #3 as incomplete todomd undone 3 ``` ```bash # Using alias todomd ud 3 ``` -------------------------------- ### Task Interface Source: https://context7.com/gasolin/todomd-cli/llms.txt TypeScript interface defining the task structure. ```APIDOC ## Task Interface ### Description TypeScript interface defining the task structure. ### Interface Definition ```typescript enum Status { Todo = 'todo', InProgress = 'inprogress', Done = 'done', Cancelled = 'cancelled' } interface Task { id?: number lineNumber?: number description: string status: Status priority?: string // A-Z projects?: string[] // +project contexts?: string[] // @context tags?: string[] // #tag creationDate?: string // cr:YYYY-MM-DD completionDate?: string // cm:YYYY-MM-DD dueDate?: string // due:YYYY-MM-DD recurrence?: string // rec:d/w/m/y customAttributes?: Record level: number // indentation level for subtasks parent?: number // parent task ID children?: number[] // child task IDs rawLine?: string // original line from markdown } ``` ``` -------------------------------- ### Set Due Date Source: https://context7.com/gasolin/todomd-cli/llms.txt Assigns a due date to a task. Supports both ISO 8601 format and natural language date parsing. ```bash # Set due date using ISO format todomd due 1 2025-08-15 ``` ```bash # Natural language dates todomd due 1 today todomd due 2 tomorrow todomd due 3 "next friday" todomd due 4 "this monday" todomd due 5 "in 2 weeks" todomd due 6 "in 3 days" ``` -------------------------------- ### Set Task Priority Source: https://context7.com/gasolin/todomd-cli/llms.txt Assigns a priority level (A-Z, with A being the highest) to a specific task. ```bash # Set priority A for task #1 todomd priority 1 A ``` ```bash # Using alias todomd pri 1 B ``` -------------------------------- ### Parse Natural Language Dates with DueDate Utilities Source: https://context7.com/gasolin/todomd-cli/llms.txt Utilize the getDueDate and isNearDue functions for parsing various natural language date formats into Date objects and checking if a date is near the current date. Supports relative dates like 'today', 'tomorrow', and 'in X days'. ```typescript import { getDueDate, isNearDue } from './lib/DueDate' // Parse various date formats getDueDate('2025-08-15') // Date object for Aug 15, 2025 getDueDate('today') // Current date getDueDate('tomorrow') // Tomorrow's date getDueDate('yesterday') // Yesterday's date getDueDate('monday') // Next upcoming Monday getDueDate('this friday') // Friday of current week getDueDate('next friday') // Friday of next week getDueDate('in 2 days') // 2 days from now getDueDate('in 3 weeks') // 3 weeks from now getDueDate('in 1 month') // 1 month from now getDueDate('in 1 year') // 1 year from now // Check if due date is near (within TODOMD_NEAR_DAYS, default 2) isNearDue('2025-01-20') // true/false based on proximity ``` -------------------------------- ### Add Context to Task Source: https://context7.com/gasolin/todomd-cli/llms.txt Adds a context tag to a task, useful for indicating location or specific conditions under which the task should be performed. ```bash # Add context to task #2 todomd context 2 office ``` ```bash # Using alias todomd ctx 2 home ``` -------------------------------- ### Parse and Serialize Markdown Tasks with TodoParser Source: https://context7.com/gasolin/todomd-cli/llms.txt Use the TodoParser class to parse Markdown content into task objects and serialize task objects back into Markdown format. It supports parsing multi-line content and individual task lines, as well as archiving tasks. ```typescript import { TodoParser } from './lib/TodoParser' import { Task, Status } from './types/Task' const parser = new TodoParser() // Parse markdown content const content = ` - [ ] (A) Important task +work @office due:2025-08-15 - [x] Completed task cm:2025-01-20 - [ ] Regular task - [ ] Subtask 1 - [ ] Subtask 2 ` const tasks: Task[] = parser.parse(content) // Parse single task line const task = parser.parseTaskLine('- [ ] (B) Single task +project', 0, 0) // Serialize tasks back to markdown const markdown = parser.serialize(tasks) // Serialize for archive (without preserving original lines) const archiveMarkdown = parser.serialize(tasks, true) ``` -------------------------------- ### Edit Task Description Source: https://context7.com/gasolin/todomd-cli/llms.txt Updates the description text of an existing task identified by its ID. ```bash # Edit task #2 with new description todomd edit 2 "Updated task description with new details" ``` ```bash # Using aliases todomd e 2 "New description" todomd replace 2 "Another description" ``` -------------------------------- ### Cancel a Task Source: https://context7.com/gasolin/todomd-cli/llms.txt Marks a task as cancelled. This action does not delete the task but indicates it is no longer relevant. ```bash # Cancel task #4 todomd cancel 4 ``` ```bash # Using alias todomd x 4 ``` -------------------------------- ### Delete a Task Source: https://context7.com/gasolin/todomd-cli/llms.txt Permanently removes a task from the todo list. Use with caution as this action is irreversible. ```bash # Delete task #5 todomd delete 5 ``` ```bash # Using aliases todomd rm 5 todomd del 5 ``` -------------------------------- ### Task Status Characters Source: https://context7.com/gasolin/todomd-cli/llms.txt Defines the characters used to represent different task statuses in Markdown. ```markdown - [ ] Incomplete task (todo) - [~] In progress task - [x] Completed task (done) - [-] Cancelled task ``` -------------------------------- ### Define Task Structure with TypeScript Interface Source: https://context7.com/gasolin/todomd-cli/llms.txt The Task interface defines the structure for representing tasks, including properties for status, priority, dates, projects, contexts, and custom attributes. The Status enum specifies possible task states. ```typescript enum Status { Todo = 'todo', InProgress = 'inprogress', Done = 'done', Cancelled = 'cancelled' } interface Task { id?: number lineNumber?: number description: string status: Status priority?: string // A-Z projects?: string[] // +project contexts?: string[] // @context tags?: string[] // #tag creationDate?: string // cr:YYYY-MM-DD completionDate?: string // cm:YYYY-MM-DD dueDate?: string // due:YYYY-MM-DD recurrence?: string // rec:d/w/m/y customAttributes?: Record level: number // indentation level for subtasks parent?: number // parent task ID children?: number[] // child task IDs rawLine?: string // original line from markdown } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.