@krodak/clickup-cli 1.20.0 → 1.21.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/README.md +1 -1
- package/dist/index.js +49 -0
- package/package.json +1 -1
- package/skills/clickup-cli/SKILL.md +26 -26
|
@@ -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.21.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Krzysztof Rodak"
|
|
7
7
|
},
|
package/README.md
CHANGED
|
@@ -167,7 +167,7 @@ Full CRUD for the core ClickUp workflow:
|
|
|
167
167
|
| 📄 **Docs** | List, read, create, edit, delete (v3 API) |
|
|
168
168
|
| ⏱️ **Time Tracking** | Start/stop timer, log entries, list/update/delete history |
|
|
169
169
|
| ☑️ **Checklists** | View, create, delete, add/edit/delete items |
|
|
170
|
-
| 🔧 **Custom Fields** | List, create, set, remove values (dropdown, date, checkbox, text, etc.)
|
|
170
|
+
| 🔧 **Custom Fields** | List, create, set, remove values (dropdown, labels, date, checkbox, text, etc.) |
|
|
171
171
|
| 🏷️ **Tags** | Add/remove on tasks, space-level create/update/delete |
|
|
172
172
|
| 🎯 **Goals & OKRs** | Goals CRUD, key results CRUD |
|
|
173
173
|
| 🏃 **Sprints** | Auto-detect active sprint, `sprint:current` pseudo-ID for move/create, flexible date parsing, config override, favorite sprint folders |
|
package/dist/index.js
CHANGED
|
@@ -407,6 +407,32 @@ var ClickUpClient = class {
|
|
|
407
407
|
async removeTaskFromList(taskId, listId) {
|
|
408
408
|
await this.request(`/list/${listId}/task/${taskId}`, { method: "DELETE" });
|
|
409
409
|
}
|
|
410
|
+
async moveTaskToList(taskId, listId) {
|
|
411
|
+
if (!this.teamId) {
|
|
412
|
+
throw new Error("teamId is required to move a task to a new home list");
|
|
413
|
+
}
|
|
414
|
+
const [task, destList] = await Promise.all([
|
|
415
|
+
this.getTask(taskId),
|
|
416
|
+
this.getListWithStatuses(listId)
|
|
417
|
+
]);
|
|
418
|
+
const taskStatus = task.status.status.toLowerCase();
|
|
419
|
+
const destStatuses = destList.statuses.map((s) => s.status.toLowerCase());
|
|
420
|
+
const statusMappings = [];
|
|
421
|
+
if (!destStatuses.includes(taskStatus)) {
|
|
422
|
+
const destStatus = destList.statuses.find((s) => s.type === "open") ?? destList.statuses[0];
|
|
423
|
+
if (!destStatus) {
|
|
424
|
+
throw new Error(`Destination list ${listId} has no statuses`);
|
|
425
|
+
}
|
|
426
|
+
statusMappings.push({
|
|
427
|
+
source_status: task.status.status,
|
|
428
|
+
destination_status: destStatus.status
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
await this.requestV3(`/workspaces/${this.teamId}/tasks/${taskId}/home_list/${listId}`, {
|
|
432
|
+
method: "PUT",
|
|
433
|
+
body: JSON.stringify({ status_mappings: statusMappings })
|
|
434
|
+
});
|
|
435
|
+
}
|
|
410
436
|
async setCustomFieldValue(taskId, fieldId, value) {
|
|
411
437
|
await this.request(this.taskPath(taskId, `/field/${fieldId}`), {
|
|
412
438
|
method: "POST",
|
|
@@ -5154,6 +5180,11 @@ async function moveTask(config, taskId, opts) {
|
|
|
5154
5180
|
}
|
|
5155
5181
|
const client = new ClickUpClient(config);
|
|
5156
5182
|
const messages = [];
|
|
5183
|
+
if (opts.to && opts.remove) {
|
|
5184
|
+
await client.moveTaskToList(taskId, opts.to);
|
|
5185
|
+
messages.push(`Moved ${taskId} from list ${opts.remove} to list ${opts.to}`);
|
|
5186
|
+
return messages.join("; ");
|
|
5187
|
+
}
|
|
5157
5188
|
if (opts.to) {
|
|
5158
5189
|
await client.addTaskToList(taskId, opts.to);
|
|
5159
5190
|
messages.push(`Added ${taskId} to list ${opts.to}`);
|
|
@@ -5184,6 +5215,7 @@ var SUPPORTED_TYPES = /* @__PURE__ */ new Set([
|
|
|
5184
5215
|
"currency",
|
|
5185
5216
|
"phone",
|
|
5186
5217
|
"drop_down",
|
|
5218
|
+
"labels",
|
|
5187
5219
|
"checkbox",
|
|
5188
5220
|
"date",
|
|
5189
5221
|
"url",
|
|
@@ -5229,6 +5261,23 @@ function parseFieldValue(field, rawValue) {
|
|
|
5229
5261
|
}
|
|
5230
5262
|
return option.orderindex;
|
|
5231
5263
|
}
|
|
5264
|
+
case "labels": {
|
|
5265
|
+
const options = field.type_config?.options;
|
|
5266
|
+
if (!options?.length) throw new Error("Labels field has no configured options");
|
|
5267
|
+
const names = rawValue.split(",").map((s) => s.trim()).filter(Boolean);
|
|
5268
|
+
if (names.length === 0) throw new Error("Provide at least one label name (comma-separated)");
|
|
5269
|
+
const ids = [];
|
|
5270
|
+
for (const name of names) {
|
|
5271
|
+
const lower = name.toLowerCase();
|
|
5272
|
+
const option = options.find((o) => o.name.toLowerCase() === lower);
|
|
5273
|
+
if (!option) {
|
|
5274
|
+
const available = options.map((o) => o.name).join(", ");
|
|
5275
|
+
throw new Error(`Label "${name}" not found. Available: ${available}`);
|
|
5276
|
+
}
|
|
5277
|
+
ids.push(String(option.id));
|
|
5278
|
+
}
|
|
5279
|
+
return ids;
|
|
5280
|
+
}
|
|
5232
5281
|
case "date": {
|
|
5233
5282
|
const ms = new Date(rawValue).getTime();
|
|
5234
5283
|
if (!Number.isFinite(ms))
|
package/package.json
CHANGED
|
@@ -219,32 +219,32 @@ All commands support `--help` for full flag details. All commands support `--jso
|
|
|
219
219
|
|
|
220
220
|
## Flags & Conventions
|
|
221
221
|
|
|
222
|
-
| Topic | Detail
|
|
223
|
-
| ------------------------ |
|
|
224
|
-
| Task IDs | Native (`abc123def`) or custom (`PROJ-123`). Custom IDs auto-detected by `PREFIX-DIGITS` format
|
|
225
|
-
| `--status` | Fuzzy matching: exact > starts-with > contains. Prints match to stderr
|
|
226
|
-
| `--priority` | Names (`urgent`, `high`, `normal`, `low`) or numbers (1-4)
|
|
227
|
-
| `--due-date` | `YYYY-MM-DD` format
|
|
228
|
-
| `--assignee` | User ID or `me`
|
|
229
|
-
| `--tags` | Comma-separated (e.g. `--tags "bug,frontend"`)
|
|
230
|
-
| `--time-estimate` | Duration: `"2h"`, `"30m"`, `"1h30m"`, or raw milliseconds
|
|
231
|
-
| `--type` | `task` (regular) or custom type name/ID (e.g. `initiative`, `Bug`)
|
|
232
|
-
| `--custom-item-id` | Custom task type ID for `cup create` (find with `cup task-types`)
|
|
233
|
-
| `--space` | Partial name match or exact ID
|
|
234
|
-
| `--name` | Partial match, case-insensitive
|
|
235
|
-
| `--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)
|
|
236
|
-
| `--include-closed` | Include closed/done tasks
|
|
237
|
-
| `--list` on create | Optional when `--parent` is given (auto-detected). Accepts `sprint:current` pseudo-ID
|
|
238
|
-
| `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
|
|
239
|
-
| `cup field-create` | Use `--options "a,b,c"` for `drop_down` and `labels` types (required). Other types don't need `--options`
|
|
240
|
-
| `--field` filter | `--field "Name" value` on `tasks` and `search` requires `--list` to resolve field names to IDs
|
|
241
|
-
| `--due-before/after` | `YYYY-MM-DD` date filters for due date range
|
|
242
|
-
| `--created-before/after` | `YYYY-MM-DD` date filters for creation date range
|
|
243
|
-
| `cup sprint` | Auto-detects active sprint by folder name (sprint/iteration/cycle/scrum), parses multiple date formats. Override with `--folder <id>`, `cup config set sprintFolderId <id>`, or favorite a sprint folder
|
|
244
|
-
| `cup favorite` | Local-only favorites (not synced to ClickUp). Types: sprint-folder, space, list, folder, view, task. Favorited sprint-folders auto-used by sprint commands
|
|
245
|
-
| `cup link` | Both IDs must be the same type (both custom or both native)
|
|
246
|
-
| `cup delete` | DESTRUCTIVE. Requires `--confirm` in non-interactive mode. Cannot be undone
|
|
247
|
-
| Errors | stderr with exit code 1. Strict parsing - excess/unknown arguments rejected
|
|
222
|
+
| Topic | Detail |
|
|
223
|
+
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
224
|
+
| Task IDs | Native (`abc123def`) or custom (`PROJ-123`). Custom IDs auto-detected by `PREFIX-DIGITS` format |
|
|
225
|
+
| `--status` | Fuzzy matching: exact > starts-with > contains. Prints match to stderr |
|
|
226
|
+
| `--priority` | Names (`urgent`, `high`, `normal`, `low`) or numbers (1-4) |
|
|
227
|
+
| `--due-date` | `YYYY-MM-DD` format |
|
|
228
|
+
| `--assignee` | User ID or `me` |
|
|
229
|
+
| `--tags` | Comma-separated (e.g. `--tags "bug,frontend"`) |
|
|
230
|
+
| `--time-estimate` | Duration: `"2h"`, `"30m"`, `"1h30m"`, or raw milliseconds |
|
|
231
|
+
| `--type` | `task` (regular) or custom type name/ID (e.g. `initiative`, `Bug`) |
|
|
232
|
+
| `--custom-item-id` | Custom task type ID for `cup create` (find with `cup task-types`) |
|
|
233
|
+
| `--space` | Partial name match or exact ID |
|
|
234
|
+
| `--name` | Partial match, case-insensitive |
|
|
235
|
+
| `--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) |
|
|
236
|
+
| `--include-closed` | Include closed/done tasks |
|
|
237
|
+
| `--list` on create | Optional when `--parent` is given (auto-detected). Accepts `sprint:current` pseudo-ID |
|
|
238
|
+
| `cup field --set` | Supports: text, number, checkbox (true/false), dropdown (option name), labels (comma-separated names), date (YYYY-MM-DD), url, email. Names resolved case-insensitively; errors list available fields/options |
|
|
239
|
+
| `cup field-create` | Use `--options "a,b,c"` for `drop_down` and `labels` types (required). Other types don't need `--options` |
|
|
240
|
+
| `--field` filter | `--field "Name" value` on `tasks` and `search` requires `--list` to resolve field names to IDs |
|
|
241
|
+
| `--due-before/after` | `YYYY-MM-DD` date filters for due date range |
|
|
242
|
+
| `--created-before/after` | `YYYY-MM-DD` date filters for creation date range |
|
|
243
|
+
| `cup sprint` | Auto-detects active sprint by folder name (sprint/iteration/cycle/scrum), parses multiple date formats. Override with `--folder <id>`, `cup config set sprintFolderId <id>`, or favorite a sprint folder |
|
|
244
|
+
| `cup favorite` | Local-only favorites (not synced to ClickUp). Types: sprint-folder, space, list, folder, view, task. Favorited sprint-folders auto-used by sprint commands |
|
|
245
|
+
| `cup link` | Both IDs must be the same type (both custom or both native) |
|
|
246
|
+
| `cup delete` | DESTRUCTIVE. Requires `--confirm` in non-interactive mode. Cannot be undone |
|
|
247
|
+
| Errors | stderr with exit code 1. Strict parsing - excess/unknown arguments rejected |
|
|
248
248
|
|
|
249
249
|
## Agent Workflow Examples
|
|
250
250
|
|