@krodak/clickup-cli 1.43.0 → 1.44.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 +34 -7
- package/package.json +1 -1
- package/skills/clickup-cli/SKILL.md +4 -4
|
@@ -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.44.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Krzysztof Rodak"
|
|
7
7
|
},
|
package/dist/index.js
CHANGED
|
@@ -4450,7 +4450,7 @@ var commandMetadata = [
|
|
|
4450
4450
|
{
|
|
4451
4451
|
name: "doc-page-create",
|
|
4452
4452
|
description: "Create a page in a doc",
|
|
4453
|
-
flags: ["-c", "--content", "--parent-page", "--json"],
|
|
4453
|
+
flags: ["-c", "--content", "--content-file", "--parent-page", "--json"],
|
|
4454
4454
|
quickReference: [
|
|
4455
4455
|
{
|
|
4456
4456
|
section: "write",
|
|
@@ -4462,7 +4462,7 @@ var commandMetadata = [
|
|
|
4462
4462
|
{
|
|
4463
4463
|
name: "doc-page-edit",
|
|
4464
4464
|
description: "Edit a doc page",
|
|
4465
|
-
flags: ["--name", "-c", "--content", "--json"],
|
|
4465
|
+
flags: ["--name", "-c", "--content", "--content-file", "--json"],
|
|
4466
4466
|
quickReference: [
|
|
4467
4467
|
{
|
|
4468
4468
|
section: "write",
|
|
@@ -6675,6 +6675,11 @@ function parseFieldValue(field, rawValue) {
|
|
|
6675
6675
|
return rawValue;
|
|
6676
6676
|
}
|
|
6677
6677
|
}
|
|
6678
|
+
async function resolveTaskFieldValue(client, field, parsed) {
|
|
6679
|
+
if (field.type !== "tasks") return parsed;
|
|
6680
|
+
const { add } = parsed;
|
|
6681
|
+
return { add: await Promise.all(add.map((id) => client.resolveTaskId(id))) };
|
|
6682
|
+
}
|
|
6678
6683
|
async function setCustomField(config, taskId, opts) {
|
|
6679
6684
|
if (!opts.set && !opts.remove) {
|
|
6680
6685
|
throw new Error("Provide at least one of: --set, --remove");
|
|
@@ -6686,7 +6691,7 @@ async function setCustomField(config, taskId, opts) {
|
|
|
6686
6691
|
if (opts.set) {
|
|
6687
6692
|
const [fieldName, rawValue] = opts.set;
|
|
6688
6693
|
const field = findFieldByName(fields, fieldName);
|
|
6689
|
-
const parsed = parseFieldValue(field, rawValue);
|
|
6694
|
+
const parsed = await resolveTaskFieldValue(client, field, parseFieldValue(field, rawValue));
|
|
6690
6695
|
await client.setCustomFieldValue(taskId, field.id, parsed);
|
|
6691
6696
|
results.push({ taskId, field: field.name, action: "set", value: parsed });
|
|
6692
6697
|
}
|
|
@@ -7758,7 +7763,7 @@ async function bulkField(config, fieldName, rawValue, taskIds) {
|
|
|
7758
7763
|
const firstTask = await client.getTask(taskIds[0]);
|
|
7759
7764
|
const fields = firstTask.custom_fields ?? [];
|
|
7760
7765
|
const field = findFieldByName(fields, fieldName);
|
|
7761
|
-
const parsed = parseFieldValue(field, rawValue);
|
|
7766
|
+
const parsed = await resolveTaskFieldValue(client, field, parseFieldValue(field, rawValue));
|
|
7762
7767
|
const outcomes = await runInBatches(
|
|
7763
7768
|
taskIds,
|
|
7764
7769
|
BULK_CONCURRENCY,
|
|
@@ -9017,7 +9022,11 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
|
|
|
9017
9022
|
const fieldName = opts.field[i];
|
|
9018
9023
|
const rawValue = opts.field[i + 1];
|
|
9019
9024
|
const field = findFieldByName(fields, fieldName);
|
|
9020
|
-
const value =
|
|
9025
|
+
const value = await resolveTaskFieldValue(
|
|
9026
|
+
client,
|
|
9027
|
+
field,
|
|
9028
|
+
parseFieldValue(field, rawValue)
|
|
9029
|
+
);
|
|
9021
9030
|
customFields.push({ id: field.id, value });
|
|
9022
9031
|
}
|
|
9023
9032
|
opts.customFields = customFields;
|
|
@@ -10277,9 +10286,18 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
|
|
|
10277
10286
|
}
|
|
10278
10287
|
})
|
|
10279
10288
|
);
|
|
10280
|
-
program.command("doc-page-create <docId> <name>").description("Create a page in a doc").option("-c, --content <text>", "Page content (markdown)").option(
|
|
10289
|
+
program.command("doc-page-create <docId> <name>").description("Create a page in a doc").option("-c, --content <text>", "Page content (markdown)").option(
|
|
10290
|
+
"--content-file <path>",
|
|
10291
|
+
'Read page content from a file ("-" for stdin); avoids shell quoting. Mutually exclusive with -c'
|
|
10292
|
+
).option("--parent-page <pageId>", "Parent page ID for nesting").option("--json", "Force JSON output even in terminal").action(
|
|
10281
10293
|
wrapAction(
|
|
10282
10294
|
async (docId, name, opts) => {
|
|
10295
|
+
opts.content = resolveTextInput({
|
|
10296
|
+
inline: opts.content,
|
|
10297
|
+
file: opts.contentFile,
|
|
10298
|
+
inlineFlag: "-c",
|
|
10299
|
+
fileFlag: "--content-file"
|
|
10300
|
+
});
|
|
10283
10301
|
const config = loadConfig(getProfileName());
|
|
10284
10302
|
const page = await createDocPage(config, docId, name, opts.content, opts.parentPage);
|
|
10285
10303
|
if (shouldOutputJson(opts.json ?? false)) {
|
|
@@ -10290,9 +10308,18 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
|
|
|
10290
10308
|
}
|
|
10291
10309
|
)
|
|
10292
10310
|
);
|
|
10293
|
-
program.command("doc-page-edit <docId> <pageId>").description("Edit a doc page").option("--name <text>", "New page name").option("-c, --content <text>", "New page content (markdown)").option(
|
|
10311
|
+
program.command("doc-page-edit <docId> <pageId>").description("Edit a doc page").option("--name <text>", "New page name").option("-c, --content <text>", "New page content (markdown)").option(
|
|
10312
|
+
"--content-file <path>",
|
|
10313
|
+
'Read new page content from a file ("-" for stdin); avoids shell quoting. Mutually exclusive with -c'
|
|
10314
|
+
).option("--json", "Force JSON output even in terminal").action(
|
|
10294
10315
|
wrapAction(
|
|
10295
10316
|
async (docId, pageId, opts) => {
|
|
10317
|
+
opts.content = resolveTextInput({
|
|
10318
|
+
inline: opts.content,
|
|
10319
|
+
file: opts.contentFile,
|
|
10320
|
+
inlineFlag: "-c",
|
|
10321
|
+
fileFlag: "--content-file"
|
|
10322
|
+
});
|
|
10296
10323
|
const config = loadConfig(getProfileName());
|
|
10297
10324
|
const page = await editDocPage(config, docId, pageId, {
|
|
10298
10325
|
name: opts.name,
|
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.44.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.44.0, update with `npm install -g @krodak/clickup-cli` and refresh this skill with `cup skill`.
|
|
11
11
|
|
|
12
12
|
## Install & Configure
|
|
13
13
|
|
|
@@ -210,8 +210,8 @@ All commands support `--help` for full flag details. All commands support `--jso
|
|
|
210
210
|
| `cup key-result-update <keyResultId> [--progress n] [--note text]` | Update key result |
|
|
211
211
|
| `cup key-result-delete <keyResultId>` | Delete key result |
|
|
212
212
|
| `cup doc-create <title> [-c content]` | Create a doc (root page is named after the title; `-c` writes its markdown content) |
|
|
213
|
-
| `cup doc-page-create <docId> <name> [-c content] [--parent-page pageId]`
|
|
214
|
-
| `cup doc-page-edit <docId> <pageId> [--name text] [-c content]`
|
|
213
|
+
| `cup doc-page-create <docId> <name> [-c content\|--content-file path] [--parent-page pageId]` | Create doc page (`--content-file` reads markdown from a file or `-` for stdin) |
|
|
214
|
+
| `cup doc-page-edit <docId> <pageId> [--name text] [-c content\|--content-file path]` | Edit doc page (`--content-file` reads markdown from a file or `-` for stdin) |
|
|
215
215
|
| `cup doc-delete <docId>` | **Not supported** — ClickUp has no delete-Doc API (HTTP 405). Fails fast; delete Docs in the UI. Use `cup doc-page-delete` for a single page |
|
|
216
216
|
| `cup doc-page-delete <docId> <pageId>` | Delete doc page |
|
|
217
217
|
| `cup space-create <name>` | Create a space |
|