@krodak/clickup-cli 1.25.1 → 1.26.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/.claude-plugin/plugin.json +1 -1
- package/dist/index.js +25 -66
- package/package.json +2 -2
- package/skills/clickup-cli/SKILL.md +2 -2
|
@@ -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.
|
|
4
|
+
"version": "1.26.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Krzysztof Rodak"
|
|
7
7
|
},
|
package/dist/index.js
CHANGED
|
@@ -182,11 +182,7 @@ var ClickUpClient = class {
|
|
|
182
182
|
let lastPage = false;
|
|
183
183
|
while (!lastPage && page < MAX_PAGES) {
|
|
184
184
|
const data = await this.request(buildPath(page));
|
|
185
|
-
const taskPage = expectPaginatedCollectionField(
|
|
186
|
-
data,
|
|
187
|
-
"tasks",
|
|
188
|
-
"task page"
|
|
189
|
-
);
|
|
185
|
+
const taskPage = expectPaginatedCollectionField(data, "tasks", "task page");
|
|
190
186
|
allTasks.push(...taskPage.items);
|
|
191
187
|
lastPage = taskPage.lastPage;
|
|
192
188
|
page++;
|
|
@@ -246,11 +242,7 @@ var ClickUpClient = class {
|
|
|
246
242
|
}
|
|
247
243
|
async getTaskComments(taskId) {
|
|
248
244
|
const data = await this.request(this.taskPath(taskId, "/comment"));
|
|
249
|
-
return readCollectionField(
|
|
250
|
-
data,
|
|
251
|
-
"comments",
|
|
252
|
-
"task comments"
|
|
253
|
-
);
|
|
245
|
+
return readCollectionField(data, "comments", "task comments");
|
|
254
246
|
}
|
|
255
247
|
async getTasksFromList(listId, params = {}, options = {}) {
|
|
256
248
|
return this.paginate((page) => {
|
|
@@ -304,11 +296,7 @@ var ClickUpClient = class {
|
|
|
304
296
|
const data = await this.request(
|
|
305
297
|
`/team/${teamId}/custom_item`
|
|
306
298
|
);
|
|
307
|
-
return readCollectionField(
|
|
308
|
-
data,
|
|
309
|
-
"custom_items",
|
|
310
|
-
"custom task types"
|
|
311
|
-
);
|
|
299
|
+
return readCollectionField(data, "custom_items", "custom task types");
|
|
312
300
|
}
|
|
313
301
|
async createList(spaceId, name) {
|
|
314
302
|
return this.request(`/space/${spaceId}/list`, {
|
|
@@ -399,21 +387,13 @@ var ClickUpClient = class {
|
|
|
399
387
|
}
|
|
400
388
|
async getListTemplates(teamId) {
|
|
401
389
|
const data = await this.request(`/team/${teamId}/list_template`);
|
|
402
|
-
return readCollectionField(
|
|
403
|
-
data,
|
|
404
|
-
"templates",
|
|
405
|
-
"list templates"
|
|
406
|
-
);
|
|
390
|
+
return readCollectionField(data, "templates", "list templates");
|
|
407
391
|
}
|
|
408
392
|
async getFolderTemplates(teamId) {
|
|
409
393
|
const data = await this.request(
|
|
410
394
|
`/team/${teamId}/folder_template`
|
|
411
395
|
);
|
|
412
|
-
return readCollectionField(
|
|
413
|
-
data,
|
|
414
|
-
"templates",
|
|
415
|
-
"folder templates"
|
|
416
|
-
);
|
|
396
|
+
return readCollectionField(data, "templates", "folder templates");
|
|
417
397
|
}
|
|
418
398
|
async createListFromTemplate(containerId, templateId, name, containerType) {
|
|
419
399
|
return this.request(
|
|
@@ -505,11 +485,7 @@ var ClickUpClient = class {
|
|
|
505
485
|
}
|
|
506
486
|
async getThreadedComments(commentId) {
|
|
507
487
|
const data = await this.request(`/comment/${commentId}/reply`);
|
|
508
|
-
return readCollectionField(
|
|
509
|
-
data,
|
|
510
|
-
"comments",
|
|
511
|
-
"threaded comments"
|
|
512
|
-
);
|
|
488
|
+
return readCollectionField(data, "comments", "threaded comments");
|
|
513
489
|
}
|
|
514
490
|
async createThreadedComment(commentId, text, notifyAll, richBlocks) {
|
|
515
491
|
const body = richBlocks ? { comment: richBlocks } : { comment_text: text };
|
|
@@ -531,22 +507,14 @@ var ClickUpClient = class {
|
|
|
531
507
|
}
|
|
532
508
|
async getListCustomFields(listId) {
|
|
533
509
|
const data = await this.request(`/list/${listId}/field`);
|
|
534
|
-
return readCollectionField(
|
|
535
|
-
data,
|
|
536
|
-
"fields",
|
|
537
|
-
"list custom fields"
|
|
538
|
-
);
|
|
510
|
+
return readCollectionField(data, "fields", "list custom fields");
|
|
539
511
|
}
|
|
540
512
|
async createChecklist(taskId, name) {
|
|
541
513
|
const data = await this.request(this.taskPath(taskId, "/checklist"), {
|
|
542
514
|
method: "POST",
|
|
543
515
|
body: JSON.stringify({ name })
|
|
544
516
|
});
|
|
545
|
-
return expectRecordField(
|
|
546
|
-
data,
|
|
547
|
-
"checklist",
|
|
548
|
-
"checklist"
|
|
549
|
-
);
|
|
517
|
+
return expectRecordField(data, "checklist", "checklist");
|
|
550
518
|
}
|
|
551
519
|
async deleteChecklist(checklistId) {
|
|
552
520
|
await this.request(`/checklist/${checklistId}`, { method: "DELETE" });
|
|
@@ -558,22 +526,14 @@ var ClickUpClient = class {
|
|
|
558
526
|
`/checklist/${checklistId}/checklist_item`,
|
|
559
527
|
{ method: "POST", body: JSON.stringify(body) }
|
|
560
528
|
);
|
|
561
|
-
return expectRecordField(
|
|
562
|
-
data,
|
|
563
|
-
"checklist",
|
|
564
|
-
"checklist"
|
|
565
|
-
);
|
|
529
|
+
return expectRecordField(data, "checklist", "checklist");
|
|
566
530
|
}
|
|
567
531
|
async editChecklistItem(checklistId, checklistItemId, updates) {
|
|
568
532
|
const data = await this.request(
|
|
569
533
|
`/checklist/${checklistId}/checklist_item/${checklistItemId}`,
|
|
570
534
|
{ method: "PUT", body: JSON.stringify(updates) }
|
|
571
535
|
);
|
|
572
|
-
return expectRecordField(
|
|
573
|
-
data,
|
|
574
|
-
"checklist",
|
|
575
|
-
"checklist"
|
|
576
|
-
);
|
|
536
|
+
return expectRecordField(data, "checklist", "checklist");
|
|
577
537
|
}
|
|
578
538
|
async deleteChecklistItem(checklistId, checklistItemId) {
|
|
579
539
|
await this.request(
|
|
@@ -636,11 +596,7 @@ var ClickUpClient = class {
|
|
|
636
596
|
const query = params.toString();
|
|
637
597
|
const url = `/team/${teamId}/time_entries${query ? `?${query}` : ""}`;
|
|
638
598
|
const data = await this.request(url);
|
|
639
|
-
const entries = readCollectionField(
|
|
640
|
-
data,
|
|
641
|
-
"data",
|
|
642
|
-
"time entries"
|
|
643
|
-
);
|
|
599
|
+
const entries = readCollectionField(data, "data", "time entries");
|
|
644
600
|
if (opts?.taskId) {
|
|
645
601
|
return entries.filter((e) => e.task?.id === opts.taskId);
|
|
646
602
|
}
|
|
@@ -845,11 +801,7 @@ var ClickUpClient = class {
|
|
|
845
801
|
const data = await this.request(
|
|
846
802
|
`/team/${teamId}/taskTemplate?page=0`
|
|
847
803
|
);
|
|
848
|
-
return readCollectionField(
|
|
849
|
-
data,
|
|
850
|
-
"templates",
|
|
851
|
-
"task templates"
|
|
852
|
-
);
|
|
804
|
+
return readCollectionField(data, "templates", "task templates");
|
|
853
805
|
}
|
|
854
806
|
async createTaskFromTemplate(listId, templateId, name) {
|
|
855
807
|
return this.request(`/list/${listId}/taskTemplate/${templateId}`, {
|
|
@@ -1569,6 +1521,7 @@ function formatAssignConfirmation(taskId, opts) {
|
|
|
1569
1521
|
import { execFileSync } from "child_process";
|
|
1570
1522
|
import { checkbox, confirm, Separator } from "@inquirer/prompts";
|
|
1571
1523
|
import chalk2 from "chalk";
|
|
1524
|
+
var vimTheme = { keybindings: ["vim"] };
|
|
1572
1525
|
function openUrl(url) {
|
|
1573
1526
|
switch (process.platform) {
|
|
1574
1527
|
case "darwin":
|
|
@@ -1720,7 +1673,8 @@ async function interactiveTaskPicker(tasks) {
|
|
|
1720
1673
|
name: formatChoiceName(t),
|
|
1721
1674
|
value: t.id
|
|
1722
1675
|
})),
|
|
1723
|
-
pageSize: 20
|
|
1676
|
+
pageSize: 20,
|
|
1677
|
+
theme: vimTheme
|
|
1724
1678
|
});
|
|
1725
1679
|
return tasks.filter((t) => selected.includes(t.id));
|
|
1726
1680
|
}
|
|
@@ -1739,7 +1693,8 @@ async function groupedTaskPicker(groups) {
|
|
|
1739
1693
|
const selected = await checkbox({
|
|
1740
1694
|
message: `${totalCount} task(s) found. Select to view details / open in browser:`,
|
|
1741
1695
|
choices,
|
|
1742
|
-
pageSize: 20
|
|
1696
|
+
pageSize: 20,
|
|
1697
|
+
theme: vimTheme
|
|
1743
1698
|
});
|
|
1744
1699
|
return allTasks.filter((t) => selected.includes(t.id));
|
|
1745
1700
|
}
|
|
@@ -2219,7 +2174,8 @@ ${NEXT_STEPS}`);
|
|
|
2219
2174
|
} else {
|
|
2220
2175
|
teamId = await select({
|
|
2221
2176
|
message: "Select workspace:",
|
|
2222
|
-
choices: teams.map((t) => ({ name: t.name, value: t.id }))
|
|
2177
|
+
choices: teams.map((t) => ({ name: t.name, value: t.id })),
|
|
2178
|
+
theme: { keybindings: ["vim"] }
|
|
2223
2179
|
});
|
|
2224
2180
|
}
|
|
2225
2181
|
writeConfig({ apiToken, teamId });
|
|
@@ -2411,7 +2367,8 @@ async function runSprintCommand(config, opts) {
|
|
|
2411
2367
|
choices: sprintLists.map((l) => ({
|
|
2412
2368
|
name: `${l.name} (${l.id})`,
|
|
2413
2369
|
value: l
|
|
2414
|
-
}))
|
|
2370
|
+
})),
|
|
2371
|
+
theme: { keybindings: ["vim"] }
|
|
2415
2372
|
});
|
|
2416
2373
|
activeList = choice;
|
|
2417
2374
|
}
|
|
@@ -5430,7 +5387,8 @@ async function installSkillInteractive() {
|
|
|
5430
5387
|
name: `${t.name}${t.detected ? chalk8.dim(" (detected)") : ""}`,
|
|
5431
5388
|
value: t.name,
|
|
5432
5389
|
checked: t.detected
|
|
5433
|
-
}))
|
|
5390
|
+
})),
|
|
5391
|
+
theme: { keybindings: ["vim"] }
|
|
5434
5392
|
});
|
|
5435
5393
|
if (selected.length === 0) {
|
|
5436
5394
|
throw new Error("No agents selected");
|
|
@@ -8640,7 +8598,8 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
|
|
|
8640
8598
|
} else {
|
|
8641
8599
|
teamId = await select3({
|
|
8642
8600
|
message: "Select workspace:",
|
|
8643
|
-
choices: teams.map((t) => ({ name: t.name, value: t.id }))
|
|
8601
|
+
choices: teams.map((t) => ({ name: t.name, value: t.id })),
|
|
8602
|
+
theme: { keybindings: ["vim"] }
|
|
8644
8603
|
});
|
|
8645
8604
|
}
|
|
8646
8605
|
addProfile(name, { apiToken, teamId });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krodak/clickup-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"description": "ClickUp CLI for AI agents and humans",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"tsup": "^8.0.0",
|
|
62
62
|
"tsx": "^4.0.0",
|
|
63
63
|
"typescript": "^6.0.2",
|
|
64
|
-
"typescript-eslint": "^8.
|
|
64
|
+
"typescript-eslint": "^8.59.0",
|
|
65
65
|
"vitest": "^4.1.1"
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -3,11 +3,11 @@ name: clickup
|
|
|
3
3
|
description: 'Use when managing ClickUp tasks, sprints, or comments via the `cup` CLI tool. Triggers: task queries, status updates, sprint tracking, creating subtasks, posting comments, threaded replies, standup summaries, searching tasks, checking overdue items, assigning tasks, listing spaces and lists, opening tasks in browser, checking auth or config, setting custom fields, deleting tasks, managing tags, managing checklists, editing comments, task links, time tracking, attachments, file uploads, listing members, listing fields, duplicating tasks, bulk operations, goals, key results, saved filters, favorites.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# ClickUp CLI (`cup`) - skill version 1.
|
|
6
|
+
# ClickUp CLI (`cup`) - skill version 1.26.0
|
|
7
7
|
|
|
8
8
|
Reference for AI agents using the `cup` CLI tool. Covers task management, sprint tracking, comments, time tracking, custom fields, goals, docs, and project workflows.
|
|
9
9
|
|
|
10
|
-
> **Version check:** Run `cup --version`. If your installed version is older than 1.
|
|
10
|
+
> **Version check:** Run `cup --version`. If your installed version is older than 1.26.0, update with `npm install -g @krodak/clickup-cli` and refresh this skill with `cup skill`.
|
|
11
11
|
|
|
12
12
|
## Install & Configure
|
|
13
13
|
|