@krodak/clickup-cli 1.36.0 → 1.37.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 +47 -6
- package/package.json +1 -1
- package/skills/clickup-cli/SKILL.md +4 -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.37.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Krzysztof Rodak"
|
|
7
7
|
},
|
package/dist/index.js
CHANGED
|
@@ -74,6 +74,10 @@ function normalizeTaskId(input) {
|
|
|
74
74
|
const match = /^https?:\/\/app\.clickup\.com\/t\/(?:[^/?#]+\/)?([^/?#]+)/.exec(input.trim());
|
|
75
75
|
return match ? match[1] : input;
|
|
76
76
|
}
|
|
77
|
+
function normalizeViewId(input) {
|
|
78
|
+
const match = /^https?:\/\/app\.clickup\.com\/[^/]+\/v\/[^/]+\/([^/?#]+)/.exec(input.trim());
|
|
79
|
+
return match ? match[1] : input;
|
|
80
|
+
}
|
|
77
81
|
var ClickUpClient = class {
|
|
78
82
|
apiToken;
|
|
79
83
|
teamId;
|
|
@@ -394,10 +398,12 @@ var ClickUpClient = class {
|
|
|
394
398
|
return readCollectionField(data, "views", "views");
|
|
395
399
|
}
|
|
396
400
|
async getViewTasks(viewId) {
|
|
397
|
-
|
|
401
|
+
const id = normalizeViewId(viewId);
|
|
402
|
+
return this.paginate((page) => `/view/${id}/task?page=${page}`);
|
|
398
403
|
}
|
|
399
404
|
async getView(viewId) {
|
|
400
|
-
const
|
|
405
|
+
const id = normalizeViewId(viewId);
|
|
406
|
+
const data = await this.request(`/view/${id}`);
|
|
401
407
|
return expectRecordField(data, "view", "view");
|
|
402
408
|
}
|
|
403
409
|
async createListView(listId, payload) {
|
|
@@ -408,14 +414,16 @@ var ClickUpClient = class {
|
|
|
408
414
|
return expectRecordField(data, "view", "view");
|
|
409
415
|
}
|
|
410
416
|
async updateView(viewId, payload) {
|
|
411
|
-
const
|
|
417
|
+
const id = normalizeViewId(viewId);
|
|
418
|
+
const data = await this.request(`/view/${id}`, {
|
|
412
419
|
method: "PUT",
|
|
413
420
|
body: JSON.stringify(payload)
|
|
414
421
|
});
|
|
415
422
|
return expectRecordField(data, "view", "view");
|
|
416
423
|
}
|
|
417
424
|
async deleteView(viewId) {
|
|
418
|
-
|
|
425
|
+
const id = normalizeViewId(viewId);
|
|
426
|
+
await this.request(`/view/${id}`, { method: "DELETE" });
|
|
419
427
|
}
|
|
420
428
|
async getListTemplates(teamId) {
|
|
421
429
|
const data = await this.request(`/team/${teamId}/list_template`);
|
|
@@ -1113,13 +1121,15 @@ var ClickUpClient = class {
|
|
|
1113
1121
|
});
|
|
1114
1122
|
}
|
|
1115
1123
|
async getViewComments(viewId) {
|
|
1116
|
-
const
|
|
1124
|
+
const id = normalizeViewId(viewId);
|
|
1125
|
+
const data = await this.request(`/view/${id}/comment`);
|
|
1117
1126
|
return readCollectionField(data, "comments", "view comments");
|
|
1118
1127
|
}
|
|
1119
1128
|
async postViewComment(viewId, commentText, notifyAll, richBlocks) {
|
|
1129
|
+
const id = normalizeViewId(viewId);
|
|
1120
1130
|
const body = richBlocks ? { comment: richBlocks } : { comment_text: commentText };
|
|
1121
1131
|
if (notifyAll) body.notify_all = true;
|
|
1122
|
-
return this.request(`/view/${
|
|
1132
|
+
return this.request(`/view/${id}/comment`, {
|
|
1123
1133
|
method: "POST",
|
|
1124
1134
|
body: JSON.stringify(body)
|
|
1125
1135
|
});
|
|
@@ -4719,6 +4729,14 @@ var commandMetadata = [
|
|
|
4719
4729
|
flags: ["--json"],
|
|
4720
4730
|
quickReference: [{ section: "read", usage: "view <viewId>", description: "Get view details" }]
|
|
4721
4731
|
},
|
|
4732
|
+
{
|
|
4733
|
+
name: "view-tasks",
|
|
4734
|
+
description: "List tasks in a view",
|
|
4735
|
+
flags: ["--me", "--json"],
|
|
4736
|
+
quickReference: [
|
|
4737
|
+
{ section: "read", usage: "view-tasks <viewId>", description: "List tasks in a view" }
|
|
4738
|
+
]
|
|
4739
|
+
},
|
|
4722
4740
|
{
|
|
4723
4741
|
name: "view-create",
|
|
4724
4742
|
description: "Create a view on a list",
|
|
@@ -8033,6 +8051,22 @@ function formatViewMarkdown(view) {
|
|
|
8033
8051
|
return lines.join("\n");
|
|
8034
8052
|
}
|
|
8035
8053
|
|
|
8054
|
+
// src/commands/view-tasks.ts
|
|
8055
|
+
async function listViewTasks(config, viewId, opts) {
|
|
8056
|
+
const client = new ClickUpClient(config);
|
|
8057
|
+
const [tasks, customTypes] = await Promise.all([
|
|
8058
|
+
client.getViewTasks(viewId),
|
|
8059
|
+
client.getCustomTaskTypes(config.teamId)
|
|
8060
|
+
]);
|
|
8061
|
+
const typeMap = buildTypeMap(customTypes);
|
|
8062
|
+
let filtered = tasks;
|
|
8063
|
+
if (opts.me) {
|
|
8064
|
+
const me = await client.getMe();
|
|
8065
|
+
filtered = tasks.filter((t) => t.assignees.some((a) => Number(a.id) === me.id));
|
|
8066
|
+
}
|
|
8067
|
+
return filtered.map((t) => summarize(t, typeMap));
|
|
8068
|
+
}
|
|
8069
|
+
|
|
8036
8070
|
// src/commands/view-create.ts
|
|
8037
8071
|
var VALID_VIEW_TYPES = ["list", "board", "calendar", "gantt", "table", "timeline"];
|
|
8038
8072
|
var VALID_GROUP_BY_FIELDS = [
|
|
@@ -10208,6 +10242,13 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
|
|
|
10208
10242
|
}
|
|
10209
10243
|
})
|
|
10210
10244
|
);
|
|
10245
|
+
program.command("view-tasks <viewId>").description("List tasks in a view").option("--me", "Only tasks assigned to the current user").option("--json", "Force JSON output even in terminal").action(
|
|
10246
|
+
wrapAction(async (viewId, opts) => {
|
|
10247
|
+
const config = loadConfig(getProfileName());
|
|
10248
|
+
const tasks = await listViewTasks(config, viewId, { me: opts.me });
|
|
10249
|
+
await printTasks(tasks, opts.json ?? false, config);
|
|
10250
|
+
})
|
|
10251
|
+
);
|
|
10211
10252
|
program.command("view-create <listId> <name>").description("Create a view on a list").requiredOption(
|
|
10212
10253
|
"-t, --type <type>",
|
|
10213
10254
|
"View type (list, board, calendar, gantt, table, timeline)"
|
package/package.json
CHANGED
|
@@ -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.37.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.37.0, update with `npm install -g @krodak/clickup-cli` and refresh this skill with `cup skill`.
|
|
11
11
|
|
|
12
12
|
## Install & Configure
|
|
13
13
|
|
|
@@ -144,6 +144,7 @@ All commands support `--help` for full flag details. All commands support `--jso
|
|
|
144
144
|
| `cup folder-templates` | Folder templates |
|
|
145
145
|
| `cup views <listId>` | List views on a list |
|
|
146
146
|
| `cup view <viewId>` | Get view details |
|
|
147
|
+
| `cup view-tasks <viewId> [--me]` | List tasks in a view (`--me` filters to you) |
|
|
147
148
|
| `cup open <query>` | Open task in browser by ID or name |
|
|
148
149
|
| `cup auth` | Check authentication status |
|
|
149
150
|
| `cup list-comments <listId>` | Comments on a list |
|
|
@@ -266,6 +267,7 @@ All commands support `--help` for full flag details. All commands support `--jso
|
|
|
266
267
|
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
267
268
|
| Task IDs | Native (`abc123def`) or custom (`PROJ-123`). Custom IDs auto-detected by `PREFIX-DIGITS` format |
|
|
268
269
|
| Task URLs | All commands that accept a task ID also accept full ClickUp URLs (`https://app.clickup.com/t/<id>` or `https://app.clickup.com/t/<workspace>/<id>`). The ID is auto-extracted |
|
|
270
|
+
| View URLs | All commands that accept a view ID also accept full ClickUp view URLs (`https://app.clickup.com/<workspace>/v/<type>/<viewId>`). The ID is auto-extracted |
|
|
269
271
|
| `--status` | Fuzzy matching: exact > starts-with > contains. Prints match to stderr |
|
|
270
272
|
| `--priority` | Names (`urgent`, `high`, `normal`, `low`) or numbers (1-4) |
|
|
271
273
|
| `--due-date` | `YYYY-MM-DD` (date only), `YYYY-MM-DDTHH:MM` (with time), or full ISO 8601 with offset. Time-of-day formats set `due_date_time: true` in ClickUp |
|