@krodak/clickup-cli 1.40.0 → 1.41.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 +74 -21
- package/package.json +1 -1
- package/skills/clickup-cli/SKILL.md +36 -35
|
@@ -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.41.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Krzysztof Rodak"
|
|
7
7
|
},
|
package/dist/index.js
CHANGED
|
@@ -2451,7 +2451,9 @@ async function createTask(config, options) {
|
|
|
2451
2451
|
}
|
|
2452
2452
|
|
|
2453
2453
|
// src/text-input.ts
|
|
2454
|
-
import { readFileSync } from "fs";
|
|
2454
|
+
import { readFileSync, readSync } from "fs";
|
|
2455
|
+
var STDIN_TIMEOUT_MS = 3e4;
|
|
2456
|
+
var STDIN_RETRY_MS = 5;
|
|
2455
2457
|
function resolveTextInput(args) {
|
|
2456
2458
|
const { inline, file, inlineFlag, fileFlag } = args;
|
|
2457
2459
|
if (inline !== void 0 && file !== void 0) {
|
|
@@ -2468,14 +2470,38 @@ function readTextFile(path, fileFlag) {
|
|
|
2468
2470
|
throw new Error(`Cannot read ${fileFlag} "${path}": ${err.message}`, { cause: err });
|
|
2469
2471
|
}
|
|
2470
2472
|
}
|
|
2473
|
+
function sleepSync(ms) {
|
|
2474
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
2475
|
+
}
|
|
2471
2476
|
function readStdin(fileFlag) {
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2477
|
+
const chunks = [];
|
|
2478
|
+
const buffer = Buffer.alloc(64 * 1024);
|
|
2479
|
+
const deadline = Date.now() + STDIN_TIMEOUT_MS;
|
|
2480
|
+
for (; ; ) {
|
|
2481
|
+
let bytesRead;
|
|
2482
|
+
try {
|
|
2483
|
+
bytesRead = readSync(0, buffer, 0, buffer.length, null);
|
|
2484
|
+
} catch (err) {
|
|
2485
|
+
const code = err.code;
|
|
2486
|
+
if (code === "EAGAIN") {
|
|
2487
|
+
if (Date.now() > deadline) {
|
|
2488
|
+
throw new Error(
|
|
2489
|
+
`Timed out reading ${fileFlag} from stdin after ${STDIN_TIMEOUT_MS / 1e3}s. Pass a file path instead of "-" if no input is being piped.`,
|
|
2490
|
+
{ cause: err }
|
|
2491
|
+
);
|
|
2492
|
+
}
|
|
2493
|
+
sleepSync(STDIN_RETRY_MS);
|
|
2494
|
+
continue;
|
|
2495
|
+
}
|
|
2496
|
+
if (code === "EOF") break;
|
|
2497
|
+
throw new Error(`Failed to read ${fileFlag} from stdin: ${err.message}`, {
|
|
2498
|
+
cause: err
|
|
2499
|
+
});
|
|
2500
|
+
}
|
|
2501
|
+
if (bytesRead === 0) break;
|
|
2502
|
+
chunks.push(Buffer.from(buffer.subarray(0, bytesRead)));
|
|
2478
2503
|
}
|
|
2504
|
+
return Buffer.concat(chunks).toString("utf8");
|
|
2479
2505
|
}
|
|
2480
2506
|
|
|
2481
2507
|
// src/commands/get.ts
|
|
@@ -4201,7 +4227,7 @@ var commandMetadata = [
|
|
|
4201
4227
|
{
|
|
4202
4228
|
name: "field",
|
|
4203
4229
|
description: "Set or remove a custom field value on a task",
|
|
4204
|
-
flags: ["--set", "--remove", "--json"],
|
|
4230
|
+
flags: ["--set", "--value-file", "--remove", "--json"],
|
|
4205
4231
|
quickReference: [
|
|
4206
4232
|
{
|
|
4207
4233
|
section: "write",
|
|
@@ -5438,6 +5464,7 @@ ${renderZshTopLevelCommands(name)}
|
|
|
5438
5464
|
_arguments \\
|
|
5439
5465
|
'1:task_id:' \\
|
|
5440
5466
|
'--set[Set field name and value]:name_and_value:' \\
|
|
5467
|
+
'--value-file[Read the field value from a file (- for stdin)]:path:_files' \\
|
|
5441
5468
|
'--remove[Remove field value by name]:field_name:' \\
|
|
5442
5469
|
'--json[Force JSON output]'
|
|
5443
5470
|
;;
|
|
@@ -8656,6 +8683,27 @@ function splitCommaList(value) {
|
|
|
8656
8683
|
function collect(value, previous) {
|
|
8657
8684
|
return [...previous, value];
|
|
8658
8685
|
}
|
|
8686
|
+
function resolveFieldSet(set, valueFile) {
|
|
8687
|
+
if (set.length > 2) {
|
|
8688
|
+
throw new Error("--set requires exactly two arguments: field name and value");
|
|
8689
|
+
}
|
|
8690
|
+
const name = set[0];
|
|
8691
|
+
if (name === void 0) {
|
|
8692
|
+
throw new Error("--set requires a field name");
|
|
8693
|
+
}
|
|
8694
|
+
const value = resolveTextInput({
|
|
8695
|
+
inline: set[1],
|
|
8696
|
+
file: valueFile,
|
|
8697
|
+
inlineFlag: "--set <value>",
|
|
8698
|
+
fileFlag: "--value-file"
|
|
8699
|
+
});
|
|
8700
|
+
if (value === void 0) {
|
|
8701
|
+
throw new Error(
|
|
8702
|
+
'--set requires a value: pass it inline (--set "Field Name" value) or use --value-file'
|
|
8703
|
+
);
|
|
8704
|
+
}
|
|
8705
|
+
return [name, value];
|
|
8706
|
+
}
|
|
8659
8707
|
function resolveRequiredMessage(opts) {
|
|
8660
8708
|
const message = resolveTextInput({
|
|
8661
8709
|
inline: opts.message,
|
|
@@ -9357,16 +9405,18 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
|
|
|
9357
9405
|
}
|
|
9358
9406
|
})
|
|
9359
9407
|
);
|
|
9360
|
-
program.command("field <taskId>").description("Set or remove a custom field value on a task").option("--set <nameAndValue...>", 'Set field: --set "Field Name" value').option(
|
|
9408
|
+
program.command("field <taskId>").description("Set or remove a custom field value on a task").option("--set <nameAndValue...>", 'Set field: --set "Field Name" value').option(
|
|
9409
|
+
"--value-file <path>",
|
|
9410
|
+
'Read the field value from a file ("-" for stdin); use with --set "Field Name". Avoids shell quoting'
|
|
9411
|
+
).option("--remove <fieldName>", "Remove field value by name").option("--json", "Force JSON output even in terminal").action(
|
|
9361
9412
|
wrapAction(
|
|
9362
9413
|
async (taskId, opts) => {
|
|
9363
9414
|
const config = loadConfig(getProfileName());
|
|
9364
9415
|
const fieldOpts = {};
|
|
9365
9416
|
if (opts.set) {
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
fieldOpts.set = [opts.set[0], opts.set[1]];
|
|
9417
|
+
fieldOpts.set = resolveFieldSet(opts.set, opts.valueFile);
|
|
9418
|
+
} else if (opts.valueFile !== void 0) {
|
|
9419
|
+
throw new Error('--value-file requires --set "Field Name"');
|
|
9370
9420
|
}
|
|
9371
9421
|
if (opts.remove) {
|
|
9372
9422
|
fieldOpts.remove = opts.remove;
|
|
@@ -9905,15 +9955,18 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
|
|
|
9905
9955
|
outputBulkResult(result, opts.json ?? false, `priority ${opts.to}`);
|
|
9906
9956
|
})
|
|
9907
9957
|
);
|
|
9908
|
-
bulkCmd.command("field <taskIds...>").description("Bulk set the same custom field value on tasks").requiredOption("--set <nameAndValue...>", 'Set field: --set "Field Name" value').option(
|
|
9909
|
-
|
|
9910
|
-
|
|
9911
|
-
|
|
9958
|
+
bulkCmd.command("field <taskIds...>").description("Bulk set the same custom field value on tasks").requiredOption("--set <nameAndValue...>", 'Set field: --set "Field Name" value').option(
|
|
9959
|
+
"--value-file <path>",
|
|
9960
|
+
'Read the field value from a file ("-" for stdin); use with --set "Field Name"'
|
|
9961
|
+
).option("--json", "Force JSON output even in terminal").action(
|
|
9962
|
+
wrapAction(
|
|
9963
|
+
async (taskIds, opts) => {
|
|
9964
|
+
const [fieldName, fieldValue] = resolveFieldSet(opts.set, opts.valueFile);
|
|
9965
|
+
const config = loadConfig(getProfileName());
|
|
9966
|
+
const result = await bulkField(config, fieldName, fieldValue, taskIds);
|
|
9967
|
+
outputBulkResult(result, opts.json ?? false, `field "${fieldName}"`);
|
|
9912
9968
|
}
|
|
9913
|
-
|
|
9914
|
-
const result = await bulkField(config, opts.set[0], opts.set[1], taskIds);
|
|
9915
|
-
outputBulkResult(result, opts.json ?? false, `field "${opts.set[0]}"`);
|
|
9916
|
-
})
|
|
9969
|
+
)
|
|
9917
9970
|
);
|
|
9918
9971
|
bulkCmd.command("move <taskIds...>").description("Move multiple tasks to a single destination list").requiredOption("--to <listId>", "Destination list ID").option("--json", "Force JSON output even in terminal").action(
|
|
9919
9972
|
wrapAction(async (taskIds, opts) => {
|
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.41.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.41.0, update with `npm install -g @krodak/clickup-cli` and refresh this skill with `cup skill`.
|
|
11
11
|
|
|
12
12
|
## Install & Configure
|
|
13
13
|
|
|
@@ -173,7 +173,7 @@ All commands support `--help` for full flag details. All commands support `--jso
|
|
|
173
173
|
| `cup assign <id> [--to ids\|me] [--remove ids\|me] [--group uuid\|@handle,...] [--remove-group uuid\|@handle,...]` | Assign/unassign users and groups (all flags accept comma-separated values) |
|
|
174
174
|
| `cup depend <id> [--on taskId] [--blocks taskId] [--remove]` | Add/remove dependencies |
|
|
175
175
|
| `cup move <id> [--to listId\|sprint:current] [--remove listId]` | Add/remove task from lists. **`--to` + `--remove` together changes the task's _home_ list** (uses v3 `home_list` endpoint with auto status mapping). `--to` alone adds multi-list membership. `--to` accepts `sprint:current`. |
|
|
176
|
-
| `cup field <id> [--set "Name" value] [--remove "Name"]`
|
|
176
|
+
| `cup field <id> [--set "Name" value\|--set "Name" --value-file path] [--remove "Name"]` | Set/remove custom field values (`--value-file` reads the value from a file or `-` for stdin; use for long/free-text values) |
|
|
177
177
|
| `cup field-create <name> -t <type> [-d desc] [--options "a,b,c"] [--required] [--list id] [--lists id1,id2]` | Create a custom field — workspace-wide (default), on one list (`--list`), or bulk across lists (`--lists`, parallel, per-list reporting) |
|
|
178
178
|
| `cup tag <id> [--add tags] [--remove tags]` | Add/remove tags on a task |
|
|
179
179
|
| `cup link <taskId> <linksTo> [--remove]` | Link/unlink tasks |
|
|
@@ -263,38 +263,38 @@ All commands support `--help` for full flag details. All commands support `--jso
|
|
|
263
263
|
|
|
264
264
|
## Flags & Conventions
|
|
265
265
|
|
|
266
|
-
| Topic
|
|
267
|
-
|
|
|
268
|
-
| Task IDs
|
|
269
|
-
| Task URLs
|
|
270
|
-
| View URLs
|
|
271
|
-
| `--status`
|
|
272
|
-
| `--priority`
|
|
273
|
-
| `--due-date`
|
|
274
|
-
| `--assignee`
|
|
275
|
-
| `--tags`
|
|
276
|
-
| `--time-estimate`
|
|
277
|
-
| `--type`
|
|
278
|
-
| `--custom-item-id`
|
|
279
|
-
| `--space`
|
|
280
|
-
| `--name`
|
|
281
|
-
| `--all`
|
|
282
|
-
| `--include-closed`
|
|
283
|
-
| `--list` on create
|
|
284
|
-
| `cup field --set`
|
|
285
|
-
| `cup field-create`
|
|
286
|
-
| `--field` filter
|
|
287
|
-
| `--due-before/after`
|
|
288
|
-
| `--created-before/after`
|
|
289
|
-
| `cup sprint`
|
|
290
|
-
| `cup favorite`
|
|
291
|
-
| `cup link`
|
|
292
|
-
| `cup delete`
|
|
293
|
-
| Errors
|
|
294
|
-
| Rate limiting
|
|
295
|
-
| Multiline markdown (`-d` / `-m`) | **Best for agents:** use `--description-file <path>` / `--message-file <path>` (or `-` for stdin) to bypass shell quoting entirely — see the multiline example below. For inline multiline, use a **quoted heredoc** `"$(cat <<'EOF' … EOF)"` — it preserves backticks, newlines, and apostrophes. **Footgun:** never split a `$'...'` string with `'\''` for an apostrophe — the tail drops back to normal single quotes and `\n` becomes literal text (e.g. `$'…team'\''s…\n## Goals'` breaks). Plain double quotes execute backticks as commands. |
|
|
296
|
-
| `--mention <user>`
|
|
297
|
-
| Comment links
|
|
266
|
+
| Topic | Detail |
|
|
267
|
+
| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
268
|
+
| Task IDs | Native (`abc123def`) or custom (`PROJ-123`). Custom IDs auto-detected by `PREFIX-DIGITS` format |
|
|
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 |
|
|
271
|
+
| `--status` | Fuzzy matching: exact > starts-with > contains. Prints match to stderr |
|
|
272
|
+
| `--priority` | Names (`urgent`, `high`, `normal`, `low`) or numbers (1-4) |
|
|
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 |
|
|
274
|
+
| `--assignee` | User ID or `me` |
|
|
275
|
+
| `--tags` | Comma-separated (e.g. `--tags "bug,frontend"`) |
|
|
276
|
+
| `--time-estimate` | Duration: `"2h"`, `"30m"`, `"1h30m"`, or raw milliseconds |
|
|
277
|
+
| `--type` | `task` (regular) or custom type name/ID (e.g. `initiative`, `Bug`) |
|
|
278
|
+
| `--custom-item-id` | Custom task type ID for `cup create` (find with `cup task-types`) |
|
|
279
|
+
| `--space` | Partial name match or exact ID |
|
|
280
|
+
| `--name` | Partial match, case-insensitive |
|
|
281
|
+
| `--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) |
|
|
282
|
+
| `--include-closed` | Include closed/done tasks |
|
|
283
|
+
| `--list` on create | Optional when `--parent` is given (auto-detected). Accepts `sprint:current` pseudo-ID |
|
|
284
|
+
| `cup field --set` | Supports: text, number, checkbox (true/false), dropdown (option name), labels (comma-separated names), date (YYYY-MM-DD), url, email, emoji/rating (0-5), manual_progress (0-100), tasks/relationship (comma-separated task IDs), users/people (comma-separated user IDs). Names resolved case-insensitively; errors list available fields/options |
|
|
285
|
+
| `cup field-create` | Use `--options "a,b,c"` for `drop_down` and `labels` types (required). Other types don't need `--options` |
|
|
286
|
+
| `--field` filter | `--field "Name" value` on `tasks` and `search` requires `--list` to resolve field names to IDs |
|
|
287
|
+
| `--due-before/after` | `YYYY-MM-DD` date filters for due date range |
|
|
288
|
+
| `--created-before/after` | `YYYY-MM-DD` date filters for creation date range |
|
|
289
|
+
| `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 |
|
|
290
|
+
| `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 |
|
|
291
|
+
| `cup link` | Both IDs must be the same type (both custom or both native) |
|
|
292
|
+
| `cup delete` | DESTRUCTIVE. Requires `--confirm` in non-interactive mode. Cannot be undone |
|
|
293
|
+
| Errors | stderr with exit code 1. Strict parsing - excess/unknown arguments rejected |
|
|
294
|
+
| Rate limiting | The client auto-retries on HTTP 429 and transient 5xx (502/503/504) with `Retry-After`-aware backoff (up to 3 retries). Retry warnings go to stderr. No action needed by callers |
|
|
295
|
+
| Multiline markdown (`-d` / `-m` / field values) | **Best for agents:** use `--description-file <path>` / `--message-file <path>` / `--value-file <path>` (or `-` for stdin) to bypass shell quoting entirely — see the multiline example below. For inline multiline, use a **quoted heredoc** `"$(cat <<'EOF' … EOF)"` — it preserves backticks, newlines, and apostrophes. **Footgun:** never split a `$'...'` string with `'\''` for an apostrophe — the tail drops back to normal single quotes and `\n` becomes literal text (e.g. `$'…team'\''s…\n## Goals'` breaks). Plain double quotes execute backticks as commands. |
|
|
296
|
+
| `--mention <user>` | Real ClickUp @mention (notifies the user). Accepts ID, email, username, or `me`. Repeatable. Also: `<@userId>` inline token in `-m` for mid-sentence mentions. Bare `@Name` is NOT parsed (ambiguous). On `comment`, `reply`, `comment-edit`, `list-comment`, `view-comment` |
|
|
297
|
+
| Comment links | In comment messages, bare URLs (`https://...`) and markdown links (`[text](url)`) both render as clickable links. Unfurled preview cards are not supported (web-UI only) |
|
|
298
298
|
|
|
299
299
|
> **Note:** `cup search`, `cup tasks`, `cup overdue`, and `cup assigned` default to tasks assigned to the current user. Use `--all` to include tasks assigned to others. This matters when searching for parent initiatives or team-wide items.
|
|
300
300
|
|
|
@@ -393,6 +393,7 @@ Agents produce structured markdown (headings, bullets, code, apostrophes). Shell
|
|
|
393
393
|
cup create -n "Improve onboarding" -l <listId> --description-file /tmp/desc.md
|
|
394
394
|
cup update <taskId> --description-file /tmp/desc.md
|
|
395
395
|
cup comment <taskId> --message-file /tmp/comment.md
|
|
396
|
+
cup field <taskId> --set "Standup 4 - 6/25" --value-file /tmp/note.md
|
|
396
397
|
# "-" reads stdin:
|
|
397
398
|
printf '## Notes\n\nTeam'\''s update with `code`.' | cup update <taskId> --description-file -
|
|
398
399
|
|