@krodak/clickup-cli 1.41.0 → 1.42.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 +39 -29
- 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.42.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Krzysztof Rodak"
|
|
7
7
|
},
|
package/dist/index.js
CHANGED
|
@@ -769,16 +769,18 @@ var ClickUpClient = class {
|
|
|
769
769
|
`/workspaces/${workspaceId}/docs/${docId}/pages/${pageId}?content_format=text/md`
|
|
770
770
|
);
|
|
771
771
|
}
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
772
|
+
/**
|
|
773
|
+
* Create a Doc.
|
|
774
|
+
*
|
|
775
|
+
* ClickUp's v3 Create Doc endpoint accepts `name` only — `title` and `content`
|
|
776
|
+
* are silently ignored (the request still returns 201), which is why passing
|
|
777
|
+
* them produced unnamed Docs with empty root pages. Initial content must be
|
|
778
|
+
* written to the Doc's root page via {@link editDocPage}.
|
|
779
|
+
*/
|
|
780
|
+
async createDoc(workspaceId, name) {
|
|
779
781
|
return this.requestV3(`/workspaces/${workspaceId}/docs`, {
|
|
780
782
|
method: "POST",
|
|
781
|
-
body: JSON.stringify(
|
|
783
|
+
body: JSON.stringify({ name })
|
|
782
784
|
});
|
|
783
785
|
}
|
|
784
786
|
async createDocPage(workspaceId, docId, name, content, parentPageId) {
|
|
@@ -859,11 +861,6 @@ var ClickUpClient = class {
|
|
|
859
861
|
async deleteKeyResult(keyResultId) {
|
|
860
862
|
await this.request(`/key_result/${keyResultId}`, { method: "DELETE" });
|
|
861
863
|
}
|
|
862
|
-
async deleteDoc(workspaceId, docId) {
|
|
863
|
-
await this.requestV3(`/workspaces/${workspaceId}/docs/${docId}`, {
|
|
864
|
-
method: "DELETE"
|
|
865
|
-
});
|
|
866
|
-
}
|
|
867
864
|
async deleteDocPage(workspaceId, docId, pageId) {
|
|
868
865
|
await this.requestV3(
|
|
869
866
|
`/workspaces/${workspaceId}/docs/${docId}/pages/${pageId}`,
|
|
@@ -4471,10 +4468,14 @@ var commandMetadata = [
|
|
|
4471
4468
|
},
|
|
4472
4469
|
{
|
|
4473
4470
|
name: "doc-delete",
|
|
4474
|
-
description: "
|
|
4471
|
+
description: "Not supported: ClickUp has no delete-Doc API (use the ClickUp UI)",
|
|
4475
4472
|
flags: ["--json"],
|
|
4476
4473
|
quickReference: [
|
|
4477
|
-
{
|
|
4474
|
+
{
|
|
4475
|
+
section: "write",
|
|
4476
|
+
usage: "doc-delete <docId>",
|
|
4477
|
+
description: "Not supported by ClickUp API (delete Docs in the UI)"
|
|
4478
|
+
}
|
|
4478
4479
|
]
|
|
4479
4480
|
},
|
|
4480
4481
|
{
|
|
@@ -7268,8 +7269,22 @@ function formatDocPagesMarkdown(pages) {
|
|
|
7268
7269
|
async function createDoc(config, title, content) {
|
|
7269
7270
|
if (!title.trim()) throw new Error("Doc title cannot be empty");
|
|
7270
7271
|
const client = new ClickUpClient(config);
|
|
7271
|
-
const doc = await client.createDoc(config.teamId, title
|
|
7272
|
-
|
|
7272
|
+
const doc = await client.createDoc(config.teamId, title);
|
|
7273
|
+
try {
|
|
7274
|
+
const pages = await client.getDocPageListing(config.teamId, doc.id);
|
|
7275
|
+
const rootPage = pages[0];
|
|
7276
|
+
if (!rootPage) throw new Error("the doc has no root page");
|
|
7277
|
+
await client.editDocPage(config.teamId, doc.id, rootPage.id, {
|
|
7278
|
+
name: title,
|
|
7279
|
+
...content !== void 0 ? { content } : {}
|
|
7280
|
+
});
|
|
7281
|
+
} catch (err) {
|
|
7282
|
+
throw new Error(
|
|
7283
|
+
`Created doc ${doc.id} but could not write its root page: ${err.message}`,
|
|
7284
|
+
{ cause: err }
|
|
7285
|
+
);
|
|
7286
|
+
}
|
|
7287
|
+
return { id: doc.id, title: doc.name || title };
|
|
7273
7288
|
}
|
|
7274
7289
|
async function createDocPage(config, docId, name, content, parentPageId) {
|
|
7275
7290
|
if (!name.trim()) throw new Error("Page name cannot be empty");
|
|
@@ -7283,9 +7298,10 @@ async function editDocPage(config, docId, pageId, updates) {
|
|
|
7283
7298
|
const client = new ClickUpClient(config);
|
|
7284
7299
|
return client.editDocPage(config.teamId, docId, pageId, updates);
|
|
7285
7300
|
}
|
|
7286
|
-
async function deleteDoc(
|
|
7287
|
-
|
|
7288
|
-
|
|
7301
|
+
async function deleteDoc(docId) {
|
|
7302
|
+
throw new Error(
|
|
7303
|
+
`Cannot delete doc ${docId}: ClickUp's public API does not support deleting Docs (no delete endpoint exists; the request returns HTTP 405). Delete or archive the Doc in the ClickUp UI instead. To remove a single page, use \`cup doc-page-delete <docId> <pageId>\`.`
|
|
7304
|
+
);
|
|
7289
7305
|
}
|
|
7290
7306
|
async function deleteDocPage(config, docId, pageId) {
|
|
7291
7307
|
const client = new ClickUpClient(config);
|
|
@@ -10283,15 +10299,9 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
|
|
|
10283
10299
|
}
|
|
10284
10300
|
)
|
|
10285
10301
|
);
|
|
10286
|
-
program.command("doc-delete <docId>").description("
|
|
10287
|
-
wrapAction(async (docId
|
|
10288
|
-
|
|
10289
|
-
await deleteDoc(config, docId);
|
|
10290
|
-
if (shouldOutputJson(opts.json ?? false)) {
|
|
10291
|
-
console.log(JSON.stringify({ success: true, docId }, null, 2));
|
|
10292
|
-
} else {
|
|
10293
|
-
console.log(`Deleted doc ${docId}`);
|
|
10294
|
-
}
|
|
10302
|
+
program.command("doc-delete <docId>").description("Not supported: ClickUp has no delete-Doc API (use the ClickUp UI)").option("--json", "Force JSON output even in terminal").action(
|
|
10303
|
+
wrapAction(async (docId) => {
|
|
10304
|
+
await deleteDoc(docId);
|
|
10295
10305
|
})
|
|
10296
10306
|
);
|
|
10297
10307
|
program.command("doc-page-delete <docId> <pageId>").description("Delete a doc page").option("--json", "Force JSON output even in terminal").action(
|
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.42.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.42.0, update with `npm install -g @krodak/clickup-cli` and refresh this skill with `cup skill`.
|
|
11
11
|
|
|
12
12
|
## Install & Configure
|
|
13
13
|
|
|
@@ -209,10 +209,10 @@ All commands support `--help` for full flag details. All commands support `--jso
|
|
|
209
209
|
| `cup key-result-create <goalId> <name> [--type t] [--target n]` | Create key result |
|
|
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
|
-
| `cup doc-create <title> [-c content]` | Create a doc
|
|
212
|
+
| `cup doc-create <title> [-c content]` | Create a doc (root page is named after the title; `-c` writes its markdown content) |
|
|
213
213
|
| `cup doc-page-create <docId> <name> [-c content] [--parent-page pageId]` | Create doc page |
|
|
214
214
|
| `cup doc-page-edit <docId> <pageId> [--name text] [-c content]` | Edit doc page |
|
|
215
|
-
| `cup doc-delete <docId>` |
|
|
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 |
|
|
218
218
|
| `cup list-create <spaceId> <name> [--folder folderId] [--copy-statuses-from id]` | Create a list in a space or folder |
|