名称: cognary-tasks
描述: 通过 cognary-cli 管理任务列表。支持列出、添加、更新、完成、取消完成和删除任务。当用户提及任务、待办事项、任务列表、提醒类任务或行动项跟踪时触发。
通过 cognary-cli tasks 管理任务。请始终使用 --json 参数以获取可解析的输出。
如果尚未安装 cognary-cli,请先安装:
npm install -g cognary-cli
必须设置 COGNARY_API_KEY 环境变量。如果调用因认证失败而报错,请告知用户:
cognary-cli tasks list [--status active|completed|all] [--category <cat>] [--priority High|Medium|Low] [--search <query>] [--sort createdAt|updatedAt|dueDate|priority|title] [--order asc|desc] [--limit <n>] [--page <n>] [--active-only] [--completed-limit <n>] --json
默认:列出所有任务,按创建时间降序排序,限制 20 条。
cognary-cli tasks add "<title>" [--notes "<notes>"] [--category "<cat>"] [--priority High|Medium|Low] [--due-date "<date>"] --json
cognary-cli tasks get <id> --json
cognary-cli tasks update <id> [--title "<title>"] [--notes "<notes>"] [--category "<cat>"] [--priority High|Medium|Low] [--due-date "<date>"] --json
cognary-cli tasks complete <id> --json
cognary-cli tasks uncomplete <id> --json
cognary-cli tasks delete <id> --json