@doist/todoist-cli 1.16.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/update.d.ts +6 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +81 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/skills/content.d.ts +1 -1
- package/dist/lib/skills/content.d.ts.map +1 -1
- package/dist/lib/skills/content.js +7 -0
- package/dist/lib/skills/content.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAqCnC,wBAAsB,YAAY,CAAC,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAoD9E;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAM5D"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import packageJson from '../../package.json' with { type: 'json' };
|
|
4
|
+
import { withSpinner } from '../lib/spinner.js';
|
|
5
|
+
const PACKAGE_NAME = '@doist/todoist-cli';
|
|
6
|
+
const REGISTRY_URL = `https://registry.npmjs.org/${PACKAGE_NAME}/latest`;
|
|
7
|
+
async function fetchLatestVersion() {
|
|
8
|
+
const response = await fetch(REGISTRY_URL);
|
|
9
|
+
if (!response.ok) {
|
|
10
|
+
throw new Error(`Registry request failed (HTTP ${response.status})`);
|
|
11
|
+
}
|
|
12
|
+
const data = (await response.json());
|
|
13
|
+
return data.version;
|
|
14
|
+
}
|
|
15
|
+
function detectPackageManager() {
|
|
16
|
+
const execPath = process.env.npm_execpath ?? '';
|
|
17
|
+
if (execPath.includes('pnpm'))
|
|
18
|
+
return 'pnpm';
|
|
19
|
+
return 'npm';
|
|
20
|
+
}
|
|
21
|
+
function runInstall(pm) {
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
const child = spawn(pm, ['install', '-g', `${PACKAGE_NAME}@latest`], {
|
|
24
|
+
stdio: 'inherit',
|
|
25
|
+
});
|
|
26
|
+
child.on('error', reject);
|
|
27
|
+
child.on('close', (code) => resolve(code ?? 1));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export async function updateAction(options) {
|
|
31
|
+
const currentVersion = packageJson.version;
|
|
32
|
+
let latestVersion;
|
|
33
|
+
try {
|
|
34
|
+
latestVersion = await withSpinner({ text: 'Checking for updates...', color: 'blue' }, fetchLatestVersion);
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
38
|
+
console.error(chalk.red('Error:'), `Failed to check for updates: ${message}`);
|
|
39
|
+
process.exitCode = 1;
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (currentVersion === latestVersion) {
|
|
43
|
+
console.log(chalk.green('✓'), `Already up to date (v${currentVersion})`);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
console.log(`Update available: ${chalk.dim(`v${currentVersion}`)} → ${chalk.green(`v${latestVersion}`)}`);
|
|
47
|
+
if (options.check) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const pm = detectPackageManager();
|
|
51
|
+
console.log(chalk.dim(`Updating to v${latestVersion}...`));
|
|
52
|
+
try {
|
|
53
|
+
const exitCode = await runInstall(pm);
|
|
54
|
+
if (exitCode !== 0) {
|
|
55
|
+
console.error(chalk.red('Error:'), `${pm} exited with code ${exitCode}`);
|
|
56
|
+
process.exitCode = 1;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
if (error instanceof Error && 'code' in error && error.code === 'EACCES') {
|
|
62
|
+
console.error(chalk.red('Error:'), 'Permission denied. Try running with sudo:');
|
|
63
|
+
console.error(chalk.dim(` sudo ${pm} install -g ${PACKAGE_NAME}@latest`));
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
67
|
+
console.error(chalk.red('Error:'), `Install failed: ${message}`);
|
|
68
|
+
}
|
|
69
|
+
process.exitCode = 1;
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
console.log(chalk.green('✓'), `Updated to v${latestVersion}`);
|
|
73
|
+
}
|
|
74
|
+
export function registerUpdateCommand(program) {
|
|
75
|
+
program
|
|
76
|
+
.command('update')
|
|
77
|
+
.description('Update the CLI to the latest version')
|
|
78
|
+
.option('--check', 'Check for updates without installing')
|
|
79
|
+
.action(updateAction);
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,WAAW,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,MAAM,YAAY,GAAG,oBAAoB,CAAA;AACzC,MAAM,YAAY,GAAG,8BAA8B,YAAY,SAAS,CAAA;AAMxE,KAAK,UAAU,kBAAkB;IAC7B,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,YAAY,CAAC,CAAA;IAC1C,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,iCAAiC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAA;IACxE,CAAC;IACD,MA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O,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,EAAE,eAAe,YAAY,SAAS,CAAC,CAAC,CAAA;QAC9E,CAAC;aAAM,CAAC;YACJ,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YACtE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,mBAAmB,OAAO,EAAE,CAAC,CAAA;QACpE,CAAC;QACD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAA;QACpB,OAAM;IACV,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,eAAe,aAAa,EAAE,CAAC,CAAA;AACjE,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IAClD,OAAO;SACF,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,sCAAsC,CAAC;SACnD,MAAM,CAAC,SAAS,EAAE,sCAAsC,CAAC;SACzD,MAAM,CAAC,YAAY,CAAC,CAAA;AAC7B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -98,6 +98,10 @@ const commands = {
|
|
|
98
98
|
'View a Todoist entity or page by URL',
|
|
99
99
|
async () => (await import('./commands/view.js')).registerViewCommand,
|
|
100
100
|
],
|
|
101
|
+
update: [
|
|
102
|
+
'Update the CLI to the latest version',
|
|
103
|
+
async () => (await import('./commands/update.js')).registerUpdateCommand,
|
|
104
|
+
],
|
|
101
105
|
};
|
|
102
106
|
// Register placeholders so --help lists all commands
|
|
103
107
|
for (const [name, [description]] of Object.entries(commands)) {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAgB,OAAO,EAAE,MAAM,WAAW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CAAA;QACvE,IAAI,GAAG,KAAK,CAAC,CAAC;YAAG,OAAO,CAAC,QAAsB,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QAC9D,MAAM,MAAM,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;QAEvC,iBAAiB,EAAE,CAAA;QACnB,IAAI,CAAC;YACD,MAAM,QAAQ,GAAG,MAAM,MAAM,EAAE,CAAA;YAC/B,QAAQ,CAAC,OAAO,CAAC,CAAA;QACrB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,gBAAgB,EAAE,CAAA;YAClB,MAAM,GAAG,CAAA;QACb,CAAC;IACL,CAAC;AACL,CAAC;AAED,uEAAuE;AACvE,gBAAgB,EAAE,CAAA;AAElB,OAAO;KACF,UAAU,EAAE;KACZ,KAAK,CAAC,CAAC,GAAU,EAAE,EAAE;IAClB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IAC1B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC,CAAC;KACD,OAAO,CAAC,GAAG,EAAE,CAAC,gBAAgB,EAAE,CAAC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const SKILL_NAME = "todoist";
|
|
2
2
|
export declare const SKILL_DESCRIPTION = "Manage Todoist tasks, projects, labels, comments, and more via the td CLI";
|
|
3
|
-
export declare const SKILL_CONTENT = "# Todoist CLI (td)\n\nUse this skill when the user wants to interact with their Todoist tasks.\n\n## Quick Reference\n\n- `td today` - Tasks due today and overdue\n- `td inbox` - Inbox tasks\n- `td upcoming` - Tasks due in next N days\n- `td completed` - Recently completed tasks\n- `td task add \"content\"` - Add a task\n- `td task list` - List tasks with filters\n- `td task complete <ref>` - Complete a task\n- `td project list` - List projects\n- `td label list` - List labels\n- `td filter list/view` - Manage and use saved filters\n- `td workspace list` - List workspaces\n- `td activity` - Activity logs\n- `td notification list` - Notifications\n- `td reminder add` - Task reminders\n- `td stats` - Productivity stats\n- `td settings view` - User settings\n- `td completion install` - Install shell completions\n- `td view <url>` - View supported Todoist entities/pages by URL\n\n## Output Formats\n\nAll list commands support:\n- `--json` - JSON output (essential fields)\n- `--ndjson` - Newline-delimited JSON (streaming)\n- `--full` - Include all fields in JSON\n- `--raw` - Disable markdown rendering\n\n## Shared List Options\n\nMost list commands also support:\n- `--limit <n>` - Limit number of results\n- `--all` - Fetch all results (no limit)\n- `--cursor <cursor>` - Continue from pagination cursor\n- `--show-urls` - Show web app URLs for each item\n\n## Global Options\n\n- `--no-spinner` - Disable loading animations\n- `--progress-jsonl` - Machine-readable progress events (JSONL to stderr)\n- `-v, --verbose` - Verbose output to stderr (repeat: -v info, -vv detail, -vvv debug, -vvvv trace)\n\n## References\n\nTasks, projects, labels, and filters can be referenced by:\n- Name (fuzzy matched within context)\n- `id:xxx` - Explicit ID\n- Todoist URL - Paste directly from the web app (e.g., `https://app.todoist.com/app/task/buy-milk-8Jx4mVr72kPn3QwB` or `https://app.todoist.com/app/project/work-2pN7vKx49mRq6YhT`)\n\n## Priority Mapping\n\n- p1 = Highest priority (API value 4)\n- p2 = High priority (API value 3)\n- p3 = Medium priority (API value 2)\n- p4 = Lowest priority (API value 1, default)\n\n## Commands\n\n### Today\n```bash\ntd today # Due today + overdue\ntd today --json # JSON output\ntd today --workspace \"Work\" # Filter to workspace\ntd today --personal # Personal projects only\ntd today --any-assignee # Include tasks assigned to others\n```\n\n### Inbox\n```bash\ntd inbox # Inbox tasks\ntd inbox --priority p1 # Filter by priority\ntd inbox --due today # Filter by due date\n```\n\n### Upcoming\n```bash\ntd upcoming # Next 7 days\ntd upcoming 14 # Next 14 days\ntd upcoming --workspace \"Work\" # Filter to workspace\ntd upcoming --personal # Personal projects only\ntd upcoming --any-assignee # Include tasks assigned to others\n```\n\n### Completed\n```bash\ntd completed # Completed today\ntd completed --since 2024-01-01 --until 2024-01-31\ntd completed --project \"Work\" # Filter by project\n```\n\n### Task Management\n```bash\n# List with filters\ntd task list --project \"Work\"\ntd task list --label \"urgent\" --priority p1\ntd task list --due today\ntd task list --filter \"today | overdue\"\ntd task list --assignee me\ntd task list --assignee \"john@example.com\"\ntd task list --unassigned\ntd task list --workspace \"Work\"\ntd task list --personal\ntd task list --parent \"Parent task\"\n\n# View, complete, uncomplete\ntd task view \"task name\"\ntd task complete \"task name\"\ntd task complete id:123456\ntd task complete \"task name\" --forever # Stop recurrence\ntd task uncomplete id:123456 # Reopen completed task\n\n# Add tasks\ntd task add \"New task\" --due \"tomorrow\" --priority p2\ntd task add \"Task\" --deadline \"2024-03-01\" --project \"Work\"\ntd task add \"Task\" --duration 1h --section \"Planning\" --project \"Work\"\ntd task add \"Task\" --labels \"urgent,review\" --parent \"Parent task\"\ntd task add \"Task\" --description \"Details here\" --assignee me\n\n# Update\ntd task update \"task name\" --due \"next week\"\ntd task update \"task name\" --deadline \"2024-06-01\"\ntd task update \"task name\" --no-deadline\ntd task update \"task name\" --duration 2h\ntd task update \"task name\" --assignee \"john@example.com\"\ntd task update \"task name\" --unassign\n\n# Move\ntd task move \"task name\" --project \"Personal\"\ntd task move \"task name\" --section \"In Progress\"\ntd task move \"task name\" --parent \"Parent task\"\ntd task move \"task name\" --no-parent # Move to project root\ntd task move \"task name\" --no-section # Remove from section\n\n# Delete and browse\ntd task delete \"task name\" --yes\ntd task browse \"task name\" # Open in browser\n```\n\n### Projects\n```bash\ntd project list\ntd project list --personal # Personal projects only\ntd project view \"Project Name\"\ntd project collaborators \"Project Name\"\ntd project create --name \"New Project\" --color \"blue\"\ntd project update \"Project Name\" --favorite\ntd project archive \"Project Name\"\ntd project unarchive \"Project Name\"\ntd project delete \"Project Name\" --yes\ntd project browse \"Project Name\" # Open in browser\ntd project move \"Project Name\" --to-workspace \"Acme\"\ntd project move \"Project Name\" --to-workspace \"Acme\" --folder \"Engineering\"\ntd project move \"Project Name\" --to-workspace \"Acme\" --visibility team\ntd project move \"Project Name\" --to-personal\n# move requires --yes to confirm (without it, shows a dry-run preview)\n```\n\n### Labels\n```bash\ntd label list # Lists personal + shared labels\ntd label view \"urgent\" # View label details and tasks\ntd label view \"team-review\" # Works for shared labels too\ntd label create --name \"urgent\" --color \"red\"\ntd label update \"urgent\" --color \"orange\"\ntd label delete \"urgent\" --yes\ntd label browse \"urgent\" # Open in browser\n```\n\nNote: Shared labels (from collaborative projects) appear in `list` and can be viewed, but cannot be deleted/updated via the standard label commands since they have no ID.\n\n### Comments\n```bash\ntd comment list --task \"task name\"\ntd comment list --project \"Project Name\" -P # Project comments\ntd comment add --task \"task name\" --content \"Comment text\"\ntd comment add --task \"task name\" --content \"See attached\" --file ./report.pdf\ntd comment view id:123 # View full comment\ntd comment update id:123 --content \"Updated text\"\ntd comment delete id:123 --yes\ntd comment browse id:123 # Open in browser\n```\n\n### Sections\n```bash\ntd section list \"Work\" # List sections in project (or --project \"Work\")\ntd section list --project \"Work\" # Same, using named flag\ntd section create --project \"Work\" --name \"In Progress\"\ntd section update id:123 --name \"Done\"\ntd section delete id:123 --yes\ntd section browse id:123 # Open in browser\n```\n\n### Filters\n```bash\ntd filter list\ntd filter create --name \"Urgent work\" --query \"p1 & #Work\"\ntd filter view \"Urgent work\" # Show tasks matching filter (alias: show)\ntd filter update \"Urgent work\" --query \"p1 & #Work & today\"\ntd filter delete \"Urgent work\" --yes\ntd filter browse \"Urgent work\" # Open in browser\n```\n\n### Workspaces\n```bash\ntd workspace list\ntd workspace view \"Workspace Name\"\ntd workspace projects \"Workspace Name\" # or --workspace \"Workspace Name\"\ntd workspace users \"Workspace Name\" --role ADMIN,MEMBER # or --workspace \"...\"\n```\n\n### Activity\n```bash\ntd activity # Recent activity\ntd activity --since 2024-01-01 --until 2024-01-31\ntd activity --type task --event completed\ntd activity --project \"Work\"\ntd activity --by me\n```\n\n### Notifications\n```bash\ntd notification list\ntd notification list --unread\ntd notification list --type \"item_assign\"\ntd notification view id:123\ntd notification read --all --yes # Mark all as read\ntd notification accept id:123 # Accept share invitation\ntd notification reject id:123 # Reject share invitation\n```\n\n### Reminders\n```bash\ntd reminder list \"task name\" # or --task \"task name\"\ntd reminder add \"task name\" --before 30m # or --task \"task name\" --before 30m\ntd reminder add \"task name\" --at \"2024-01-15 10:00\"\ntd reminder update id:123 --before 1h\ntd reminder delete id:123 --yes\n```\n\n### Stats\n```bash\ntd stats # View karma and productivity\ntd stats --json\ntd stats goals --daily 10 --weekly 50\ntd stats vacation --on # Enable vacation mode\ntd stats vacation --off # Disable vacation mode\n```\n\n### Settings\n```bash\ntd settings view\ntd settings view --json\ntd settings update --timezone \"America/New_York\"\ntd settings update --time-format 24 --date-format intl\ntd settings themes # List available themes\n```\n\n### Shell Completions\n```bash\ntd completion install # Install tab completions (prompts for shell)\ntd completion install bash # Install for specific shell\ntd completion install zsh\ntd completion install fish\ntd completion uninstall # Remove completions\n```\n\n### View (URL Router)\n```bash\ntd view <todoist-url> # Auto-route to appropriate view by URL type\ntd view https://app.todoist.com/app/task/buy-milk-abc123\ntd view https://app.todoist.com/app/project/work-def456\ntd view https://app.todoist.com/app/label/urgent-ghi789\ntd view https://app.todoist.com/app/filter/work-tasks-jkl012\ntd view https://app.todoist.com/app/today\ntd view https://app.todoist.com/app/upcoming\ntd view <url> --json # JSON output for entity views\ntd view <url> --limit 25 --ndjson # Passthrough list options where supported\n```\n\n## Examples\n\n### Daily workflow\n```bash\ntd today --json | jq '.results | length' # Count today's tasks\ntd inbox --limit 5 # Quick inbox check\ntd upcoming # What's coming this week\ntd completed # What I finished today\n```\n\n### Filter by multiple criteria\n```bash\ntd task list --project \"Work\" --label \"urgent\" --priority p1\ntd task list --filter \"today & #Work\"\ntd task list --workspace \"Work\" --due today\n```\n\n### Complete tasks efficiently\n```bash\ntd task complete \"Review PR\"\ntd task complete id:123456789\ntd task uncomplete id:123456789 # Reopen if needed\n```\n";
|
|
3
|
+
export declare const SKILL_CONTENT = "# Todoist CLI (td)\n\nUse this skill when the user wants to interact with their Todoist tasks.\n\n## Quick Reference\n\n- `td today` - Tasks due today and overdue\n- `td inbox` - Inbox tasks\n- `td upcoming` - Tasks due in next N days\n- `td completed` - Recently completed tasks\n- `td task add \"content\"` - Add a task\n- `td task list` - List tasks with filters\n- `td task complete <ref>` - Complete a task\n- `td project list` - List projects\n- `td label list` - List labels\n- `td filter list/view` - Manage and use saved filters\n- `td workspace list` - List workspaces\n- `td activity` - Activity logs\n- `td notification list` - Notifications\n- `td reminder add` - Task reminders\n- `td stats` - Productivity stats\n- `td settings view` - User settings\n- `td completion install` - Install shell completions\n- `td view <url>` - View supported Todoist entities/pages by URL\n- `td update` - Self-update the CLI to the latest version\n\n## Output Formats\n\nAll list commands support:\n- `--json` - JSON output (essential fields)\n- `--ndjson` - Newline-delimited JSON (streaming)\n- `--full` - Include all fields in JSON\n- `--raw` - Disable markdown rendering\n\n## Shared List Options\n\nMost list commands also support:\n- `--limit <n>` - Limit number of results\n- `--all` - Fetch all results (no limit)\n- `--cursor <cursor>` - Continue from pagination cursor\n- `--show-urls` - Show web app URLs for each item\n\n## Global Options\n\n- `--no-spinner` - Disable loading animations\n- `--progress-jsonl` - Machine-readable progress events (JSONL to stderr)\n- `-v, --verbose` - Verbose output to stderr (repeat: -v info, -vv detail, -vvv debug, -vvvv trace)\n\n## References\n\nTasks, projects, labels, and filters can be referenced by:\n- Name (fuzzy matched within context)\n- `id:xxx` - Explicit ID\n- Todoist URL - Paste directly from the web app (e.g., `https://app.todoist.com/app/task/buy-milk-8Jx4mVr72kPn3QwB` or `https://app.todoist.com/app/project/work-2pN7vKx49mRq6YhT`)\n\n## Priority Mapping\n\n- p1 = Highest priority (API value 4)\n- p2 = High priority (API value 3)\n- p3 = Medium priority (API value 2)\n- p4 = Lowest priority (API value 1, default)\n\n## Commands\n\n### Today\n```bash\ntd today # Due today + overdue\ntd today --json # JSON output\ntd today --workspace \"Work\" # Filter to workspace\ntd today --personal # Personal projects only\ntd today --any-assignee # Include tasks assigned to others\n```\n\n### Inbox\n```bash\ntd inbox # Inbox tasks\ntd inbox --priority p1 # Filter by priority\ntd inbox --due today # Filter by due date\n```\n\n### Upcoming\n```bash\ntd upcoming # Next 7 days\ntd upcoming 14 # Next 14 days\ntd upcoming --workspace \"Work\" # Filter to workspace\ntd upcoming --personal # Personal projects only\ntd upcoming --any-assignee # Include tasks assigned to others\n```\n\n### Completed\n```bash\ntd completed # Completed today\ntd completed --since 2024-01-01 --until 2024-01-31\ntd completed --project \"Work\" # Filter by project\n```\n\n### Task Management\n```bash\n# List with filters\ntd task list --project \"Work\"\ntd task list --label \"urgent\" --priority p1\ntd task list --due today\ntd task list --filter \"today | overdue\"\ntd task list --assignee me\ntd task list --assignee \"john@example.com\"\ntd task list --unassigned\ntd task list --workspace \"Work\"\ntd task list --personal\ntd task list --parent \"Parent task\"\n\n# View, complete, uncomplete\ntd task view \"task name\"\ntd task complete \"task name\"\ntd task complete id:123456\ntd task complete \"task name\" --forever # Stop recurrence\ntd task uncomplete id:123456 # Reopen completed task\n\n# Add tasks\ntd task add \"New task\" --due \"tomorrow\" --priority p2\ntd task add \"Task\" --deadline \"2024-03-01\" --project \"Work\"\ntd task add \"Task\" --duration 1h --section \"Planning\" --project \"Work\"\ntd task add \"Task\" --labels \"urgent,review\" --parent \"Parent task\"\ntd task add \"Task\" --description \"Details here\" --assignee me\n\n# Update\ntd task update \"task name\" --due \"next week\"\ntd task update \"task name\" --deadline \"2024-06-01\"\ntd task update \"task name\" --no-deadline\ntd task update \"task name\" --duration 2h\ntd task update \"task name\" --assignee \"john@example.com\"\ntd task update \"task name\" --unassign\n\n# Move\ntd task move \"task name\" --project \"Personal\"\ntd task move \"task name\" --section \"In Progress\"\ntd task move \"task name\" --parent \"Parent task\"\ntd task move \"task name\" --no-parent # Move to project root\ntd task move \"task name\" --no-section # Remove from section\n\n# Delete and browse\ntd task delete \"task name\" --yes\ntd task browse \"task name\" # Open in browser\n```\n\n### Projects\n```bash\ntd project list\ntd project list --personal # Personal projects only\ntd project view \"Project Name\"\ntd project collaborators \"Project Name\"\ntd project create --name \"New Project\" --color \"blue\"\ntd project update \"Project Name\" --favorite\ntd project archive \"Project Name\"\ntd project unarchive \"Project Name\"\ntd project delete \"Project Name\" --yes\ntd project browse \"Project Name\" # Open in browser\ntd project move \"Project Name\" --to-workspace \"Acme\"\ntd project move \"Project Name\" --to-workspace \"Acme\" --folder \"Engineering\"\ntd project move \"Project Name\" --to-workspace \"Acme\" --visibility team\ntd project move \"Project Name\" --to-personal\n# move requires --yes to confirm (without it, shows a dry-run preview)\n```\n\n### Labels\n```bash\ntd label list # Lists personal + shared labels\ntd label view \"urgent\" # View label details and tasks\ntd label view \"team-review\" # Works for shared labels too\ntd label create --name \"urgent\" --color \"red\"\ntd label update \"urgent\" --color \"orange\"\ntd label delete \"urgent\" --yes\ntd label browse \"urgent\" # Open in browser\n```\n\nNote: Shared labels (from collaborative projects) appear in `list` and can be viewed, but cannot be deleted/updated via the standard label commands since they have no ID.\n\n### Comments\n```bash\ntd comment list --task \"task name\"\ntd comment list --project \"Project Name\" -P # Project comments\ntd comment add --task \"task name\" --content \"Comment text\"\ntd comment add --task \"task name\" --content \"See attached\" --file ./report.pdf\ntd comment view id:123 # View full comment\ntd comment update id:123 --content \"Updated text\"\ntd comment delete id:123 --yes\ntd comment browse id:123 # Open in browser\n```\n\n### Sections\n```bash\ntd section list \"Work\" # List sections in project (or --project \"Work\")\ntd section list --project \"Work\" # Same, using named flag\ntd section create --project \"Work\" --name \"In Progress\"\ntd section update id:123 --name \"Done\"\ntd section delete id:123 --yes\ntd section browse id:123 # Open in browser\n```\n\n### Filters\n```bash\ntd filter list\ntd filter create --name \"Urgent work\" --query \"p1 & #Work\"\ntd filter view \"Urgent work\" # Show tasks matching filter (alias: show)\ntd filter update \"Urgent work\" --query \"p1 & #Work & today\"\ntd filter delete \"Urgent work\" --yes\ntd filter browse \"Urgent work\" # Open in browser\n```\n\n### Workspaces\n```bash\ntd workspace list\ntd workspace view \"Workspace Name\"\ntd workspace projects \"Workspace Name\" # or --workspace \"Workspace Name\"\ntd workspace users \"Workspace Name\" --role ADMIN,MEMBER # or --workspace \"...\"\n```\n\n### Activity\n```bash\ntd activity # Recent activity\ntd activity --since 2024-01-01 --until 2024-01-31\ntd activity --type task --event completed\ntd activity --project \"Work\"\ntd activity --by me\n```\n\n### Notifications\n```bash\ntd notification list\ntd notification list --unread\ntd notification list --type \"item_assign\"\ntd notification view id:123\ntd notification read --all --yes # Mark all as read\ntd notification accept id:123 # Accept share invitation\ntd notification reject id:123 # Reject share invitation\n```\n\n### Reminders\n```bash\ntd reminder list \"task name\" # or --task \"task name\"\ntd reminder add \"task name\" --before 30m # or --task \"task name\" --before 30m\ntd reminder add \"task name\" --at \"2024-01-15 10:00\"\ntd reminder update id:123 --before 1h\ntd reminder delete id:123 --yes\n```\n\n### Stats\n```bash\ntd stats # View karma and productivity\ntd stats --json\ntd stats goals --daily 10 --weekly 50\ntd stats vacation --on # Enable vacation mode\ntd stats vacation --off # Disable vacation mode\n```\n\n### Settings\n```bash\ntd settings view\ntd settings view --json\ntd settings update --timezone \"America/New_York\"\ntd settings update --time-format 24 --date-format intl\ntd settings themes # List available themes\n```\n\n### Shell Completions\n```bash\ntd completion install # Install tab completions (prompts for shell)\ntd completion install bash # Install for specific shell\ntd completion install zsh\ntd completion install fish\ntd completion uninstall # Remove completions\n```\n\n### View (URL Router)\n```bash\ntd view <todoist-url> # Auto-route to appropriate view by URL type\ntd view https://app.todoist.com/app/task/buy-milk-abc123\ntd view https://app.todoist.com/app/project/work-def456\ntd view https://app.todoist.com/app/label/urgent-ghi789\ntd view https://app.todoist.com/app/filter/work-tasks-jkl012\ntd view https://app.todoist.com/app/today\ntd view https://app.todoist.com/app/upcoming\ntd view <url> --json # JSON output for entity views\ntd view <url> --limit 25 --ndjson # Passthrough list options where supported\n```\n\n### Update\n```bash\ntd update # Update CLI to latest version\ntd update --check # Check for updates without installing\n```\n\n## Examples\n\n### Daily workflow\n```bash\ntd today --json | jq '.results | length' # Count today's tasks\ntd inbox --limit 5 # Quick inbox check\ntd upcoming # What's coming this week\ntd completed # What I finished today\n```\n\n### Filter by multiple criteria\n```bash\ntd task list --project \"Work\" --label \"urgent\" --priority p1\ntd task list --filter \"today & #Work\"\ntd task list --workspace \"Work\" --due today\n```\n\n### Complete tasks efficiently\n```bash\ntd task complete \"Review PR\"\ntd task complete id:123456789\ntd task uncomplete id:123456789 # Reopen if needed\n```\n";
|
|
4
4
|
//# sourceMappingURL=content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/lib/skills/content.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,YAAY,CAAA;AACnC,eAAO,MAAM,iBAAiB,8EACiD,CAAA;AAE/E,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/lib/skills/content.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,YAAY,CAAA;AACnC,eAAO,MAAM,iBAAiB,8EACiD,CAAA;AAE/E,eAAO,MAAM,aAAa,wnWA0TzB,CAAA"}
|
|
@@ -24,6 +24,7 @@ Use this skill when the user wants to interact with their Todoist tasks.
|
|
|
24
24
|
- \`td settings view\` - User settings
|
|
25
25
|
- \`td completion install\` - Install shell completions
|
|
26
26
|
- \`td view <url>\` - View supported Todoist entities/pages by URL
|
|
27
|
+
- \`td update\` - Self-update the CLI to the latest version
|
|
27
28
|
|
|
28
29
|
## Output Formats
|
|
29
30
|
|
|
@@ -284,6 +285,12 @@ td view <url> --json # JSON output for entity views
|
|
|
284
285
|
td view <url> --limit 25 --ndjson # Passthrough list options where supported
|
|
285
286
|
\`\`\`
|
|
286
287
|
|
|
288
|
+
### Update
|
|
289
|
+
\`\`\`bash
|
|
290
|
+
td update # Update CLI to latest version
|
|
291
|
+
td update --check # Check for updates without installing
|
|
292
|
+
\`\`\`
|
|
293
|
+
|
|
287
294
|
## Examples
|
|
288
295
|
|
|
289
296
|
### Daily workflow
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../../src/lib/skills/content.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAA;AACnC,MAAM,CAAC,MAAM,iBAAiB,GAC1B,2EAA2E,CAAA;AAE/E,MAAM,CAAC,MAAM,aAAa,GAAG
|
|
1
|
+
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../../src/lib/skills/content.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAA;AACnC,MAAM,CAAC,MAAM,iBAAiB,GAC1B,2EAA2E,CAAA;AAE/E,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0T5B,CAAA"}
|