@krodak/clickup-cli 1.46.0 → 1.46.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.
@@ -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.46.0",
4
+ "version": "1.46.1",
5
5
  "author": {
6
6
  "name": "Krzysztof Rodak"
7
7
  },
package/dist/index.js CHANGED
@@ -3893,6 +3893,24 @@ function printTimeInStatus(result, forceJson) {
3893
3893
  }
3894
3894
 
3895
3895
  // src/commands/metadata.ts
3896
+ var exportFlags = [
3897
+ { name: "--out", description: "Archive directory", value: "directory", completion: "directory" },
3898
+ { name: "--refresh", description: "Re-fetch cached tasks" },
3899
+ { name: "--no-attachments", description: "Skip attachment downloads" },
3900
+ { name: "--dry-run", description: "Print the plan only" },
3901
+ { name: "--rpm", description: "Requests per minute", value: "number" },
3902
+ { name: "--yes", description: "Skip confirmation" },
3903
+ { name: "--item-id", description: "Initiative custom item ID", value: "id" },
3904
+ { name: "--json", description: "Force JSON output" }
3905
+ ];
3906
+ var exportSubcommands = [
3907
+ { name: "user", description: "Export tasks assigned to a user", flags: exportFlags },
3908
+ { name: "team", description: "Export every list in a Space", flags: exportFlags },
3909
+ { name: "roadmap", description: "Export a roadmap List", flags: exportFlags },
3910
+ { name: "initiatives", description: "Export initiative task trees", flags: exportFlags },
3911
+ { name: "docs", description: "Export workspace Docs", flags: exportFlags },
3912
+ { name: "all", description: "Export the whole workspace", flags: exportFlags }
3913
+ ];
3896
3914
  var commandMetadata = [
3897
3915
  {
3898
3916
  name: "init",
@@ -4308,6 +4326,7 @@ var commandMetadata = [
4308
4326
  {
4309
4327
  name: "export",
4310
4328
  description: "Export tasks and docs to a local archive (lossless JSON + rendered markdown)",
4329
+ subcommands: exportSubcommands,
4311
4330
  quickReference: [
4312
4331
  {
4313
4332
  section: "read",
@@ -5188,11 +5207,21 @@ var bashSpecialCaseCommands = /* @__PURE__ */ new Set([
5188
5207
  "config",
5189
5208
  "profile",
5190
5209
  "completion",
5191
- "chat"
5210
+ "chat",
5211
+ "export"
5192
5212
  ]);
5213
+ var exportSubcommandNames = exportSubcommands.map((command) => command.name).join(" ");
5214
+ var exportFlags2 = exportSubcommands[0].flags;
5215
+ var exportFlagNames = exportFlags2.map((flag) => flag.name).join(" ");
5193
5216
  function escapeSingleQuotes(value) {
5194
5217
  return value.replaceAll("'", "'\\''");
5195
5218
  }
5219
+ function renderZshExportFlags() {
5220
+ return exportFlags2.map((flag) => {
5221
+ const value = flag.value ? `:${flag.value}:${flag.completion === "directory" ? "_files -/" : ""}` : "";
5222
+ return `'${flag.name}[${escapeSingleQuotes(flag.description)}]${value}'`;
5223
+ }).join(" ");
5224
+ }
5196
5225
  function renderBashCommandCases() {
5197
5226
  return commandMetadata.filter(
5198
5227
  (command) => !bashSpecialCaseCommands.has(command.name) && ((command.flags?.length ?? 0) > 0 || command.bashFileCompletion)
@@ -5234,7 +5263,7 @@ function renderFishTopLevelFlags(name) {
5234
5263
  }
5235
5264
  function bashCompletion(name) {
5236
5265
  return `_${name}_completions() {
5237
- local cur prev words cword
5266
+ local cur prev words cword candidate
5238
5267
 
5239
5268
  if type _init_completion &>/dev/null; then
5240
5269
  _init_completion || return
@@ -5255,6 +5284,15 @@ function bashCompletion(name) {
5255
5284
  local cmd="\${words[1]}"
5256
5285
 
5257
5286
  case "$prev" in
5287
+ --out)
5288
+ if [[ "$cmd" == "export" ]]; then
5289
+ COMPREPLY=()
5290
+ while IFS= read -r candidate; do
5291
+ COMPREPLY+=("$candidate")
5292
+ done < <(compgen -d -- "$cur")
5293
+ return
5294
+ fi
5295
+ ;;
5258
5296
  --priority)
5259
5297
  COMPREPLY=($(compgen -W "urgent high normal low" -- "$cur"))
5260
5298
  return
@@ -5316,6 +5354,13 @@ ${renderBashCommandCases()}
5316
5354
  COMPREPLY=($(compgen -W "channels channel send messages reply replies react unreact reactions channel-create dm channel-update channel-delete members followers message-update message-delete" -- "$cur"))
5317
5355
  fi
5318
5356
  ;;
5357
+ export)
5358
+ if [[ $cword -eq 2 ]]; then
5359
+ COMPREPLY=($(compgen -W "${exportSubcommandNames}" -- "$cur"))
5360
+ elif [[ "$cur" == -* ]]; then
5361
+ COMPREPLY=($(compgen -W "${exportFlagNames}" -- "$cur"))
5362
+ fi
5363
+ ;;
5319
5364
  completion)
5320
5365
  COMPREPLY=($(compgen -W "bash zsh fish" -- "$cur"))
5321
5366
  ;;
@@ -6243,6 +6288,34 @@ ${renderZshTopLevelCommands(name)}
6243
6288
  ;;
6244
6289
  esac
6245
6290
  ;;
6291
+ export)
6292
+ local -a export_cmds
6293
+ export_cmds=(
6294
+ ${exportSubcommands.map((command) => ` '${command.name}:${command.description}'`).join("\n")}
6295
+ )
6296
+ _arguments -C '1:export command:->export_cmd' '*::export_arg:->export_args'
6297
+ case $state in
6298
+ export_cmd)
6299
+ _describe 'export command' export_cmds
6300
+ ;;
6301
+ export_args)
6302
+ case $words[1] in
6303
+ user)
6304
+ _arguments '1:user_ref:' ${renderZshExportFlags()}
6305
+ ;;
6306
+ team)
6307
+ _arguments '1:space_ref:' ${renderZshExportFlags()}
6308
+ ;;
6309
+ roadmap|initiatives)
6310
+ _arguments '1:list_id:' ${renderZshExportFlags()}
6311
+ ;;
6312
+ docs|all)
6313
+ _arguments ${renderZshExportFlags()}
6314
+ ;;
6315
+ esac
6316
+ ;;
6317
+ esac
6318
+ ;;
6246
6319
  completion)
6247
6320
  _arguments '1:shell:(bash zsh fish)'
6248
6321
  ;;
@@ -6352,6 +6425,13 @@ complete -c ${name} -n '__fish_seen_subcommand_from channel-delete; and __fish_s
6352
6425
  complete -c ${name} -n '__fish_seen_subcommand_from message-update; and __fish_seen_subcommand_from chat' -s m -l message -d 'New message content'
6353
6426
  complete -c ${name} -n '__fish_seen_subcommand_from message-delete; and __fish_seen_subcommand_from chat' -l confirm -d 'Skip confirmation'
6354
6427
 
6428
+ ${exportSubcommands.map(
6429
+ (command) => `complete -c ${name} -n '__fish_seen_subcommand_from export; and not __fish_seen_subcommand_from ${exportSubcommandNames}' -a ${command.name} -d '${escapeSingleQuotes(command.description)}'`
6430
+ ).join("\n")}
6431
+ ${exportFlags2.map(
6432
+ (flag) => `complete -c ${name} -n '__fish_seen_subcommand_from export; and __fish_seen_subcommand_from ${exportSubcommandNames}' -l ${flag.name.slice(2)} -d '${escapeSingleQuotes(flag.description)}'${flag.value ? " -r" : ""}${flag.completion === "directory" ? " -a '(__fish_complete_directories)'" : ""}`
6433
+ ).join("\n")}
6434
+
6355
6435
  complete -c ${name} -n '__fish_seen_subcommand_from profile; and not __fish_seen_subcommand_from list add remove use' -a list -d 'List all profiles'
6356
6436
  complete -c ${name} -n '__fish_seen_subcommand_from profile; and not __fish_seen_subcommand_from list add remove use' -a add -d 'Add a new profile'
6357
6437
  complete -c ${name} -n '__fish_seen_subcommand_from profile; and not __fish_seen_subcommand_from list add remove use' -a remove -d 'Remove a profile'
@@ -7402,8 +7482,8 @@ async function runInBatches(items, concurrency, fn) {
7402
7482
 
7403
7483
  // src/export/bundle.ts
7404
7484
  function replyCount(c) {
7405
- const n = c.reply_count;
7406
- return typeof n === "number" ? n : 0;
7485
+ const count = Number(c.reply_count ?? 0);
7486
+ return Number.isFinite(count) ? count : 0;
7407
7487
  }
7408
7488
  async function fetchTaskBundle(client, taskId) {
7409
7489
  const [task, rawComments] = await Promise.all([
@@ -7583,10 +7663,11 @@ async function runExport(client, plan, opts) {
7583
7663
  import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync2 } from "fs";
7584
7664
  import { join as join4 } from "path";
7585
7665
  var PARENT_TYPES = {
7586
- 7: "workspace",
7587
7666
  4: "space",
7588
- 6: "folder",
7589
- 5: "list",
7667
+ 5: "folder",
7668
+ 6: "list",
7669
+ 7: "everything",
7670
+ 12: "workspace",
7590
7671
  1: "task"
7591
7672
  };
7592
7673
  function docDirName(doc) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krodak/clickup-cli",
3
- "version": "1.46.0",
3
+ "version": "1.46.1",
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.46.0
6
+ # ClickUp CLI (`cup`) - skill version 1.46.1
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.46.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.46.1, update with `npm install -g @krodak/clickup-cli` and refresh this skill with `cup skill`.
11
11
 
12
12
  ## Install & Configure
13
13