@krodak/clickup-cli 1.11.1 → 1.13.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "clickup-cli",
3
3
  "description": "ClickUp CLI skills for managing tasks, sprints, comments, checklists, custom fields, tags, and time tracking via the cup command",
4
- "version": "1.11.1",
4
+ "version": "1.13.0",
5
5
  "author": {
6
6
  "name": "Krzysztof Rodak"
7
7
  },
package/dist/index.js CHANGED
@@ -160,12 +160,14 @@ var ClickUpClient = class {
160
160
  return allTasks;
161
161
  }
162
162
  async getMyTasks(teamId, filters = {}) {
163
- const me = await this.getMe();
164
163
  const baseParams = new URLSearchParams({
165
164
  subtasks: String(filters.subtasks ?? true)
166
165
  });
167
166
  if (filters.includeClosed) baseParams.set("include_closed", "true");
168
- baseParams.append("assignees[]", String(me.id));
167
+ if (!filters.all) {
168
+ const me = await this.getMe();
169
+ baseParams.append("assignees[]", String(me.id));
170
+ }
169
171
  for (const s of filters.statuses ?? []) baseParams.append("statuses[]", s);
170
172
  for (const id of filters.listIds ?? []) baseParams.append("list_ids[]", id);
171
173
  for (const id of filters.spaceIds ?? []) baseParams.append("space_ids[]", id);
@@ -1141,19 +1143,57 @@ function computeWidths(rows, columns) {
1141
1143
  function formatTable(rows, columns) {
1142
1144
  const widths = computeWidths(rows, columns);
1143
1145
  const header = columns.map((c, i) => cell(c.label, widths[i])).join(" ");
1144
- const divider = "-".repeat(header.replace(/\x1b\[[0-9;]*m/g, "").length);
1146
+ const divider = chalk.dim("-".repeat(header.replace(/\x1b\[[0-9;]*m/g, "").length));
1145
1147
  const lines = [chalk.bold(header), divider];
1146
1148
  for (const row of rows) {
1147
- lines.push(columns.map((c, i) => cell(String(row[c.key] ?? ""), widths[i])).join(" "));
1149
+ lines.push(
1150
+ columns.map((c, i) => {
1151
+ const raw = String(row[c.key] ?? "");
1152
+ const width = widths[i];
1153
+ const truncated = raw.length > width ? raw.slice(0, width - 1) + "\u2026" : raw;
1154
+ const padding = " ".repeat(Math.max(0, width - truncated.length));
1155
+ return c.format ? c.format(truncated, row) + padding : truncated + padding;
1156
+ }).join(" ")
1157
+ );
1148
1158
  }
1149
1159
  return lines.join("\n");
1150
1160
  }
1161
+ function colorStatus(status) {
1162
+ const lower = status.toLowerCase();
1163
+ if (lower.includes("done") || lower.includes("complete") || lower.includes("closed"))
1164
+ return chalk.green(status);
1165
+ if (lower.includes("progress") || lower.includes("review") || lower.includes("active"))
1166
+ return chalk.yellow(status);
1167
+ if (lower.includes("block") || lower.includes("stuck")) return chalk.red(status);
1168
+ return chalk.dim(status);
1169
+ }
1170
+ function colorPriority(priority) {
1171
+ const lower = priority.toLowerCase();
1172
+ if (lower === "urgent") return chalk.red(priority);
1173
+ if (lower === "high") return chalk.yellow(priority);
1174
+ if (lower === "normal") return priority;
1175
+ if (lower === "low") return chalk.dim(priority);
1176
+ return priority;
1177
+ }
1178
+ function colorDueDate(dateStr, rawTimestamp) {
1179
+ if (!dateStr) return dateStr;
1180
+ if (rawTimestamp) {
1181
+ const ts = Number(rawTimestamp);
1182
+ if (Number.isFinite(ts) && ts < Date.now()) return chalk.red(dateStr);
1183
+ }
1184
+ return dateStr;
1185
+ }
1151
1186
  var TASK_COLUMNS = [
1152
1187
  { key: "id", label: "ID" },
1153
1188
  { key: "name", label: "NAME", maxWidth: 60 },
1154
- { key: "status", label: "STATUS" },
1155
- { key: "priority", label: "PRIORITY" },
1156
- { key: "due_date", label: "DUE" },
1189
+ { key: "status", label: "STATUS", maxWidth: 20, format: (v) => colorStatus(v) },
1190
+ { key: "priority", label: "PRIORITY", maxWidth: 10, format: (v) => colorPriority(v) },
1191
+ {
1192
+ key: "due_date",
1193
+ label: "DUE",
1194
+ maxWidth: 15,
1195
+ format: (v, row) => v ? colorDueDate(v, row.dueRaw) : ""
1196
+ },
1157
1197
  { key: "list", label: "LIST" }
1158
1198
  ];
1159
1199
 
@@ -1367,16 +1407,16 @@ function formatTaskDetail(task) {
1367
1407
  lines.push("");
1368
1408
  const fields = [
1369
1409
  ["ID", task.id],
1370
- ["Status", task.status?.status],
1410
+ ["Status", task.status?.status ? colorStatus(task.status.status) : void 0],
1371
1411
  ["Type", typeLabel],
1372
1412
  ["List", task.list?.name],
1373
1413
  [
1374
1414
  "Assignees",
1375
1415
  task.assignees?.length ? task.assignees.map((a) => a.username).join(", ") : void 0
1376
1416
  ],
1377
- ["Priority", task.priority?.priority],
1417
+ ["Priority", task.priority?.priority ? colorPriority(task.priority.priority) : void 0],
1378
1418
  ["Start", task.start_date ? formatDate(task.start_date) : void 0],
1379
- ["Due", task.due_date ? formatDate(task.due_date) : void 0],
1419
+ ["Due", task.due_date ? colorDueDate(formatDate(task.due_date), task.due_date) : void 0],
1380
1420
  ["Estimate", task.time_estimate ? formatDuration(task.time_estimate) : void 0],
1381
1421
  ["Tracked", task.time_spent ? formatDuration(task.time_spent) : void 0],
1382
1422
  ["Tags", task.tags?.length ? task.tags.map((t) => t.name).join(", ") : void 0],
@@ -1442,8 +1482,9 @@ function formatTaskDetail(task) {
1442
1482
  function formatChoiceName(task) {
1443
1483
  const id = task.id.padEnd(12);
1444
1484
  const name = task.name.length > 50 ? task.name.slice(0, 49) + "\u2026" : task.name.padEnd(50);
1445
- const status = task.status;
1446
- return `${id} ${name} ${chalk2.dim(status)}`;
1485
+ const status = colorStatus(task.status);
1486
+ const priority = task.priority !== "none" ? colorPriority(task.priority) : "";
1487
+ return `${id} ${name} ${status}${priority ? " " + priority : ""}`;
1447
1488
  }
1448
1489
  async function interactiveTaskPicker(tasks) {
1449
1490
  if (tasks.length === 0) return [];
@@ -1539,6 +1580,7 @@ function summarize(task, typeMap) {
1539
1580
  task_type: resolveTaskType(task, typeMap ?? /* @__PURE__ */ new Map()),
1540
1581
  priority: task.priority?.priority ?? "none",
1541
1582
  due_date: formatDueDate(task.due_date),
1583
+ ...task.due_date ? { dueRaw: task.due_date } : {},
1542
1584
  list: task.list.name,
1543
1585
  url: task.url,
1544
1586
  ...task.parent ? { parent: task.parent } : {}
@@ -1992,9 +2034,15 @@ Using: ${sprintLists[sprintLists.length - 1].name}
1992
2034
  }
1993
2035
 
1994
2036
  // src/commands/sprints.ts
2037
+ import chalk3 from "chalk";
1995
2038
  var SPRINT_COLUMNS = [
1996
2039
  { key: "id", label: "ID" },
1997
- { key: "sprint", label: "SPRINT", maxWidth: 60 },
2040
+ {
2041
+ key: "sprint",
2042
+ label: "SPRINT",
2043
+ maxWidth: 60,
2044
+ format: (v, row) => row.active ? chalk3.green(v) : v
2045
+ },
1998
2046
  { key: "dates", label: "DATES" }
1999
2047
  ];
2000
2048
  function formatSprintDate(d) {
@@ -2065,7 +2113,8 @@ async function listSprints(config, opts = {}) {
2065
2113
  return {
2066
2114
  id: s.id,
2067
2115
  sprint: s.active ? `* ${s.name}` : s.name,
2068
- dates: dateStr
2116
+ dates: dateStr,
2117
+ active: s.active
2069
2118
  };
2070
2119
  });
2071
2120
  if (!isTTY()) {
@@ -2104,7 +2153,7 @@ async function postComment(config, taskId, text, notifyAll) {
2104
2153
  }
2105
2154
 
2106
2155
  // src/commands/comments.ts
2107
- import chalk3 from "chalk";
2156
+ import chalk4 from "chalk";
2108
2157
  async function fetchComments(config, taskId) {
2109
2158
  const client = new ClickUpClient(config);
2110
2159
  const comments = await client.getTaskComments(taskId);
@@ -2128,11 +2177,11 @@ function printComments(comments, forceJson) {
2128
2177
  console.log("No comments found.");
2129
2178
  return;
2130
2179
  }
2131
- const separator = chalk3.dim("-".repeat(60));
2180
+ const separator = chalk4.dim("-".repeat(60));
2132
2181
  for (let i = 0; i < comments.length; i++) {
2133
2182
  const c = comments[i];
2134
2183
  if (i > 0) console.log(separator);
2135
- console.log(`${chalk3.bold(c.user)} ${chalk3.dim(formatTimestamp(c.date))}`);
2184
+ console.log(`${chalk4.bold(c.user)} ${chalk4.dim(formatTimestamp(c.date))}`);
2136
2185
  console.log(c.text);
2137
2186
  if (i < comments.length - 1) console.log("");
2138
2187
  }
@@ -2520,7 +2569,7 @@ function isOverdue2(task, now) {
2520
2569
  async function fetchOverdueTasks(config, opts = {}) {
2521
2570
  const client = new ClickUpClient(config);
2522
2571
  const [allTasks, customTypes] = await Promise.all([
2523
- client.getMyTasks(config.teamId, { includeClosed: opts.includeClosed }),
2572
+ client.getMyTasks(config.teamId, { all: opts.all, includeClosed: opts.includeClosed }),
2524
2573
  client.getCustomTaskTypes(config.teamId)
2525
2574
  ]);
2526
2575
  const typeMap = buildTypeMap(customTypes);
@@ -2599,7 +2648,7 @@ async function assignTask(config, taskId, opts) {
2599
2648
  }
2600
2649
 
2601
2650
  // src/commands/activity.ts
2602
- import chalk4 from "chalk";
2651
+ import chalk5 from "chalk";
2603
2652
  async function fetchActivity(config, taskId) {
2604
2653
  const client = new ClickUpClient(config);
2605
2654
  const [task, rawComments] = await Promise.all([
@@ -2631,8 +2680,8 @@ ${commentsMd}`);
2631
2680
  }
2632
2681
  console.log(formatTaskDetail(result.task));
2633
2682
  console.log("");
2634
- console.log(chalk4.bold("Comments"));
2635
- console.log(chalk4.dim("-".repeat(60)));
2683
+ console.log(chalk5.bold("Comments"));
2684
+ console.log(chalk5.dim("-".repeat(60)));
2636
2685
  if (result.comments.length === 0) {
2637
2686
  console.log("No comments.");
2638
2687
  return;
@@ -2641,9 +2690,9 @@ ${commentsMd}`);
2641
2690
  const c = result.comments[i];
2642
2691
  if (i > 0) {
2643
2692
  console.log("");
2644
- console.log(chalk4.dim("-".repeat(60)));
2693
+ console.log(chalk5.dim("-".repeat(60)));
2645
2694
  }
2646
- console.log(`${chalk4.bold(c.user)} ${chalk4.dim(formatTimestamp(c.date))}`);
2695
+ console.log(`${chalk5.bold(c.user)} ${chalk5.dim(formatTimestamp(c.date))}`);
2647
2696
  console.log(c.text);
2648
2697
  }
2649
2698
  }
@@ -2665,9 +2714,20 @@ var commandMetadata = [
2665
2714
  },
2666
2715
  {
2667
2716
  name: "tasks",
2668
- description: "List tasks assigned to me",
2669
- flags: ["--status", "--list", "--space", "--name", "--type", "--include-closed", "--json"],
2670
- quickReference: [{ section: "read", usage: "tasks", description: "List tasks assigned to me" }]
2717
+ description: "List tasks assigned to me (use --all for all tasks)",
2718
+ flags: [
2719
+ "--status",
2720
+ "--list",
2721
+ "--space",
2722
+ "--name",
2723
+ "--type",
2724
+ "--all",
2725
+ "--include-closed",
2726
+ "--json"
2727
+ ],
2728
+ quickReference: [
2729
+ { section: "read", usage: "tasks", description: "List tasks assigned to me (--all for all)" }
2730
+ ]
2671
2731
  },
2672
2732
  {
2673
2733
  name: "task",
@@ -2860,8 +2920,8 @@ var commandMetadata = [
2860
2920
  },
2861
2921
  {
2862
2922
  name: "search",
2863
- description: "Search my tasks by name",
2864
- flags: ["--status", "--include-closed", "--json"],
2923
+ description: "Search my tasks by name (use --all for all tasks)",
2924
+ flags: ["--status", "--all", "--include-closed", "--json"],
2865
2925
  quickReference: [
2866
2926
  { section: "read", usage: "search <query>", description: "Search my tasks by name" }
2867
2927
  ]
@@ -2875,7 +2935,7 @@ var commandMetadata = [
2875
2935
  {
2876
2936
  name: "overdue",
2877
2937
  description: "List tasks that are past their due date",
2878
- flags: ["--include-closed", "--json"],
2938
+ flags: ["--all", "--include-closed", "--json"],
2879
2939
  quickReference: [
2880
2940
  { section: "read", usage: "overdue", description: "Tasks past their due date" }
2881
2941
  ]
@@ -4300,7 +4360,7 @@ async function searchTasks(config, query, opts = {}) {
4300
4360
  }
4301
4361
  const client = new ClickUpClient(config);
4302
4362
  const [allTasks, customTypes] = await Promise.all([
4303
- client.getMyTasks(config.teamId, { includeClosed: opts.includeClosed }),
4363
+ client.getMyTasks(config.teamId, { all: opts.all, includeClosed: opts.includeClosed }),
4304
4364
  client.getCustomTaskTypes(config.teamId)
4305
4365
  ]);
4306
4366
  const typeMap = buildTypeMap(customTypes);
@@ -4535,7 +4595,7 @@ async function manageTags(config, taskId, opts) {
4535
4595
  }
4536
4596
 
4537
4597
  // src/commands/checklist.ts
4538
- import chalk5 from "chalk";
4598
+ import chalk6 from "chalk";
4539
4599
  async function viewChecklists(config, taskId) {
4540
4600
  const client = new ClickUpClient(config);
4541
4601
  const task = await client.getTask(taskId);
@@ -4568,13 +4628,13 @@ function formatChecklists(checklists) {
4568
4628
  const lines = [];
4569
4629
  for (const cl of checklists) {
4570
4630
  const resolved = cl.items.filter((i) => i.resolved).length;
4571
- lines.push(chalk5.bold(`${cl.name} (${resolved}/${cl.items.length})`));
4572
- lines.push(chalk5.dim(` ID: ${cl.id}`));
4631
+ lines.push(chalk6.bold(`${cl.name} (${resolved}/${cl.items.length})`));
4632
+ lines.push(chalk6.dim(` ID: ${cl.id}`));
4573
4633
  for (const item of cl.items) {
4574
- const check = item.resolved ? chalk5.green("[x]") : chalk5.dim("[ ]");
4575
- const assignee = item.assignee ? chalk5.dim(` @${item.assignee.username}`) : "";
4634
+ const check = item.resolved ? chalk6.green("[x]") : chalk6.dim("[ ]");
4635
+ const assignee = item.assignee ? chalk6.dim(` @${item.assignee.username}`) : "";
4576
4636
  lines.push(` ${check} ${item.name}${assignee}`);
4577
- lines.push(chalk5.dim(` item-id: ${item.id}`));
4637
+ lines.push(chalk6.dim(` item-id: ${item.id}`));
4578
4638
  }
4579
4639
  }
4580
4640
  return lines.join("\n");
@@ -4605,7 +4665,7 @@ async function deleteComment(config, commentId) {
4605
4665
  }
4606
4666
 
4607
4667
  // src/commands/replies.ts
4608
- import chalk6 from "chalk";
4668
+ import chalk7 from "chalk";
4609
4669
  async function getReplies(config, commentId) {
4610
4670
  const client = new ClickUpClient(config);
4611
4671
  return client.getThreadedComments(commentId);
@@ -4620,7 +4680,7 @@ function formatReplies(replies) {
4620
4680
  return replies.map((r) => {
4621
4681
  const user = r.user?.username ?? "Unknown";
4622
4682
  const date = formatTimestamp(Number(r.date));
4623
- return `${chalk6.bold(user)} ${chalk6.dim(date)}
4683
+ return `${chalk7.bold(user)} ${chalk7.dim(date)}
4624
4684
  ${r.comment_text}`;
4625
4685
  }).join("\n\n");
4626
4686
  }
@@ -4659,7 +4719,7 @@ async function attachFile(config, taskId, filePath) {
4659
4719
  }
4660
4720
 
4661
4721
  // src/commands/docs.ts
4662
- import chalk7 from "chalk";
4722
+ import chalk8 from "chalk";
4663
4723
  async function listDocs(config, query) {
4664
4724
  const client = new ClickUpClient(config);
4665
4725
  const docs = await client.getDocs(config.teamId);
@@ -4671,7 +4731,7 @@ async function listDocs(config, query) {
4671
4731
  }
4672
4732
  function formatDocs(docs) {
4673
4733
  if (docs.length === 0) return "No docs found";
4674
- return docs.map((d) => `${chalk7.bold(d.name)} ${chalk7.dim(d.id)}`).join("\n");
4734
+ return docs.map((d) => `${chalk8.bold(d.name)} ${chalk8.dim(d.id)}`).join("\n");
4675
4735
  }
4676
4736
  function formatDocsMarkdown(docs) {
4677
4737
  if (docs.length === 0) return "No docs found";
@@ -4679,7 +4739,7 @@ function formatDocsMarkdown(docs) {
4679
4739
  }
4680
4740
 
4681
4741
  // src/commands/doc.ts
4682
- import chalk8 from "chalk";
4742
+ import chalk9 from "chalk";
4683
4743
  async function getDocInfo(config, docId) {
4684
4744
  const client = new ClickUpClient(config);
4685
4745
  const [doc, pages] = await Promise.all([
@@ -4691,14 +4751,14 @@ async function getDocInfo(config, docId) {
4691
4751
  function formatDocInfo(doc, pages, indent = 0) {
4692
4752
  const lines = [];
4693
4753
  if (indent === 0) {
4694
- lines.push(`${chalk8.bold(doc.name)} ${chalk8.dim(doc.id)}`);
4754
+ lines.push(`${chalk9.bold(doc.name)} ${chalk9.dim(doc.id)}`);
4695
4755
  if (pages.length === 0) {
4696
4756
  lines.push(" (no pages)");
4697
4757
  }
4698
4758
  }
4699
4759
  for (const page of pages) {
4700
4760
  const prefix = " ".repeat(indent + 1);
4701
- lines.push(`${prefix}${page.name} ${chalk8.dim(page.id)}`);
4761
+ lines.push(`${prefix}${page.name} ${chalk9.dim(page.id)}`);
4702
4762
  if (page.pages && page.pages.length > 0) {
4703
4763
  lines.push(formatDocInfo(doc, page.pages, indent + 1));
4704
4764
  }
@@ -4777,7 +4837,7 @@ async function deleteDocPage(config, docId, pageId) {
4777
4837
  }
4778
4838
 
4779
4839
  // src/commands/folders.ts
4780
- import chalk9 from "chalk";
4840
+ import chalk10 from "chalk";
4781
4841
  async function listFolders(config, spaceId, nameFilter) {
4782
4842
  const client = new ClickUpClient(config);
4783
4843
  const folders = await client.getFolders(spaceId);
@@ -4796,9 +4856,9 @@ async function listFolders(config, spaceId, nameFilter) {
4796
4856
  function formatFolders(folders) {
4797
4857
  if (folders.length === 0) return "No folders found";
4798
4858
  return folders.map((f) => {
4799
- const header = `${chalk9.bold(f.name)} ${chalk9.dim(f.id)}`;
4859
+ const header = `${chalk10.bold(f.name)} ${chalk10.dim(f.id)}`;
4800
4860
  if (f.lists.length === 0) return header;
4801
- const listLines = f.lists.map((l) => ` ${l.name} ${chalk9.dim(l.id)}`);
4861
+ const listLines = f.lists.map((l) => ` ${l.name} ${chalk10.dim(l.id)}`);
4802
4862
  return [header, ...listLines].join("\n");
4803
4863
  }).join("\n\n");
4804
4864
  }
@@ -4813,7 +4873,7 @@ function formatFoldersMarkdown(folders) {
4813
4873
  }
4814
4874
 
4815
4875
  // src/commands/time.ts
4816
- import chalk10 from "chalk";
4876
+ import chalk11 from "chalk";
4817
4877
  async function startTimer(config, taskId, description) {
4818
4878
  const client = new ClickUpClient(config);
4819
4879
  return client.startTimeEntry(config.teamId, taskId, description);
@@ -4863,8 +4923,8 @@ function formatTimeEntry(entry) {
4863
4923
  const isRunning = entry.duration < 0;
4864
4924
  const elapsed = isRunning ? Date.now() - Number(entry.start) : entry.duration;
4865
4925
  const durationStr = formatDuration(elapsed);
4866
- const status = isRunning ? chalk10.green("RUNNING") : "";
4867
- lines.push(`${chalk10.bold(taskName)} ${chalk10.dim(taskId)} ${status}`);
4926
+ const status = isRunning ? chalk11.green("RUNNING") : "";
4927
+ lines.push(`${chalk11.bold(taskName)} ${chalk11.dim(taskId)} ${status}`);
4868
4928
  lines.push(
4869
4929
  ` ${durationStr} - ${formatTimestamp(entry.start)}${entry.description ? ` - ${entry.description}` : ""}`
4870
4930
  );
@@ -4889,7 +4949,7 @@ function formatTimeEntriesMarkdown(entries) {
4889
4949
  }
4890
4950
 
4891
4951
  // src/commands/tags.ts
4892
- import chalk11 from "chalk";
4952
+ import chalk12 from "chalk";
4893
4953
  async function listSpaceTags(config, spaceId) {
4894
4954
  const client = new ClickUpClient(config);
4895
4955
  return client.getSpaceTags(spaceId);
@@ -4912,7 +4972,7 @@ async function updateSpaceTag(config, spaceId, tagName, updates) {
4912
4972
  }
4913
4973
  function formatTags(tags) {
4914
4974
  if (tags.length === 0) return "No tags found";
4915
- return tags.map((t) => chalk11.bold(t.name)).join(", ");
4975
+ return tags.map((t) => chalk12.bold(t.name)).join(", ");
4916
4976
  }
4917
4977
  function formatTagsMarkdown(tags) {
4918
4978
  if (tags.length === 0) return "No tags found";
@@ -4920,14 +4980,14 @@ function formatTagsMarkdown(tags) {
4920
4980
  }
4921
4981
 
4922
4982
  // src/commands/members.ts
4923
- import chalk12 from "chalk";
4983
+ import chalk13 from "chalk";
4924
4984
  async function listMembers(config) {
4925
4985
  const client = new ClickUpClient(config);
4926
4986
  return client.getWorkspaceMembers(config.teamId);
4927
4987
  }
4928
4988
  function formatMembers(members) {
4929
4989
  if (members.length === 0) return "No members found";
4930
- return members.map((m) => `${chalk12.bold(m.username)} ${chalk12.dim(`(${m.id})`)} ${m.email}`).join("\n");
4990
+ return members.map((m) => `${chalk13.bold(m.username)} ${chalk13.dim(`(${m.id})`)} ${m.email}`).join("\n");
4931
4991
  }
4932
4992
  function formatMembersMarkdown(members) {
4933
4993
  if (members.length === 0) return "No members found";
@@ -4935,7 +4995,7 @@ function formatMembersMarkdown(members) {
4935
4995
  }
4936
4996
 
4937
4997
  // src/commands/fields.ts
4938
- import chalk13 from "chalk";
4998
+ import chalk14 from "chalk";
4939
4999
  async function listFields(config, listId) {
4940
5000
  const client = new ClickUpClient(config);
4941
5001
  return client.getListCustomFields(listId);
@@ -4944,8 +5004,8 @@ function formatFields(fields) {
4944
5004
  if (fields.length === 0) return "No custom fields";
4945
5005
  return fields.map((f) => {
4946
5006
  const options = f.type_config?.options?.map((o) => o.name).join(", ");
4947
- const optStr = options ? ` ${chalk13.dim(`[${options}]`)}` : "";
4948
- return `${chalk13.bold(f.name)} ${chalk13.dim(f.type)}${f.required ? chalk13.yellow(" (required)") : ""}${optStr}`;
5007
+ const optStr = options ? ` ${chalk14.dim(`[${options}]`)}` : "";
5008
+ return `${chalk14.bold(f.name)} ${chalk14.dim(f.type)}${f.required ? chalk14.yellow(" (required)") : ""}${optStr}`;
4949
5009
  }).join("\n");
4950
5010
  }
4951
5011
  function formatFieldsMarkdown(fields) {
@@ -4989,7 +5049,7 @@ async function bulkUpdateStatus(config, taskIds, status) {
4989
5049
  }
4990
5050
 
4991
5051
  // src/commands/goals.ts
4992
- import chalk14 from "chalk";
5052
+ import chalk15 from "chalk";
4993
5053
  async function listGoals(config) {
4994
5054
  const client = new ClickUpClient(config);
4995
5055
  return client.getGoals(config.teamId);
@@ -5029,8 +5089,8 @@ function formatGoals(goals) {
5029
5089
  if (goals.length === 0) return "No goals found";
5030
5090
  return goals.map((g) => {
5031
5091
  const pct = Math.round(g.percent_completed * 100);
5032
- const owner = g.owner ? ` ${chalk14.dim(`@${g.owner.username}`)}` : "";
5033
- return `${chalk14.bold(g.name)} ${chalk14.dim(`(${g.id})`)} ${chalk14.cyan(`${pct}%`)}${owner}`;
5092
+ const owner = g.owner ? ` ${chalk15.dim(`@${g.owner.username}`)}` : "";
5093
+ return `${chalk15.bold(g.name)} ${chalk15.dim(`(${g.id})`)} ${chalk15.cyan(`${pct}%`)}${owner}`;
5034
5094
  }).join("\n");
5035
5095
  }
5036
5096
  function formatGoalsMarkdown(goals) {
@@ -5045,7 +5105,7 @@ function formatKeyResults(keyResults) {
5045
5105
  if (keyResults.length === 0) return "No key results found";
5046
5106
  return keyResults.map((kr) => {
5047
5107
  const pct = Math.round(kr.percent_completed * 100);
5048
- return `${chalk14.bold(kr.name)} ${chalk14.dim(`(${kr.id})`)} ${chalk14.cyan(`${kr.steps_current}/${kr.steps_end}`)} ${chalk14.dim(`${pct}%`)}`;
5108
+ return `${chalk15.bold(kr.name)} ${chalk15.dim(`(${kr.id})`)} ${chalk15.cyan(`${kr.steps_current}/${kr.steps_end}`)} ${chalk15.dim(`${pct}%`)}`;
5049
5109
  }).join("\n");
5050
5110
  }
5051
5111
  function formatKeyResultsMarkdown(keyResults) {
@@ -5057,14 +5117,14 @@ function formatKeyResultsMarkdown(keyResults) {
5057
5117
  }
5058
5118
 
5059
5119
  // src/commands/task-types.ts
5060
- import chalk15 from "chalk";
5120
+ import chalk16 from "chalk";
5061
5121
  async function listTaskTypes(config) {
5062
5122
  const client = new ClickUpClient(config);
5063
5123
  return client.getCustomTaskTypes(config.teamId);
5064
5124
  }
5065
5125
  function formatTaskTypes(types) {
5066
5126
  if (types.length === 0) return "No custom task types";
5067
- return types.map((t) => `${chalk15.bold(t.name)} ${chalk15.dim(`(${t.id})`)}`).join("\n");
5127
+ return types.map((t) => `${chalk16.bold(t.name)} ${chalk16.dim(`(${t.id})`)}`).join("\n");
5068
5128
  }
5069
5129
  function formatTaskTypesMarkdown(types) {
5070
5130
  if (types.length === 0) return "No custom task types";
@@ -5072,14 +5132,14 @@ function formatTaskTypesMarkdown(types) {
5072
5132
  }
5073
5133
 
5074
5134
  // src/commands/templates.ts
5075
- import chalk16 from "chalk";
5135
+ import chalk17 from "chalk";
5076
5136
  async function listTemplates(config) {
5077
5137
  const client = new ClickUpClient(config);
5078
5138
  return client.getTaskTemplates(config.teamId);
5079
5139
  }
5080
5140
  function formatTemplates(templates) {
5081
5141
  if (templates.length === 0) return "No task templates";
5082
- return templates.map((t) => `${chalk16.bold(t.name)} ${chalk16.dim(`(${t.id})`)}`).join("\n");
5142
+ return templates.map((t) => `${chalk17.bold(t.name)} ${chalk17.dim(`(${t.id})`)}`).join("\n");
5083
5143
  }
5084
5144
  function formatTemplatesMarkdown(templates) {
5085
5145
  if (templates.length === 0) return "No task templates";
@@ -5087,14 +5147,14 @@ function formatTemplatesMarkdown(templates) {
5087
5147
  }
5088
5148
 
5089
5149
  // src/commands/list-templates.ts
5090
- import chalk17 from "chalk";
5150
+ import chalk18 from "chalk";
5091
5151
  async function listListTemplates(config) {
5092
5152
  const client = new ClickUpClient(config);
5093
5153
  return client.getListTemplates(config.teamId);
5094
5154
  }
5095
5155
  function formatListTemplates(templates) {
5096
5156
  if (templates.length === 0) return "No list templates";
5097
- return templates.map((t) => `${chalk17.bold(t.name)} ${chalk17.dim(`(${t.id})`)}`).join("\n");
5157
+ return templates.map((t) => `${chalk18.bold(t.name)} ${chalk18.dim(`(${t.id})`)}`).join("\n");
5098
5158
  }
5099
5159
  function formatListTemplatesMarkdown(templates) {
5100
5160
  if (templates.length === 0) return "No list templates";
@@ -5102,14 +5162,14 @@ function formatListTemplatesMarkdown(templates) {
5102
5162
  }
5103
5163
 
5104
5164
  // src/commands/folder-templates.ts
5105
- import chalk18 from "chalk";
5165
+ import chalk19 from "chalk";
5106
5166
  async function listFolderTemplates(config) {
5107
5167
  const client = new ClickUpClient(config);
5108
5168
  return client.getFolderTemplates(config.teamId);
5109
5169
  }
5110
5170
  function formatFolderTemplates(templates) {
5111
5171
  if (templates.length === 0) return "No folder templates";
5112
- return templates.map((t) => `${chalk18.bold(t.name)} ${chalk18.dim(`(${t.id})`)}`).join("\n");
5172
+ return templates.map((t) => `${chalk19.bold(t.name)} ${chalk19.dim(`(${t.id})`)}`).join("\n");
5113
5173
  }
5114
5174
  function formatFolderTemplatesMarkdown(templates) {
5115
5175
  if (templates.length === 0) return "No folder templates";
@@ -5132,7 +5192,7 @@ async function createListFromTemplate(config, name, opts) {
5132
5192
  }
5133
5193
 
5134
5194
  // src/commands/views.ts
5135
- import chalk19 from "chalk";
5195
+ import chalk20 from "chalk";
5136
5196
  async function listViews(config, listId) {
5137
5197
  const client = new ClickUpClient(config);
5138
5198
  const data = await client.getListViews(listId);
@@ -5140,7 +5200,7 @@ async function listViews(config, listId) {
5140
5200
  }
5141
5201
  function formatViews(views) {
5142
5202
  if (views.length === 0) return "No views";
5143
- return views.map((v) => `${chalk19.bold(v.name)} ${chalk19.dim(`(${v.id})`)} ${chalk19.dim(v.type)}`).join("\n");
5203
+ return views.map((v) => `${chalk20.bold(v.name)} ${chalk20.dim(`(${v.id})`)} ${chalk20.dim(v.type)}`).join("\n");
5144
5204
  }
5145
5205
  function formatViewsMarkdown(views) {
5146
5206
  if (views.length === 0) return "No views";
@@ -5148,20 +5208,20 @@ function formatViewsMarkdown(views) {
5148
5208
  }
5149
5209
 
5150
5210
  // src/commands/view.ts
5151
- import chalk20 from "chalk";
5211
+ import chalk21 from "chalk";
5152
5212
  async function getView(config, viewId) {
5153
5213
  const client = new ClickUpClient(config);
5154
5214
  return client.getView(viewId);
5155
5215
  }
5156
5216
  function formatView(view) {
5157
5217
  const lines = [];
5158
- lines.push(chalk20.bold.underline(view.name));
5218
+ lines.push(chalk21.bold.underline(view.name));
5159
5219
  lines.push("");
5160
- lines.push(` ${chalk20.bold("ID")} ${view.id}`);
5161
- lines.push(` ${chalk20.bold("Type")} ${view.type}`);
5162
- if (view.visibility) lines.push(` ${chalk20.bold("Visibility")} ${view.visibility}`);
5163
- if (view.date_created) lines.push(` ${chalk20.bold("Created")} ${formatDate(view.date_created)}`);
5164
- if (view.protected !== void 0) lines.push(` ${chalk20.bold("Protected")} ${view.protected}`);
5220
+ lines.push(` ${chalk21.bold("ID")} ${view.id}`);
5221
+ lines.push(` ${chalk21.bold("Type")} ${view.type}`);
5222
+ if (view.visibility) lines.push(` ${chalk21.bold("Visibility")} ${view.visibility}`);
5223
+ if (view.date_created) lines.push(` ${chalk21.bold("Created")} ${formatDate(view.date_created)}`);
5224
+ if (view.protected !== void 0) lines.push(` ${chalk21.bold("Protected")} ${view.protected}`);
5165
5225
  return lines.join("\n");
5166
5226
  }
5167
5227
  function formatViewMarkdown(view) {
@@ -5297,10 +5357,10 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
5297
5357
  }
5298
5358
  })
5299
5359
  );
5300
- program.command("tasks").description("List tasks assigned to me").option("--status <status>", 'Filter by status (e.g. "in progress")').option("--list <listId>", "Filter by list ID").option("--space <spaceId>", "Filter by space ID").option("--name <partial>", "Filter by name (case-insensitive contains)").option(
5360
+ program.command("tasks").description("List tasks assigned to me (use --all for all tasks)").option("--status <status>", 'Filter by status (e.g. "in progress")').option("--list <listId>", "Filter by list ID").option("--space <spaceId>", "Filter by space ID").option("--name <partial>", "Filter by name (case-insensitive contains)").option(
5301
5361
  "--type <type>",
5302
5362
  'Filter by task type (e.g. "task", "initiative", or custom type name/ID)'
5303
- ).option("--include-closed", "Include done/closed tasks").option("--json", "Force JSON output even in terminal").action(
5363
+ ).option("--all", "Include all tasks, not just mine").option("--include-closed", "Include done/closed tasks").option("--json", "Force JSON output even in terminal").action(
5304
5364
  wrapAction(async (opts) => {
5305
5365
  const config = loadConfig(getProfileName());
5306
5366
  const tasks = await fetchMyTasks(config, {
@@ -5309,6 +5369,7 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
5309
5369
  listIds: opts.list ? [opts.list] : void 0,
5310
5370
  spaceIds: opts.space ? [opts.space] : void 0,
5311
5371
  name: opts.name,
5372
+ all: opts.all,
5312
5373
  includeClosed: opts.includeClosed
5313
5374
  });
5314
5375
  await printTasks(tasks, opts.json ?? false, config);
@@ -5515,12 +5576,13 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
5515
5576
  await openTask(config, query, opts);
5516
5577
  })
5517
5578
  );
5518
- program.command("search <query>").description("Search my tasks by name").option("--status <status>", "Filter by status").option("--include-closed", "Include done/closed tasks in search").option("--json", "Force JSON output even in terminal").action(
5579
+ program.command("search <query>").description("Search my tasks by name (use --all for all tasks)").option("--status <status>", "Filter by status").option("--all", "Search all tasks, not just mine").option("--include-closed", "Include done/closed tasks in search").option("--json", "Force JSON output even in terminal").action(
5519
5580
  wrapAction(
5520
5581
  async (query, opts) => {
5521
5582
  const config = loadConfig(getProfileName());
5522
5583
  const tasks = await searchTasks(config, query, {
5523
5584
  status: opts.status,
5585
+ all: opts.all,
5524
5586
  includeClosed: opts.includeClosed
5525
5587
  });
5526
5588
  await printTasks(tasks, opts.json ?? false, config);
@@ -5537,10 +5599,13 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
5537
5599
  await runSummaryCommand(config, { hours, json: opts.json ?? false });
5538
5600
  })
5539
5601
  );
5540
- program.command("overdue").description("List tasks that are past their due date").option("--include-closed", "Include done/closed overdue tasks").option("--json", "Force JSON output even in terminal").action(
5602
+ program.command("overdue").description("List tasks that are past their due date").option("--all", "Include all tasks, not just mine").option("--include-closed", "Include done/closed overdue tasks").option("--json", "Force JSON output even in terminal").action(
5541
5603
  wrapAction(async (opts) => {
5542
5604
  const config = loadConfig(getProfileName());
5543
- const tasks = await fetchOverdueTasks(config, { includeClosed: opts.includeClosed });
5605
+ const tasks = await fetchOverdueTasks(config, {
5606
+ all: opts.all,
5607
+ includeClosed: opts.includeClosed
5608
+ });
5544
5609
  await printTasks(tasks, opts.json ?? false, config);
5545
5610
  })
5546
5611
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krodak/clickup-cli",
3
- "version": "1.11.1",
3
+ "version": "1.13.0",
4
4
  "description": "ClickUp CLI for AI agents and humans",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -33,39 +33,39 @@ All commands support `--help` for full flag details. All commands support `--jso
33
33
 
34
34
  ### Read
35
35
 
36
- | Command | What it returns |
37
- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
38
- | `cup tasks [--status s] [--name q] [--type t] [--list id] [--space id] [--include-closed]` | My tasks (filter by status, name, type, list, space) |
39
- | `cup assigned [--status s] [--include-closed]` | All my tasks grouped by status |
40
- | `cup sprint [--status s] [--space nameOrId] [--folder id] [--include-closed]` | Tasks in active sprint (auto-detected) |
41
- | `cup sprints [--space nameOrId]` | List all sprints (marks active with \*) |
42
- | `cup search <query> [--status s] [--include-closed]` | Search my tasks by name |
43
- | `cup task <id>` | Single task details (custom fields, checklists, attachments, deps, links) |
44
- | `cup subtasks <id> [--status s] [--name q] [--include-closed]` | Subtasks of a task |
45
- | `cup comments <id>` | Comments on a task |
46
- | `cup activity <id>` | Task details + comment history combined |
47
- | `cup inbox [--days n] [--include-closed]` | Tasks updated in last n days (default 30) |
48
- | `cup summary [--hours n]` | Standup: completed, in-progress, overdue |
49
- | `cup overdue [--include-closed]` | Tasks past due date (most overdue first) |
50
- | `cup spaces [--name partial] [--my]` | List/filter workspace spaces |
51
- | `cup lists <spaceId> [--name partial]` | Lists in a space (including folder lists) |
52
- | `cup folders <spaceId> [--name partial]` | Folders in a space (with their lists) |
53
- | `cup members` | Workspace members (username, ID, email) |
54
- | `cup fields <listId>` | Custom fields on a list (type, required, options) |
55
- | `cup tags <spaceId>` | Tags available in a space |
56
- | `cup goals` | Workspace goals with progress |
57
- | `cup key-results <goalId>` | Key results for a goal |
58
- | `cup docs [query]` | Workspace docs (optionally filter by name) |
59
- | `cup doc <docId> [pageId]` | Doc metadata + page tree, or a specific page |
60
- | `cup doc-pages <docId>` | All pages in a doc with content |
61
- | `cup task-types` | Custom task types (for `--custom-item-id`) |
62
- | `cup templates` | Task templates (for `--template`) |
63
- | `cup list-templates` | List templates (for `list-from-template`) |
64
- | `cup folder-templates` | Folder templates |
65
- | `cup views <listId>` | List views on a list |
66
- | `cup view <viewId>` | Get view details |
67
- | `cup open <query>` | Open task in browser by ID or name |
68
- | `cup auth` | Check authentication status |
36
+ | Command | What it returns |
37
+ | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
38
+ | `cup tasks [--status s] [--name q] [--type t] [--list id] [--space id] [--all] [--include-closed]` | My tasks (filter by status, name, type, list, space). `--all` for all tasks in workspace |
39
+ | `cup assigned [--status s] [--include-closed]` | All my tasks grouped by status |
40
+ | `cup sprint [--status s] [--space nameOrId] [--folder id] [--include-closed]` | Tasks in active sprint (auto-detected) |
41
+ | `cup sprints [--space nameOrId]` | List all sprints (marks active with \*) |
42
+ | `cup search <query> [--status s] [--all] [--include-closed]` | Search my tasks by name. `--all` for all tasks |
43
+ | `cup task <id>` | Single task details (custom fields, checklists, attachments, deps, links) |
44
+ | `cup subtasks <id> [--status s] [--name q] [--include-closed]` | Subtasks of a task |
45
+ | `cup comments <id>` | Comments on a task |
46
+ | `cup activity <id>` | Task details + comment history combined |
47
+ | `cup inbox [--days n] [--include-closed]` | Tasks updated in last n days (default 30) |
48
+ | `cup summary [--hours n]` | Standup: completed, in-progress, overdue |
49
+ | `cup overdue [--include-closed]` | Tasks past due date (most overdue first) |
50
+ | `cup spaces [--name partial] [--my]` | List/filter workspace spaces |
51
+ | `cup lists <spaceId> [--name partial]` | Lists in a space (including folder lists) |
52
+ | `cup folders <spaceId> [--name partial]` | Folders in a space (with their lists) |
53
+ | `cup members` | Workspace members (username, ID, email) |
54
+ | `cup fields <listId>` | Custom fields on a list (type, required, options) |
55
+ | `cup tags <spaceId>` | Tags available in a space |
56
+ | `cup goals` | Workspace goals with progress |
57
+ | `cup key-results <goalId>` | Key results for a goal |
58
+ | `cup docs [query]` | Workspace docs (optionally filter by name) |
59
+ | `cup doc <docId> [pageId]` | Doc metadata + page tree, or a specific page |
60
+ | `cup doc-pages <docId>` | All pages in a doc with content |
61
+ | `cup task-types` | Custom task types (for `--custom-item-id`) |
62
+ | `cup templates` | Task templates (for `--template`) |
63
+ | `cup list-templates` | List templates (for `list-from-template`) |
64
+ | `cup folder-templates` | Folder templates |
65
+ | `cup views <listId>` | List views on a list |
66
+ | `cup view <viewId>` | Get view details |
67
+ | `cup open <query>` | Open task in browser by ID or name |
68
+ | `cup auth` | Check authentication status |
69
69
 
70
70
  ### Write
71
71
 
@@ -152,6 +152,7 @@ All commands support `--help` for full flag details. All commands support `--jso
152
152
  | `--custom-item-id` | Custom task type ID for `cup create` (find with `cup task-types`) |
153
153
  | `--space` | Partial name match or exact ID |
154
154
  | `--name` | Partial match, case-insensitive |
155
+ | `--all` | Show all tasks in workspace, not just assigned to me. Available on `tasks`, `search`, `overdue`. Default: my tasks only (smaller output for agent context windows) |
155
156
  | `--include-closed` | Include closed/done tasks |
156
157
  | `--list` on create | Optional when `--parent` is given (auto-detected) |
157
158
  | `cup field --set` | Supports: text, number, checkbox (true/false), dropdown (option name), date (YYYY-MM-DD), url, email. Names resolved case-insensitively; errors list available fields/options |
@@ -179,6 +180,7 @@ cup activity abc123def # task + comments combined
179
180
  cup tasks --status "in progress" # by status
180
181
  cup tasks --name "login" # by partial name
181
182
  cup tasks --type initiative # initiatives only
183
+ cup tasks --list 12345 --all # all tasks in list, not just mine
182
184
  cup search "payment flow" # multi-word search
183
185
  cup search auth --status "prog" # fuzzy status match
184
186
  cup sprint # current sprint