@krodak/clickup-cli 0.12.0 → 0.12.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 CHANGED
@@ -215,6 +215,7 @@ cu update abc123 --due-date 2025-03-15
215
215
  cu update abc123 --assignee 12345
216
216
  cu update abc123 -n "New name" -s "done" --priority urgent
217
217
  cu update abc123 --time-estimate 2h
218
+ cu update abc123 --parent parentTaskId # make it a subtask
218
219
  cu update abc123 -s "in progress" --json
219
220
  ```
220
221
 
@@ -227,6 +228,7 @@ cu update abc123 -s "in progress" --json
227
228
  | `--due-date <date>` | Due date (`YYYY-MM-DD`) |
228
229
  | `--time-estimate <duration>` | Time estimate (e.g. `"2h"`, `"30m"`, `"1h30m"`) |
229
230
  | `--assignee <userId>` | Add assignee by numeric user ID |
231
+ | `--parent <taskId>` | Set parent task (makes this a subtask) |
230
232
  | `--json` | Force JSON output even in terminal |
231
233
 
232
234
  ### `cu create`
package/dist/index.js CHANGED
@@ -746,10 +746,11 @@ function buildUpdatePayload(opts) {
746
746
  if (opts.timeEstimate !== void 0) {
747
747
  payload.time_estimate = parseTimeEstimate(opts.timeEstimate);
748
748
  }
749
+ if (opts.parent !== void 0) payload.parent = opts.parent;
749
750
  return payload;
750
751
  }
751
752
  function hasUpdateFields(options) {
752
- return options.name !== void 0 || options.description !== void 0 || options.markdown_content !== void 0 || options.status !== void 0 || options.priority !== void 0 || options.due_date !== void 0 || options.time_estimate !== void 0 || options.assignees !== void 0;
753
+ return options.name !== void 0 || options.description !== void 0 || options.markdown_content !== void 0 || options.status !== void 0 || options.priority !== void 0 || options.due_date !== void 0 || options.time_estimate !== void 0 || options.assignees !== void 0 || options.parent !== void 0;
753
754
  }
754
755
  async function resolveStatus(client, taskId, statusInput) {
755
756
  const task = await client.getTask(taskId);
@@ -769,7 +770,7 @@ async function resolveStatus(client, taskId, statusInput) {
769
770
  async function updateTask(config, taskId, options) {
770
771
  if (!hasUpdateFields(options))
771
772
  throw new Error(
772
- "Provide at least one of: --name, --description, --status, --priority, --due-date, --time-estimate, --assignee"
773
+ "Provide at least one of: --name, --description, --status, --priority, --due-date, --time-estimate, --assignee, --parent"
773
774
  );
774
775
  const client = new ClickUpClient(config);
775
776
  if (options.status !== void 0) {
@@ -2175,7 +2176,7 @@ program.command("task <taskId>").description("Get task details").option("--json"
2175
2176
  }
2176
2177
  })
2177
2178
  );
2178
- program.command("update <taskId>").description("Update a task").option("-n, --name <text>", "New task name").option("-d, --description <text>", "New description (markdown supported)").option("-s, --status <status>", 'New status (e.g. "in progress", "done")').option("--priority <level>", "Priority: urgent, high, normal, low (or 1-4)").option("--due-date <date>", "Due date (YYYY-MM-DD)").option("--time-estimate <duration>", 'Time estimate (e.g. "2h", "30m", "1h30m")').option("--assignee <userId>", "Add assignee by user ID").option("--json", "Force JSON output even in terminal").action(
2179
+ program.command("update <taskId>").description("Update a task").option("-n, --name <text>", "New task name").option("-d, --description <text>", "New description (markdown supported)").option("-s, --status <status>", 'New status (e.g. "in progress", "done")').option("--priority <level>", "Priority: urgent, high, normal, low (or 1-4)").option("--due-date <date>", "Due date (YYYY-MM-DD)").option("--time-estimate <duration>", 'Time estimate (e.g. "2h", "30m", "1h30m")').option("--assignee <userId>", "Add assignee by user ID").option("--parent <taskId>", "Set parent task (makes this a subtask)").option("--json", "Force JSON output even in terminal").action(
2179
2180
  wrapAction(async (taskId, opts) => {
2180
2181
  const config = loadConfig();
2181
2182
  const payload = buildUpdatePayload(opts);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krodak/clickup-cli",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "ClickUp CLI for AI agents and humans",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -58,7 +58,7 @@ All commands support `--help` for full flag details.
58
58
 
59
59
  | Command | What it does |
60
60
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------- |
61
- | `cu update <id> [-n name] [-d desc] [-s status] [--priority p] [--due-date d] [--time-estimate t] [--assignee id] [--json]` | Update task fields (desc supports markdown) |
61
+ | `cu update <id> [-n name] [-d desc] [-s status] [--priority p] [--due-date d] [--time-estimate t] [--assignee id] [--parent id] [--json]` | Update task fields (desc supports markdown) |
62
62
  | `cu create -n name [-l listId] [-p parentId] [-d desc] [-s status] [--priority p] [--due-date d] [--time-estimate t] [--assignee id] [--tags t] [--custom-item-id n] [--json]` | Create task (desc supports markdown) |
63
63
  | `cu comment <id> -m text [--json]` | Post comment on task |
64
64
  | `cu assign <id> [--to userId\|me] [--remove userId\|me] [--json]` | Assign/unassign users |
@@ -128,6 +128,7 @@ cu inbox --days 7 # recently updated
128
128
  cu update abc123def -s "done"
129
129
  cu update abc123def --priority high --due-date 2025-03-15
130
130
  cu update abc123def --time-estimate 2h
131
+ cu update abc123def --parent parentId # make it a subtask
131
132
  cu create -n "Fix the thing" -p abc123def
132
133
  cu create -n "Fix bug" -l <listId> --priority urgent --tags "bug,frontend"
133
134
  cu create -n "Q3 Roadmap" -l <listId> --custom-item-id 1 # create initiative