@krodak/clickup-cli 1.6.1 → 1.7.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.6.1",
4
+ "version": "1.7.0",
5
5
  "author": {
6
6
  "name": "Krzysztof Rodak"
7
7
  },
package/README.md CHANGED
@@ -154,7 +154,7 @@ Full CRUD for the core ClickUp workflow:
154
154
  | 🏷️ **Tags** | Add/remove on tasks, space-level create/update/delete |
155
155
  | 🎯 **Goals & OKRs** | Goals CRUD, key results CRUD |
156
156
  | 🏃 **Sprints** | Auto-detect active sprint, flexible date parsing, config override |
157
- | 🏢 **Workspace** | Spaces, folders, lists, members, task types, templates |
157
+ | 🏢 **Workspace** | Spaces, folders, lists (read + create), members, task types, templates |
158
158
  | 📎 **Attachments** | Upload files to tasks, shown in detail views |
159
159
 
160
160
  [Full API coverage details](docs/api-coverage.md) | [Command reference](docs/commands.md)
package/dist/index.js CHANGED
@@ -224,6 +224,12 @@ var ClickUpClient = class {
224
224
  async getListWithStatuses(listId) {
225
225
  return this.request(`/list/${listId}`);
226
226
  }
227
+ async createSpace(teamId, name) {
228
+ return this.request(`/team/${teamId}/space`, {
229
+ method: "POST",
230
+ body: JSON.stringify({ name, multiple_assignees: true })
231
+ });
232
+ }
227
233
  async getSpaces(teamId) {
228
234
  const data = await this.request(`/team/${teamId}/space?archived=false`);
229
235
  return readCollectionField(data, "spaces", "spaces");
@@ -238,6 +244,24 @@ var ClickUpClient = class {
238
244
  "custom task types"
239
245
  );
240
246
  }
247
+ async createList(spaceId, name) {
248
+ return this.request(`/space/${spaceId}/list`, {
249
+ method: "POST",
250
+ body: JSON.stringify({ name })
251
+ });
252
+ }
253
+ async createFolderList(folderId, name) {
254
+ return this.request(`/folder/${folderId}/list`, {
255
+ method: "POST",
256
+ body: JSON.stringify({ name })
257
+ });
258
+ }
259
+ async createFolder(spaceId, name) {
260
+ return this.request(`/space/${spaceId}/folder`, {
261
+ method: "POST",
262
+ body: JSON.stringify({ name })
263
+ });
264
+ }
241
265
  async getLists(spaceId) {
242
266
  const data = await this.request(`/space/${spaceId}/list?archived=false`);
243
267
  return readCollectionField(data, "lists", "space lists");
@@ -3024,6 +3048,38 @@ var commandMetadata = [
3024
3048
  { section: "read", usage: "folders <spaceId>", description: "List folders in a space" }
3025
3049
  ]
3026
3050
  },
3051
+ {
3052
+ name: "space-create",
3053
+ description: "Create a new space in your workspace",
3054
+ flags: ["--json"],
3055
+ quickReference: [
3056
+ { section: "write", usage: "space-create <name>", description: "Create a space" }
3057
+ ]
3058
+ },
3059
+ {
3060
+ name: "list-create",
3061
+ description: "Create a new list in a space",
3062
+ flags: ["--folder", "--json"],
3063
+ quickReference: [
3064
+ {
3065
+ section: "write",
3066
+ usage: "list-create <spaceId> <name>",
3067
+ description: "Create a list in a space"
3068
+ }
3069
+ ]
3070
+ },
3071
+ {
3072
+ name: "folder-create",
3073
+ description: "Create a new folder in a space",
3074
+ flags: ["--json"],
3075
+ quickReference: [
3076
+ {
3077
+ section: "write",
3078
+ usage: "folder-create <spaceId> <name>",
3079
+ description: "Create a folder in a space"
3080
+ }
3081
+ ]
3082
+ },
3027
3083
  {
3028
3084
  name: "members",
3029
3085
  description: "List workspace members",
@@ -3834,6 +3890,24 @@ ${renderZshTopLevelCommands(name)}
3834
3890
  '--name[Filter by folder name]:text:' \\
3835
3891
  '--json[Force JSON output]'
3836
3892
  ;;
3893
+ space-create)
3894
+ _arguments \\
3895
+ '1:name:' \\
3896
+ '--json[Force JSON output]'
3897
+ ;;
3898
+ list-create)
3899
+ _arguments \\
3900
+ '1:space_id:' \\
3901
+ '2:name:' \\
3902
+ '--folder[Create inside a folder]:folder_id:' \\
3903
+ '--json[Force JSON output]'
3904
+ ;;
3905
+ folder-create)
3906
+ _arguments \\
3907
+ '1:space_id:' \\
3908
+ '2:name:' \\
3909
+ '--json[Force JSON output]'
3910
+ ;;
3837
3911
  doc-create)
3838
3912
  _arguments \\
3839
3913
  '1:title:' \\
@@ -5632,6 +5706,47 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
5632
5706
  }
5633
5707
  })
5634
5708
  );
5709
+ program.command("space-create <name>").description("Create a new space in your workspace").option("--json", "Force JSON output even in terminal").action(
5710
+ wrapAction(async (name, opts) => {
5711
+ if (!name.trim()) throw new Error("Space name cannot be empty");
5712
+ const config = loadConfig(getProfileName());
5713
+ const client = new ClickUpClient(config);
5714
+ const space = await client.createSpace(config.teamId, name);
5715
+ if (shouldOutputJson(opts.json ?? false)) {
5716
+ console.log(JSON.stringify(space, null, 2));
5717
+ } else {
5718
+ console.log(`Created space "${space.name}" (${space.id})`);
5719
+ }
5720
+ })
5721
+ );
5722
+ program.command("list-create <spaceId> <name>").description("Create a new list in a space").option("--folder <folderId>", "Create the list inside a folder").option("--json", "Force JSON output even in terminal").action(
5723
+ wrapAction(
5724
+ async (spaceId, name, opts) => {
5725
+ if (!name.trim()) throw new Error("List name cannot be empty");
5726
+ const config = loadConfig(getProfileName());
5727
+ const client = new ClickUpClient(config);
5728
+ const list = opts.folder ? await client.createFolderList(opts.folder, name) : await client.createList(spaceId, name);
5729
+ if (shouldOutputJson(opts.json ?? false)) {
5730
+ console.log(JSON.stringify(list, null, 2));
5731
+ } else {
5732
+ console.log(`Created list "${list.name}" (${list.id})`);
5733
+ }
5734
+ }
5735
+ )
5736
+ );
5737
+ program.command("folder-create <spaceId> <name>").description("Create a new folder in a space").option("--json", "Force JSON output even in terminal").action(
5738
+ wrapAction(async (spaceId, name, opts) => {
5739
+ if (!name.trim()) throw new Error("Folder name cannot be empty");
5740
+ const config = loadConfig(getProfileName());
5741
+ const client = new ClickUpClient(config);
5742
+ const folder = await client.createFolder(spaceId, name);
5743
+ if (shouldOutputJson(opts.json ?? false)) {
5744
+ console.log(JSON.stringify(folder, null, 2));
5745
+ } else {
5746
+ console.log(`Created folder "${folder.name}" (${folder.id})`);
5747
+ }
5748
+ })
5749
+ );
5635
5750
  program.command("doc-create <title>").description("Create a new doc").option("-c, --content <text>", "Initial content (markdown)").option("--json", "Force JSON output even in terminal").action(
5636
5751
  wrapAction(async (title, opts) => {
5637
5752
  const config = loadConfig(getProfileName());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krodak/clickup-cli",
3
- "version": "1.6.1",
3
+ "version": "1.7.0",
4
4
  "description": "ClickUp CLI for AI agents and humans",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -108,6 +108,9 @@ All commands support `--help` for full flag details. All commands support `--jso
108
108
  | `cup doc-page-edit <docId> <pageId> [--name text] [-c content]` | Edit doc page |
109
109
  | `cup doc-delete <docId>` | Delete a doc |
110
110
  | `cup doc-page-delete <docId> <pageId>` | Delete doc page |
111
+ | `cup space-create <name>` | Create a space |
112
+ | `cup list-create <spaceId> <name> [--folder folderId]` | Create a list in a space or folder |
113
+ | `cup folder-create <spaceId> <name>` | Create a folder in a space |
111
114
  | `cup tag-create <spaceId> <name> [--fg color] [--bg color]` | Create space tag |
112
115
  | `cup tag-update <spaceId> <tagName> --name <newName> [--fg c] [--bg c]` | Update space tag |
113
116
  | `cup tag-delete <spaceId> <name>` | Delete space tag |
@@ -215,6 +218,10 @@ cup doc-page-edit <docId> <pageId> -c "# Updated"
215
218
  cup spaces --name "Engineering" # find space ID
216
219
  cup folders <spaceId> # folders with their lists
217
220
  cup lists <spaceId> # lists in a space
221
+ cup space-create "New Space" # create a space
222
+ cup folder-create <spaceId> "Q2" # create a folder
223
+ cup list-create <spaceId> "Backlog" # create a list
224
+ cup list-create <spaceId> "Sprint" --folder <folderId>
218
225
  cup members # workspace members
219
226
  cup fields <listId> # custom fields on a list
220
227
  cup task-types # custom task types