@krodak/clickup-cli 1.42.0 → 1.43.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.
@@ -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.42.0",
4
+ "version": "1.43.0",
5
5
  "author": {
6
6
  "name": "Krzysztof Rodak"
7
7
  },
package/dist/index.js CHANGED
@@ -1163,6 +1163,10 @@ var VALID_FAVORITE_TYPES = /* @__PURE__ */ new Set([
1163
1163
  "view",
1164
1164
  "task"
1165
1165
  ]);
1166
+ function looksLikeTaskId(value) {
1167
+ if (/^[A-Za-z]+-\d+$/.test(value)) return true;
1168
+ return value.length >= 6 && /^[a-z0-9]+$/i.test(value) && /\d/.test(value);
1169
+ }
1166
1170
  function isFilterEntry(v) {
1167
1171
  if (!isRecord(v)) return false;
1168
1172
  if (!Array.isArray(v.command)) return false;
@@ -1370,7 +1374,9 @@ function loadConfig(profileName) {
1370
1374
  const profile = multi.profiles[resolvedProfile];
1371
1375
  if (!profile) {
1372
1376
  const available = Object.keys(multi.profiles).join(", ");
1373
- throw new Error(`Profile "${resolvedProfile}" not found. Available: ${available}`);
1377
+ throw new Error(
1378
+ `Profile "${resolvedProfile}" not found. Available: ${available}` + (looksLikeTaskId(resolvedProfile) ? `. That looks like a task ID \u2014 note that -p is --profile, not --parent. For a subtask use: cup create --parent ${resolvedProfile} ...` : "")
1379
+ );
1374
1380
  }
1375
1381
  const apiToken = envToken ?? profile.apiToken?.trim();
1376
1382
  if (!apiToken) {
@@ -3466,12 +3472,12 @@ async function runAssignedCommand(config, opts) {
3466
3472
  }
3467
3473
 
3468
3474
  // src/commands/open.ts
3469
- function looksLikeTaskId(query) {
3475
+ function looksLikeTaskId2(query) {
3470
3476
  return /^[a-z0-9]+$/i.test(query) && query.length <= 12 || isCustomTaskId(query);
3471
3477
  }
3472
3478
  async function openTask(config, query, opts = {}) {
3473
3479
  const client = new ClickUpClient(config);
3474
- if (looksLikeTaskId(query)) {
3480
+ if (looksLikeTaskId2(query)) {
3475
3481
  let task;
3476
3482
  try {
3477
3483
  task = await client.getTask(query);
@@ -3952,7 +3958,6 @@ var commandMetadata = [
3952
3958
  "-d",
3953
3959
  "--description",
3954
3960
  "--description-file",
3955
- "-p",
3956
3961
  "--parent",
3957
3962
  "-s",
3958
3963
  "--status",
@@ -5327,7 +5332,7 @@ ${renderZshTopLevelCommands(name)}
5327
5332
  '(-n --name)'{-n,--name}'[Task name]:name:' \\
5328
5333
  '(-d --description)'{-d,--description}'[Task description]:text:' \\
5329
5334
  '--description-file[Read description from a file (- for stdin)]:path:_files' \\
5330
- '(-p --parent)'{-p,--parent}'[Parent task ID]:task_id:' \\
5335
+ '--parent[Parent task ID]:task_id:' \\
5331
5336
  '(-s --status)'{-s,--status}'[Initial status]:status:(open "in progress" "in review" done closed)' \\
5332
5337
  '--priority[Priority level]:priority:(urgent high normal low)' \\
5333
5338
  '--due-date[Due date]:date:' \\
@@ -8953,7 +8958,9 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
8953
8958
  "--description-file <path>",
8954
8959
  'Read description from a file ("-" for stdin); avoids shell quoting. Mutually exclusive with -d'
8955
8960
  ).option(
8956
- "-p, --parent <taskId>",
8961
+ // No -p short flag: it collides with the global -p, --profile and would be
8962
+ // parsed as the profile name (see the global-option-collision test).
8963
+ "--parent <taskId>",
8957
8964
  "Parent task: native id, custom id (e.g. PROD-811), or task URL (list auto-detected)"
8958
8965
  ).option("-s, --status <status>", "Initial status").option("--priority <level>", "Priority: urgent, high, normal, low (or 1-4)").option(
8959
8966
  "--due-date <date>",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krodak/clickup-cli",
3
- "version": "1.42.0",
3
+ "version": "1.43.0",
4
4
  "description": "ClickUp CLI for AI agents and humans",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -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.42.0
6
+ # ClickUp CLI (`cup`) - skill version 1.43.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.42.0, update with `npm install -g @krodak/clickup-cli` and refresh this skill with `cup skill`.
10
+ > **Version check:** Run `cup --version`. If your installed version is older than 1.43.0, update with `npm install -g @krodak/clickup-cli` and refresh this skill with `cup skill`.
11
11
 
12
12
  ## Install & Configure
13
13
 
@@ -163,7 +163,7 @@ All commands support `--help` for full flag details. All commands support `--jso
163
163
 
164
164
  | Command | What it does |
165
165
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
166
- | `cup create -n name [-l listId\|sprint:current] [-p parentId] [-d desc\|--description-file path] [-s status] [--priority p] [--due-date d] [--start-date d] [--time-estimate t] [--assignee id\|me] [--group-assignee uuid\|@handle,...] [--tags t] [--custom-item-id n] [--template id] [--field "Name" val]` | Create task (`--list` accepts `sprint:current`, `--field` sets custom fields inline; `--description-file` reads markdown from a file or `-` for stdin) |
166
+ | `cup create -n name [-l listId\|sprint:current] [--parent parentId] [-d desc\|--description-file path] [-s status] [--priority p] [--due-date d] [--start-date d] [--time-estimate t] [--assignee id\|me] [--group-assignee uuid\|@handle,...] [--tags t] [--custom-item-id n] [--template id] [--field "Name" val]` | Create task (`--list` accepts `sprint:current`, `--field` sets custom fields inline; `--description-file` reads markdown from a file or `-` for stdin) |
167
167
  | `cup update <id> [-n name] [-d desc\|--description-file path] [-s status] [--priority p] [--due-date d\|none] [--start-date d] [--time-estimate t] [--assignee id\|me] [--remove-assignee id\|me] [--group-assignee uuid\|@handle] [--remove-group-assignee uuid\|@handle] [--parent id] [--archive] [--unarchive] [--type type] [--field "Name" val]` | Update task fields (`--description-file` reads markdown from a file or `-` for stdin) |
168
168
  | `cup comment <id> -m text\|--message-file path [--notify-all] [--mention user]` | Post comment (markdown auto-converted to rich text; `--message-file` reads from a file or `-` for stdin; `--mention` for real @mentions, repeatable) |
169
169
  | `cup comment-edit <commentId> -m text\|--message-file path [--resolved] [--unresolved] [--mention user]` | Edit a comment (markdown auto-converted to rich text; `--mention` for real @mentions) |
@@ -261,6 +261,10 @@ All commands support `--help` for full flag details. All commands support `--jso
261
261
  | `-p, --profile <n>` | Use a specific profile for this command |
262
262
  | `--json` | Force JSON output (available on all commands) |
263
263
 
264
+ > **`-p` is always `--profile`, never `--parent`.** Global short flags win over subcommand
265
+ > ones, so `cup create -p <taskId>` fails with `Profile "<taskId>" not found`. Use
266
+ > `cup create --parent <taskId>`.
267
+
264
268
  ## Flags & Conventions
265
269
 
266
270
  | Topic | Detail |
@@ -352,7 +356,7 @@ cup update abc123def -s "done"
352
356
  cup update abc123def --priority high --due-date 2025-03-15
353
357
  cup update abc123def --due-date 2025-03-15T14:30 # date + time (user's timezone)
354
358
  cup update abc123def --due-date 2025-03-15T14:30:00Z # UTC
355
- cup create -n "Fix the thing" -p abc123def
359
+ cup create -n "Fix the thing" --parent abc123def # -p is the global --profile, not --parent
356
360
  cup create -n "Fix bug" -l <listId> --priority urgent --tags "bug,frontend"
357
361
  cup create -n "Bug fix" -l sprint:current # create in active sprint
358
362
  cup create -n "Q3 Roadmap" -l <listId> --custom-item-id 1