@krodak/clickup-cli 0.9.0 → 0.9.1
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/README.md +1 -0
- package/dist/index.js +16 -7
- package/package.json +1 -1
- package/skills/clickup-cli/SKILL.md +7 -4
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -135,6 +135,7 @@ var ClickUpClient = class {
|
|
|
135
135
|
const baseParams = new URLSearchParams({
|
|
136
136
|
subtasks: String(filters.subtasks ?? true)
|
|
137
137
|
});
|
|
138
|
+
if (filters.includeClosed) baseParams.set("include_closed", "true");
|
|
138
139
|
baseParams.append("assignees[]", String(me.id));
|
|
139
140
|
for (const s of filters.statuses ?? []) baseParams.append("statuses[]", s);
|
|
140
141
|
for (const id of filters.listIds ?? []) baseParams.append("list_ids[]", id);
|
|
@@ -161,9 +162,11 @@ var ClickUpClient = class {
|
|
|
161
162
|
const data = await this.request(`/task/${taskId}/comment`);
|
|
162
163
|
return data.comments ?? [];
|
|
163
164
|
}
|
|
164
|
-
async getTasksFromList(listId, params = {}) {
|
|
165
|
+
async getTasksFromList(listId, params = {}, options = {}) {
|
|
165
166
|
return this.paginate((page) => {
|
|
166
|
-
const
|
|
167
|
+
const base = { subtasks: "true", page: String(page), ...params };
|
|
168
|
+
if (options.includeClosed) base["include_closed"] = "true";
|
|
169
|
+
const qs = new URLSearchParams(base).toString();
|
|
167
170
|
return `/list/${listId}/task?${qs}`;
|
|
168
171
|
});
|
|
169
172
|
}
|
|
@@ -974,10 +977,14 @@ async function listSprints(config, opts = {}) {
|
|
|
974
977
|
}
|
|
975
978
|
|
|
976
979
|
// src/commands/subtasks.ts
|
|
977
|
-
async function fetchSubtasks(config, taskId) {
|
|
980
|
+
async function fetchSubtasks(config, taskId, options = {}) {
|
|
978
981
|
const client = new ClickUpClient(config);
|
|
979
982
|
const parent = await client.getTask(taskId);
|
|
980
|
-
const tasks = await client.getTasksFromList(
|
|
983
|
+
const tasks = await client.getTasksFromList(
|
|
984
|
+
parent.list.id,
|
|
985
|
+
{ parent: taskId, subtasks: "false" },
|
|
986
|
+
{ includeClosed: options.includeClosed }
|
|
987
|
+
);
|
|
981
988
|
return tasks.map(summarize);
|
|
982
989
|
}
|
|
983
990
|
|
|
@@ -1244,7 +1251,9 @@ function groupByStatus(tasks, includeClosed) {
|
|
|
1244
1251
|
}
|
|
1245
1252
|
async function runAssignedCommand(config, opts) {
|
|
1246
1253
|
const client = new ClickUpClient(config);
|
|
1247
|
-
const allTasks = await client.getMyTasks(config.teamId
|
|
1254
|
+
const allTasks = await client.getMyTasks(config.teamId, {
|
|
1255
|
+
includeClosed: opts.includeClosed
|
|
1256
|
+
});
|
|
1248
1257
|
const groups = groupByStatus(allTasks, opts.includeClosed ?? false);
|
|
1249
1258
|
if (shouldOutputJson(opts.json ?? false)) {
|
|
1250
1259
|
const result = {};
|
|
@@ -2076,10 +2085,10 @@ program.command("sprints").description("List all sprints in sprint folders").opt
|
|
|
2076
2085
|
await listSprints(config, opts);
|
|
2077
2086
|
})
|
|
2078
2087
|
);
|
|
2079
|
-
program.command("subtasks <taskId>").description("List subtasks of a task or initiative").option("--json", "Force JSON output even in terminal").action(
|
|
2088
|
+
program.command("subtasks <taskId>").description("List subtasks of a task or initiative").option("--include-closed", "Include closed/done subtasks").option("--json", "Force JSON output even in terminal").action(
|
|
2080
2089
|
wrapAction(async (taskId, opts) => {
|
|
2081
2090
|
const config = loadConfig();
|
|
2082
|
-
const tasks = await fetchSubtasks(config, taskId);
|
|
2091
|
+
const tasks = await fetchSubtasks(config, taskId, { includeClosed: opts.includeClosed });
|
|
2083
2092
|
await printTasks(tasks, opts.json ?? false, config);
|
|
2084
2093
|
})
|
|
2085
2094
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: clickup
|
|
3
|
-
description: 'Use when managing ClickUp tasks, initiatives, sprints, or comments via the `cu` CLI tool. Triggers: task queries, status updates, sprint tracking, creating subtasks, posting comments, standup summaries, searching tasks, checking overdue items.'
|
|
3
|
+
description: 'Use when managing ClickUp tasks, initiatives, sprints, or comments via the `cu` CLI tool. Triggers: task queries, status updates, sprint tracking, creating subtasks, posting comments, standup summaries, searching tasks, checking overdue items, assigning tasks, listing spaces and lists, opening tasks in browser, checking auth or config.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# ClickUp CLI (`cu`)
|
|
@@ -43,7 +43,7 @@ All commands support `--help` for full flag details.
|
|
|
43
43
|
| `cu sprints [--space nameOrId] [--json]` | List all sprints (marks active with \*) |
|
|
44
44
|
| `cu search <query> [--status s] [--json]` | Search my tasks by name (multi-word, fuzzy status) |
|
|
45
45
|
| `cu task <id> [--json]` | Single task details |
|
|
46
|
-
| `cu subtasks <id> [--json]`
|
|
46
|
+
| `cu subtasks <id> [--include-closed] [--json]` | Subtasks of a task or initiative |
|
|
47
47
|
| `cu comments <id> [--json]` | Comments on a task |
|
|
48
48
|
| `cu activity <id> [--json]` | Task details + comment history combined |
|
|
49
49
|
| `cu inbox [--days n] [--json]` | Tasks updated in last n days (default 30) |
|
|
@@ -79,6 +79,7 @@ All commands support `--help` for full flag details.
|
|
|
79
79
|
| `--tags` | Comma-separated (e.g. `--tags "bug,frontend"`) |
|
|
80
80
|
| `--space` | Partial name match or exact ID |
|
|
81
81
|
| `--name` | Partial match, case-insensitive |
|
|
82
|
+
| `--include-closed` | Include closed/done tasks (on `subtasks` and `assigned`) |
|
|
82
83
|
| `cu assign --to me` | Shorthand for your own user ID |
|
|
83
84
|
| `cu search` | Matches all query words against task name, case-insensitive |
|
|
84
85
|
| `cu sprint` | Auto-detects active sprint via view API and date range parsing |
|
|
@@ -96,7 +97,8 @@ All commands support `--help` for full flag details.
|
|
|
96
97
|
|
|
97
98
|
```bash
|
|
98
99
|
cu task abc123def # markdown summary
|
|
99
|
-
cu subtasks abc123def # child tasks
|
|
100
|
+
cu subtasks abc123def # child tasks (open only)
|
|
101
|
+
cu subtasks abc123def --include-closed # all child tasks
|
|
100
102
|
cu comments abc123def # discussion
|
|
101
103
|
cu activity abc123def # task + comments combined
|
|
102
104
|
```
|
|
@@ -129,7 +131,8 @@ cu assign abc123def --to me
|
|
|
129
131
|
|
|
130
132
|
```bash
|
|
131
133
|
cu spaces # all spaces
|
|
132
|
-
cu
|
|
134
|
+
cu spaces --name "Engineering" # find space ID by name
|
|
135
|
+
cu lists <spaceId> # lists in a space (needs ID from cu spaces)
|
|
133
136
|
cu sprints # all sprints across folders
|
|
134
137
|
cu auth # verify token works
|
|
135
138
|
```
|