@itsalexr/mcli 1.0.0 → 1.1.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/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,8 +1,31 @@
1
1
  # mcli — monday.com CLI
2
2
 
3
+ > Fresh out of a coding agent. Bugs are expected — [open an issue](https://github.com/itsalexr/mcli/issues) if you hit one.
4
+
3
5
  A CLI for monday.com's GraphQL API. Works standalone or as a skill inside Claude Code and other coding agents.
4
6
 
5
- ## Install
7
+ ## Install via agent (recommended)
8
+
9
+ Paste this as a message to your agent and it will set itself up:
10
+
11
+ > Set up the monday.com skill for this project. Add the following to this project's agent context file (e.g. `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `.cursor/rules`, or `.github/copilot-instructions.md` — whichever applies to you):
12
+ >
13
+ > ```
14
+ > ## monday.com
15
+ > Use `npx @itsalexr/mcli` to interact with monday.com. No install needed.
16
+ > Set MONDAY_TOKEN env var for auth, or run `npx @itsalexr/mcli auth login` once.
17
+ >
18
+ > Key commands:
19
+ > - `npx @itsalexr/mcli boards list [--workspace-id <id>]`
20
+ > - `npx @itsalexr/mcli items list <boardId> [--columns] [--table]`
21
+ > - `npx @itsalexr/mcli items create <boardId> --name "Task"`
22
+ > - `npx @itsalexr/mcli updates create <itemId> "comment text"`
23
+ > - `npx @itsalexr/mcli graphql '<query>'`
24
+ > ```
25
+ >
26
+ > Then check whether `MONDAY_TOKEN` is set in the environment. If not, run `npx @itsalexr/mcli auth login` so I can authenticate.
27
+
28
+ ## Install manually
6
29
 
7
30
  ```bash
8
31
  npm install -g @itsalexr/mcli
@@ -88,9 +111,11 @@ mcli items list <boardId> --table
88
111
 
89
112
  ## Use with coding agents
90
113
 
91
- ### Claude Code (plugin — recommended)
114
+ ### Claude Code CLI (plugin — recommended)
115
+
116
+ > **Note:** These slash commands only work in the Claude Code CLI (`claude` in terminal) and VS Code/JetBrains extensions. They do not work in the Claude desktop app.
92
117
 
93
- Paste into Claude Code:
118
+ Requires Claude Code v2.1.128+. Type these as **slash commands** directly in the Claude Code chat — not as prompts to the AI:
94
119
 
95
120
  ```
96
121
  /plugin marketplace add itsalexr/mcli
@@ -100,31 +125,6 @@ Paste into Claude Code:
100
125
 
101
126
  The plugin puts `mcli` in PATH automatically. The Claude Code plugin lives in `claude-plugin/` inside this repo.
102
127
 
103
- ### Any agent (instructions snippet)
104
-
105
- Add this to your agent's context file and it will use `mcli` for monday.com tasks:
106
-
107
- | Agent | File |
108
- |---|---|
109
- | Claude Code | `CLAUDE.md` |
110
- | Codex / OpenCode | `AGENTS.md` |
111
- | Gemini CLI | `GEMINI.md` |
112
- | Cursor | `.cursor/rules` |
113
- | Copilot | `.github/copilot-instructions.md` |
114
-
115
- ```markdown
116
- ## monday.com
117
- Use `npx @itsalexr/mcli` to interact with monday.com. No install needed.
118
- Set MONDAY_TOKEN env var for auth, or run `npx @itsalexr/mcli auth login` once.
119
-
120
- Key commands:
121
- - `npx @itsalexr/mcli boards list [--workspace-id <id>]`
122
- - `npx @itsalexr/mcli items list <boardId> [--columns] [--table]`
123
- - `npx @itsalexr/mcli items create <boardId> --name "Task"`
124
- - `npx @itsalexr/mcli updates create <itemId> "comment text"`
125
- - `npx @itsalexr/mcli graphql '<query>'`
126
- ```
127
-
128
128
  ---
129
129
 
130
130
  ## Development
@@ -35,10 +35,52 @@ export interface BoardInfoResult {
35
35
  } | null;
36
36
  }>;
37
37
  }
38
+ export interface BoardSchemaResult {
39
+ boards: Array<{
40
+ columns: Array<{
41
+ id: string;
42
+ title: string;
43
+ type: string;
44
+ }>;
45
+ groups: Array<{
46
+ id: string;
47
+ title: string;
48
+ }>;
49
+ }>;
50
+ }
51
+ export interface CreateBoardResult {
52
+ create_board: {
53
+ id: string;
54
+ name: string;
55
+ url: string;
56
+ };
57
+ }
58
+ export interface BoardActivityResult {
59
+ boards: Array<{
60
+ activity_logs: Array<{
61
+ user_id: string;
62
+ event: string;
63
+ entity: string;
64
+ created_at: string;
65
+ }>;
66
+ }>;
67
+ }
38
68
  export declare function fetchBoards(client: GraphQLClient, opts: {
39
69
  limit: number;
40
70
  page: number;
41
71
  workspaceId?: string;
42
72
  }): Promise<BoardsListResult>;
43
73
  export declare function fetchBoardInfo(client: GraphQLClient, boardId: string): Promise<BoardInfoResult>;
74
+ export declare function fetchBoardSchema(client: GraphQLClient, boardId: string): Promise<BoardSchemaResult>;
75
+ export declare function createBoard(client: GraphQLClient, opts: {
76
+ name: string;
77
+ kind: string;
78
+ description?: string;
79
+ workspaceId?: string;
80
+ }): Promise<CreateBoardResult>;
81
+ export declare function fetchBoardActivity(client: GraphQLClient, boardId: string, opts: {
82
+ from: string;
83
+ to: string;
84
+ limit: number;
85
+ }): Promise<BoardActivityResult>;
44
86
  export declare function registerBoards(program: Command, clientFactory: () => GraphQLClient): void;
@@ -5,6 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchBoards = fetchBoards;
7
7
  exports.fetchBoardInfo = fetchBoardInfo;
8
+ exports.fetchBoardSchema = fetchBoardSchema;
9
+ exports.createBoard = createBoard;
10
+ exports.fetchBoardActivity = fetchBoardActivity;
8
11
  exports.registerBoards = registerBoards;
9
12
  const zod_1 = require("zod");
10
13
  const chalk_1 = __importDefault(require("chalk"));
@@ -21,6 +24,25 @@ async function fetchBoards(client, opts) {
21
24
  async function fetchBoardInfo(client, boardId) {
22
25
  return (0, client_1.gqlRequest)(client, boards_1.GET_BOARD_INFO_QUERY, { boardId });
23
26
  }
27
+ async function fetchBoardSchema(client, boardId) {
28
+ return (0, client_1.gqlRequest)(client, boards_1.GET_BOARD_SCHEMA_QUERY, { boardId });
29
+ }
30
+ async function createBoard(client, opts) {
31
+ return (0, client_1.gqlRequest)(client, boards_1.CREATE_BOARD_MUTATION, {
32
+ boardName: opts.name,
33
+ boardKind: opts.kind,
34
+ boardDescription: opts.description,
35
+ workspaceId: opts.workspaceId,
36
+ });
37
+ }
38
+ async function fetchBoardActivity(client, boardId, opts) {
39
+ return (0, client_1.gqlRequest)(client, boards_1.GET_BOARD_ACTIVITY_QUERY, {
40
+ boardId,
41
+ from: opts.from,
42
+ to: opts.to,
43
+ limit: opts.limit,
44
+ });
45
+ }
24
46
  function printBoardInfo(board, format) {
25
47
  if (format === 'json') {
26
48
  (0, output_1.printJson)(board);
@@ -35,6 +57,15 @@ const BoardsListOptionsSchema = zod_1.z.object({
35
57
  limit: zod_1.z.coerce.number().int().positive().default(50),
36
58
  page: zod_1.z.coerce.number().int().positive().default(1),
37
59
  });
60
+ const BoardCreateOptionsSchema = zod_1.z.object({
61
+ name: zod_1.z.string().min(1, 'Board name is required'),
62
+ kind: zod_1.z.enum(['public', 'private']).default('public'),
63
+ description: zod_1.z.string().optional(),
64
+ workspaceId: zod_1.z.string().optional(),
65
+ });
66
+ const BoardActivityOptionsSchema = zod_1.z.object({
67
+ limit: zod_1.z.coerce.number().int().positive().default(50),
68
+ });
38
69
  function registerBoards(program, clientFactory) {
39
70
  const boards = program.command('boards').description('Manage monday.com boards');
40
71
  boards
@@ -84,5 +115,87 @@ function registerBoards(program, clientFactory) {
84
115
  process.exit(1);
85
116
  }
86
117
  });
118
+ boards
119
+ .command('schema <boardId>')
120
+ .description('Get board columns and groups')
121
+ .action(async (boardId) => {
122
+ const format = program.opts().table ? 'table' : 'json';
123
+ try {
124
+ const client = clientFactory();
125
+ const data = await fetchBoardSchema(client, boardId);
126
+ const board = data.boards[0];
127
+ if (!board) {
128
+ console.error(chalk_1.default.red(`Board ${boardId} not found`));
129
+ process.exit(1);
130
+ }
131
+ if (format === 'table') {
132
+ (0, output_1.printTable)(['Column ID', 'Title', 'Type'], board.columns.map((c) => [c.id, c.title, c.type]));
133
+ (0, output_1.printTable)(['Group ID', 'Title'], board.groups.map((g) => [g.id, g.title]));
134
+ }
135
+ else {
136
+ (0, output_1.printJson)({ columns: board.columns, groups: board.groups });
137
+ }
138
+ }
139
+ catch (err) {
140
+ console.error(chalk_1.default.red(err.message));
141
+ process.exit(1);
142
+ }
143
+ });
144
+ boards
145
+ .command('create')
146
+ .description('Create a new board')
147
+ .requiredOption('--name <name>', 'Board name')
148
+ .option('--kind <kind>', 'Board kind: public or private', 'public')
149
+ .option('--description <text>', 'Board description')
150
+ .option('--workspace-id <id>', 'Workspace ID')
151
+ .action(async (opts) => {
152
+ try {
153
+ const validated = BoardCreateOptionsSchema.parse(opts);
154
+ const client = clientFactory();
155
+ const result = await createBoard(client, validated);
156
+ (0, output_1.printJson)(result.create_board);
157
+ }
158
+ catch (err) {
159
+ if (err instanceof zod_1.z.ZodError) {
160
+ console.error(chalk_1.default.red('Validation error: ' + err.issues.map((i) => i.message).join(', ')));
161
+ process.exit(1);
162
+ }
163
+ console.error(chalk_1.default.red(err.message));
164
+ process.exit(1);
165
+ }
166
+ });
167
+ boards
168
+ .command('activity <boardId>')
169
+ .description('Get board activity log')
170
+ .option('--from <date>', 'Start date (ISO 8601)', () => {
171
+ const d = new Date();
172
+ d.setDate(d.getDate() - 30);
173
+ return d.toISOString();
174
+ })
175
+ .option('--to <date>', 'End date (ISO 8601)', new Date().toISOString())
176
+ .option('--limit <n>', 'Number of entries to return', '50')
177
+ .action(async (boardId, opts) => {
178
+ const format = program.opts().table ? 'table' : 'json';
179
+ try {
180
+ const { limit } = BoardActivityOptionsSchema.parse({ limit: opts.limit });
181
+ const client = clientFactory();
182
+ const data = await fetchBoardActivity(client, boardId, { from: opts.from, to: opts.to, limit });
183
+ const logs = data.boards[0]?.activity_logs ?? [];
184
+ if (format === 'table') {
185
+ (0, output_1.printTable)(['Created At', 'User ID', 'Entity', 'Event'], logs.map((l) => [l.created_at, l.user_id, l.entity, l.event]));
186
+ }
187
+ else {
188
+ (0, output_1.printJson)(logs);
189
+ }
190
+ }
191
+ catch (err) {
192
+ if (err instanceof zod_1.z.ZodError) {
193
+ console.error(chalk_1.default.red('Validation error: ' + err.issues.map((i) => i.message).join(', ')));
194
+ process.exit(1);
195
+ }
196
+ console.error(chalk_1.default.red(err.message));
197
+ process.exit(1);
198
+ }
199
+ });
87
200
  }
88
201
  //# sourceMappingURL=boards.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"boards.js","sourceRoot":"","sources":["../../src/commands/boards.ts"],"names":[],"mappings":";;;;;AAgCA,kCASC;AAED,wCAKC;AA2BD,wCAmDC;AA5HD,6BAAwB;AACxB,kDAA0B;AAC1B,sCAAuC;AACvC,sCAAgE;AAChE,8CAA4E;AA0BrE,KAAK,UAAU,WAAW,CAC/B,MAAqB,EACrB,IAA2D;IAE3D,OAAO,IAAA,mBAAU,EAAmB,MAAM,EAAE,0BAAiB,EAAE;QAC7D,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,YAAY,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;KAChE,CAAC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,cAAc,CAClC,MAAqB,EACrB,OAAe;IAEf,OAAO,IAAA,mBAAU,EAAkB,MAAM,EAAE,6BAAoB,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;AAChF,CAAC;AAED,SAAS,cAAc,CAAC,KAAmC,EAAE,MAAoB;IAC/E,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,IAAA,kBAAS,EAAC,KAAK,CAAC,CAAC;QACjB,OAAO;IACT,CAAC;IACD,IAAA,mBAAU,EACR,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAC5C,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,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C,CAAC,KAAK,CAAC,CAAC,CAC9D,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,IAAA,kBAAS,EAAC,IAAI,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,GAAG,YAAY,OAAC,CAAC,QAAQ,EAAE,CAAC;gBAC9B,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,oBAAoB,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC7F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;YACD,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAE,GAAa,CAAC,OAAO,CAAC,CAAC,CAAC;YACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Command } from 'commander';
2
+ import { GraphQLClient } from 'graphql-request';
3
+ export interface CreateGroupResult {
4
+ create_group: {
5
+ id: string;
6
+ title: string;
7
+ };
8
+ }
9
+ export declare function createGroup(client: GraphQLClient, boardId: string, opts: {
10
+ name: string;
11
+ color?: string;
12
+ }): Promise<CreateGroupResult>;
13
+ export declare function registerGroups(program: Command, clientFactory: () => GraphQLClient): void;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createGroup = createGroup;
7
+ exports.registerGroups = registerGroups;
8
+ const zod_1 = require("zod");
9
+ const chalk_1 = __importDefault(require("chalk"));
10
+ const client_1 = require("../client");
11
+ const output_1 = require("../output");
12
+ const groups_1 = require("../queries/groups");
13
+ async function createGroup(client, boardId, opts) {
14
+ return (0, client_1.gqlRequest)(client, groups_1.CREATE_GROUP_MUTATION, {
15
+ boardId,
16
+ groupName: opts.name,
17
+ groupColor: opts.color,
18
+ });
19
+ }
20
+ const GroupCreateOptionsSchema = zod_1.z.object({
21
+ name: zod_1.z.string().min(1, 'Group name is required'),
22
+ color: zod_1.z.string().optional(),
23
+ });
24
+ function registerGroups(program, clientFactory) {
25
+ const groups = program.command('groups').description('Manage monday.com board groups');
26
+ groups
27
+ .command('create <boardId>')
28
+ .description('Create a new group on a board')
29
+ .requiredOption('--name <name>', 'Group name')
30
+ .option('--color <color>', 'Group color (e.g. done, working_on_it, stuck)')
31
+ .action(async (boardId, opts) => {
32
+ try {
33
+ const validated = GroupCreateOptionsSchema.parse(opts);
34
+ const client = clientFactory();
35
+ const result = await createGroup(client, boardId, validated);
36
+ (0, output_1.printJson)(result.create_group);
37
+ }
38
+ catch (err) {
39
+ if (err instanceof zod_1.z.ZodError) {
40
+ console.error(chalk_1.default.red('Validation error: ' + err.issues.map((i) => i.message).join(', ')));
41
+ process.exit(1);
42
+ }
43
+ console.error(chalk_1.default.red(err.message));
44
+ process.exit(1);
45
+ }
46
+ });
47
+ }
48
+ //# sourceMappingURL=groups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groups.js","sourceRoot":"","sources":["../../src/commands/groups.ts"],"names":[],"mappings":";;;;;AAYA,kCAUC;AAOD,wCAuBC;AAlDD,6BAAwB;AACxB,kDAA0B;AAC1B,sCAAuC;AACvC,sCAAsC;AACtC,8CAA0D;AAMnD,KAAK,UAAU,WAAW,CAC/B,MAAqB,EACrB,OAAe,EACf,IAAsC;IAEtC,OAAO,IAAA,mBAAU,EAAoB,MAAM,EAAE,8BAAqB,EAAE;QAClE,OAAO;QACP,SAAS,EAAE,IAAI,CAAC,IAAI;QACpB,UAAU,EAAE,IAAI,CAAC,KAAK;KACvB,CAAC,CAAC;AACL,CAAC;AAED,MA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AO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAE,GAAa,CAAC,OAAO,CAAC,CAAC,CAAC;YACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -34,6 +34,16 @@ export interface UpdateColumnsResult {
34
34
  url: string;
35
35
  };
36
36
  }
37
+ export interface DeleteItemResult {
38
+ delete_item: {
39
+ id: string;
40
+ };
41
+ }
42
+ export interface MoveItemResult {
43
+ move_item_to_group: {
44
+ id: string;
45
+ };
46
+ }
37
47
  export declare function fetchItems(client: GraphQLClient, boardId: string, opts: {
38
48
  limit: number;
39
49
  includeColumns: boolean;
@@ -45,4 +55,6 @@ export declare function createItem(client: GraphQLClient, boardId: string, opts:
45
55
  columnValues?: string;
46
56
  }): Promise<CreateItemResult>;
47
57
  export declare function updateItemColumns(client: GraphQLClient, boardId: string, itemId: string, columnValuesJson: string): Promise<UpdateColumnsResult>;
58
+ export declare function deleteItem(client: GraphQLClient, itemId: string): Promise<DeleteItemResult>;
59
+ export declare function moveItemToGroup(client: GraphQLClient, itemId: string, groupId: string): Promise<MoveItemResult>;
48
60
  export declare function registerItems(program: Command, clientFactory: () => GraphQLClient): void;
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchItems = fetchItems;
7
7
  exports.createItem = createItem;
8
8
  exports.updateItemColumns = updateItemColumns;
9
+ exports.deleteItem = deleteItem;
10
+ exports.moveItemToGroup = moveItemToGroup;
9
11
  exports.registerItems = registerItems;
10
12
  const zod_1 = require("zod");
11
13
  const chalk_1 = __importDefault(require("chalk"));
@@ -35,6 +37,12 @@ async function updateItemColumns(client, boardId, itemId, columnValuesJson) {
35
37
  columnValues: columnValuesJson,
36
38
  });
37
39
  }
40
+ async function deleteItem(client, itemId) {
41
+ return (0, client_1.gqlRequest)(client, items_1.DELETE_ITEM_MUTATION, { itemId });
42
+ }
43
+ async function moveItemToGroup(client, itemId, groupId) {
44
+ return (0, client_1.gqlRequest)(client, items_1.MOVE_ITEM_TO_GROUP_MUTATION, { itemId, groupId });
45
+ }
38
46
  const isValidJson = (v) => {
39
47
  if (!v)
40
48
  return true;
@@ -168,5 +176,34 @@ function registerItems(program, clientFactory) {
168
176
  process.exit(1);
169
177
  }
170
178
  });
179
+ items
180
+ .command('delete <itemId>')
181
+ .description('Delete an item')
182
+ .action(async (itemId) => {
183
+ try {
184
+ const client = clientFactory();
185
+ const result = await deleteItem(client, itemId);
186
+ (0, output_1.printJson)({ deleted: true, id: result.delete_item.id });
187
+ }
188
+ catch (err) {
189
+ console.error(chalk_1.default.red(err.message));
190
+ process.exit(1);
191
+ }
192
+ });
193
+ items
194
+ .command('move <itemId>')
195
+ .description('Move an item to a different group')
196
+ .requiredOption('--group <groupId>', 'Target group ID')
197
+ .action(async (itemId, opts) => {
198
+ try {
199
+ const client = clientFactory();
200
+ const result = await moveItemToGroup(client, itemId, opts.group);
201
+ (0, output_1.printJson)({ moved: true, id: result.move_item_to_group.id, groupId: opts.group });
202
+ }
203
+ catch (err) {
204
+ console.error(chalk_1.default.red(err.message));
205
+ process.exit(1);
206
+ }
207
+ });
171
208
  }
172
209
  //# sourceMappingURL=items.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"items.js","sourceRoot":"","sources":["../../src/commands/items.ts"],"names":[],"mappings":";;;;;AAoCA,gCAWC;AAED,gCAWC;AAED,8CAWC;AA0CD,sCAmGC;AApND,6BAAwB;AACxB,kDAA0B;AAC1B,sCAAuC;AACvC,sCAAgE;AAChE,4CAI0B;AA0BnB,KAAK,UAAU,UAAU,CAC9B,MAAqB,EACrB,OAAe,EACf,IAAiE;IAEjE,OAAO,IAAA,mBAAU,EAAkB,MAAM,EAAE,kCAA0B,EAAE;QACrE,OAAO;QACP,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,cAAc,EAAE,IAAI,CAAC,cAAc;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,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YACjE,IAAA,kBAAS,EAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,kBAAkB,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QACpF,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAE,GAAa,CAAC,OAAO,CAAC,CAAC,CAAC;YACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Command } from 'commander';
2
+ import { GraphQLClient } from 'graphql-request';
3
+ interface BoardsResult {
4
+ boards: Array<{
5
+ id: string;
6
+ name: string;
7
+ board_kind: string;
8
+ workspace: {
9
+ name: string;
10
+ } | null;
11
+ }>;
12
+ }
13
+ export declare function searchBoards(client: GraphQLClient, term: string): Promise<BoardsResult['boards']>;
14
+ export declare function registerSearch(program: Command, clientFactory: () => GraphQLClient): void;
15
+ export {};
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.searchBoards = searchBoards;
7
+ exports.registerSearch = registerSearch;
8
+ const chalk_1 = __importDefault(require("chalk"));
9
+ const client_1 = require("../client");
10
+ const output_1 = require("../output");
11
+ const boards_1 = require("../queries/boards");
12
+ async function searchBoards(client, term) {
13
+ const data = await (0, client_1.gqlRequest)(client, boards_1.LIST_BOARDS_QUERY, { limit: 500, page: 1 });
14
+ const lower = term.toLowerCase();
15
+ return data.boards.filter((b) => b.name.toLowerCase().includes(lower));
16
+ }
17
+ function registerSearch(program, clientFactory) {
18
+ program
19
+ .command('search <term>')
20
+ .description('Search boards by name (case-insensitive substring match)')
21
+ .action(async (term) => {
22
+ const format = program.opts().table ? 'table' : 'json';
23
+ try {
24
+ const client = clientFactory();
25
+ const results = await searchBoards(client, term);
26
+ if (format === 'table') {
27
+ (0, output_1.printTable)(['ID', 'Name', 'Kind', 'Workspace'], results.map((b) => [b.id, b.name, b.board_kind, b.workspace?.name ?? '']));
28
+ }
29
+ else {
30
+ (0, output_1.printJson)(results);
31
+ }
32
+ }
33
+ catch (err) {
34
+ console.error(chalk_1.default.red(err.message));
35
+ process.exit(1);
36
+ }
37
+ });
38
+ }
39
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/commands/search.ts"],"names":[],"mappings":";;;;;AAWA,oCAOC;AAED,wCAsBC;AAxCD,kDAA0B;AAC1B,sCAAuC;AACvC,sCAAgE;AAChE,8CAAsD;AAM/C,KAAK,UAAU,YAAY,CAChC,MAAqB,EACrB,IAAY;IAEZ,MAAM,IAAI,GAAG,MAAM,IAAA,mBAAU,EAAe,MAAM,EAAE,0BAAiB,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;IAChG,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACjC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,SAAgB,cAAc,CAAC,OAAgB,EAAE,aAAkC;IACjF,OAAO;SACJ,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,0DAA0D,CAAC;SACvE,MAAM,CAAC,KAAK,EAAE,IAAY,EAAE,EAAE;QAC7B,MAAM,MAAM,GAAkB,OAAO,CAAC,IAAI,EAAE,CAAC,KAA6B,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;QAC9F,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;YAC/B,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACjD,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;gBACvB,IAAA,mBAAU,EACR,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EACnC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,CAC1E,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,IAAA,kBAAS,EAAC,OAAO,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAE,GAAa,CAAC,OAAO,CAAC,CAAC,CAAC;YACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -10,5 +10,23 @@ export interface CreateUpdateResult {
10
10
  };
11
11
  };
12
12
  }
13
+ export interface ItemUpdatesResult {
14
+ items: Array<{
15
+ id: string;
16
+ updates: Array<{
17
+ id: string;
18
+ text_body: string;
19
+ created_at: string;
20
+ creator: {
21
+ id: string;
22
+ name: string;
23
+ } | null;
24
+ }>;
25
+ }>;
26
+ }
13
27
  export declare function createUpdate(client: GraphQLClient, itemId: string, body: string): Promise<CreateUpdateResult>;
28
+ export declare function fetchUpdates(client: GraphQLClient, itemId: string, opts: {
29
+ limit: number;
30
+ page: number;
31
+ }): Promise<ItemUpdatesResult>;
14
32
  export declare function registerUpdates(program: Command, clientFactory: () => GraphQLClient): void;
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.createUpdate = createUpdate;
7
+ exports.fetchUpdates = fetchUpdates;
7
8
  exports.registerUpdates = registerUpdates;
8
9
  const zod_1 = require("zod");
9
10
  const chalk_1 = __importDefault(require("chalk"));
@@ -13,10 +14,21 @@ const updates_1 = require("../queries/updates");
13
14
  async function createUpdate(client, itemId, body) {
14
15
  return (0, client_1.gqlRequest)(client, updates_1.CREATE_UPDATE_MUTATION, { itemId, body });
15
16
  }
17
+ async function fetchUpdates(client, itemId, opts) {
18
+ return (0, client_1.gqlRequest)(client, updates_1.GET_ITEM_UPDATES_QUERY, {
19
+ itemId,
20
+ limit: opts.limit,
21
+ page: opts.page,
22
+ });
23
+ }
16
24
  const UpdateCreateSchema = zod_1.z.object({
17
25
  itemId: zod_1.z.string().min(1),
18
26
  body: zod_1.z.string().min(1, 'Update body cannot be empty'),
19
27
  });
28
+ const UpdatesListOptionsSchema = zod_1.z.object({
29
+ limit: zod_1.z.coerce.number().int().positive().default(25),
30
+ page: zod_1.z.coerce.number().int().positive().default(1),
31
+ });
20
32
  function registerUpdates(program, clientFactory) {
21
33
  const updates = program.command('updates').description('Manage monday.com item updates');
22
34
  updates
@@ -38,5 +50,38 @@ function registerUpdates(program, clientFactory) {
38
50
  process.exit(1);
39
51
  }
40
52
  });
53
+ updates
54
+ .command('list <itemId>')
55
+ .description('List updates/comments on an item')
56
+ .option('--limit <n>', 'Number of updates to return', '25')
57
+ .option('--page <n>', 'Page number', '1')
58
+ .action(async (itemId, opts) => {
59
+ const format = program.opts().table ? 'table' : 'json';
60
+ try {
61
+ const { limit, page } = UpdatesListOptionsSchema.parse(opts);
62
+ const client = clientFactory();
63
+ const data = await fetchUpdates(client, itemId, { limit, page });
64
+ const updatesList = data.items[0]?.updates ?? [];
65
+ if (format === 'table') {
66
+ (0, output_1.printTable)(['ID', 'Creator', 'Created At', 'Body'], updatesList.map((u) => [
67
+ u.id,
68
+ u.creator?.name ?? '',
69
+ u.created_at,
70
+ u.text_body.length > 60 ? u.text_body.slice(0, 57) + '...' : u.text_body,
71
+ ]));
72
+ }
73
+ else {
74
+ (0, output_1.printJson)(updatesList);
75
+ }
76
+ }
77
+ catch (err) {
78
+ if (err instanceof zod_1.z.ZodError) {
79
+ console.error(chalk_1.default.red('Validation error: ' + err.issues.map((i) => i.message).join(', ')));
80
+ process.exit(1);
81
+ }
82
+ console.error(chalk_1.default.red(err.message));
83
+ process.exit(1);
84
+ }
85
+ });
41
86
  }
42
87
  //# sourceMappingURL=updates.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"updates.js","sourceRoot":"","sources":["../../src/commands/updates.ts"],"names":[],"mappings":";;;;;AAgBA,oCAMC;AAOD,0CAqBC;AAhDD,6BAAwB;AACxB,kDAA0B;AAC1B,sCAAuC;AACvC,sCAAsC;AACtC,gDAA4D;AAUrD,KAAK,UAAU,YAAY,CAChC,MAAqB,EACrB,MAAc,EACd,IAAY;IAEZ,OAAO,IAAA,mBAAU,EAAqB,MAAM,EAAE,gCAAsB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAC1F,CAAC;AAED,MAAM,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IAClC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,6BAA6B,CAAC;CACvD,CAAC,CAAC;AAEH,SAAgB,eAAe,CAAC,OAAgB,EAAE,aAAkC;IAClF,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,gCAAgC,CAAC,CAAC;IAEzF,OAAO;SACJ,OAAO,CAAC,wBAAwB,CAAC;SACjC,WAAW,CAAC,iCAAiC,CAAC;SAC9C,MAAM,CAAC,KAAK,EAAE,M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}
@@ -0,0 +1,16 @@
1
+ import { Command } from 'commander';
2
+ import { GraphQLClient } from 'graphql-request';
3
+ export interface UsersListResult {
4
+ users: Array<{
5
+ id: string;
6
+ name: string;
7
+ email: string;
8
+ title: string | null;
9
+ is_admin: boolean;
10
+ is_guest: boolean;
11
+ }>;
12
+ }
13
+ export declare function fetchUsers(client: GraphQLClient, opts: {
14
+ limit: number;
15
+ }): Promise<UsersListResult>;
16
+ export declare function registerUsers(program: Command, clientFactory: () => GraphQLClient): void;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.fetchUsers = fetchUsers;
7
+ exports.registerUsers = registerUsers;
8
+ const zod_1 = require("zod");
9
+ const chalk_1 = __importDefault(require("chalk"));
10
+ const client_1 = require("../client");
11
+ const output_1 = require("../output");
12
+ const users_1 = require("../queries/users");
13
+ async function fetchUsers(client, opts) {
14
+ return (0, client_1.gqlRequest)(client, users_1.LIST_USERS_QUERY, { limit: opts.limit });
15
+ }
16
+ const UsersListOptionsSchema = zod_1.z.object({
17
+ limit: zod_1.z.coerce.number().int().positive().default(200),
18
+ });
19
+ function registerUsers(program, clientFactory) {
20
+ const users = program.command('users').description('Manage monday.com users');
21
+ users
22
+ .command('list', { isDefault: true })
23
+ .description('List all users in the account')
24
+ .option('--limit <n>', 'Number of users to return', '200')
25
+ .action(async (opts) => {
26
+ const format = program.opts().table ? 'table' : 'json';
27
+ try {
28
+ const { limit } = UsersListOptionsSchema.parse(opts);
29
+ const client = clientFactory();
30
+ const data = await fetchUsers(client, { limit });
31
+ if (format === 'table') {
32
+ (0, output_1.printTable)(['ID', 'Name', 'Email', 'Title', 'Admin'], data.users.map((u) => [u.id, u.name, u.email, u.title ?? '', u.is_admin ? 'yes' : 'no']));
33
+ }
34
+ else {
35
+ (0, output_1.printJson)(data.users);
36
+ }
37
+ }
38
+ catch (err) {
39
+ if (err instanceof zod_1.z.ZodError) {
40
+ console.error(chalk_1.default.red('Validation error: ' + err.issues.map((i) => i.message).join(', ')));
41
+ process.exit(1);
42
+ }
43
+ console.error(chalk_1.default.red(err.message));
44
+ process.exit(1);
45
+ }
46
+ });
47
+ }
48
+ //# sourceMappingURL=users.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/commands/users.ts"],"names":[],"mappings":";;;;;AAmBA,gCAKC;AAMD,sCA8BC;AA1DD,6BAAwB;AACxB,kDAA0B;AAC1B,sCAAuC;AACvC,sCAAgE;AAChE,4CAAoD;AAa7C,KAAK,UAAU,UAAU,CAC9B,MAAqB,EACrB,IAAuB;IAEvB,OAAO,IAAA,mBAAU,EAAkB,MAAM,EAAE,wBAAgB,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;AACtF,CAAC;AAED,MAAM,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC;CACvD,CAAC,CAAC;AAEH,SAAgB,aAAa,CAAC,OAAgB,EAAE,aAAkC;IAChF,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC;IAE9E,KAAK;SACF,OAAO,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;SACpC,WAAW,CAAC,+BAA+B,CAAC;SAC5C,MAAM,CAAC,aAAa,EAAE,2BAA2B,EAAE,KAAK,CAAC;SACzD,MAAM,CAAC,KAAK,EAAE,IAAuB,EAAE,EAAE;QACxC,MAAM,MAAM,GAAkB,OAAO,CAAC,IAAI,EAAE,CAAC,KAA6B,CAAC,CAAC,CAAC,OAAO,CAA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AAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
package/dist/index.js CHANGED
@@ -15,6 +15,9 @@ const boards_1 = require("./commands/boards");
15
15
  const items_1 = require("./commands/items");
16
16
  const updates_1 = require("./commands/updates");
17
17
  const graphql_1 = require("./commands/graphql");
18
+ const groups_1 = require("./commands/groups");
19
+ const users_1 = require("./commands/users");
20
+ const search_1 = require("./commands/search");
18
21
  const program = new commander_1.Command();
19
22
  program
20
23
  .name('mcli')
@@ -29,6 +32,9 @@ const clientFactory = () => (0, client_1.createClient)((0, config_1.loadConfig)(
29
32
  (0, items_1.registerItems)(program, clientFactory);
30
33
  (0, updates_1.registerUpdates)(program, clientFactory);
31
34
  (0, graphql_1.registerGraphql)(program, clientFactory);
35
+ (0, groups_1.registerGroups)(program, clientFactory);
36
+ (0, users_1.registerUsers)(program, clientFactory);
37
+ (0, search_1.registerSearch)(program, clientFactory);
32
38
  program.parseAsync(process.argv).catch((err) => {
33
39
  console.error(chalk_1.default.red('Error:'), err.message);
34
40
  process.exit(1);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AACA,yCAAoC;AACpC,kDAA0B;AAC1B,qCAAsC;AACtC,qCAAwC;AACxC,0CAA+C;AAC/C,sCAA2C;AAC3C,sDAA2D;AAC3D,8CAAmD;AACnD,4CAAiD;AACjD,gDAAqD;AACrD,gDAAqD;AAErD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,MAAM,CAAC;KACZ,WAAW,CAAC,gBAAgB,CAAC;KAC7B,OAAO,CAAC,OAAO,CAAC;KAChB,MAAM,CAAC,SAAS,EAAE,gDAAgD,CAAC,CAAC;AAEvE,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,IAAA,qBAAY,EAAC,IAAA,mBAAU,GAAE,CAA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AE,CAAC,CAAC;AAEvD,IAAA,mBAAY,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AACrC,IAAA,eAAU,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AACnC,IAAA,+BAAkB,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AAC3C,IAAA,uBAAc,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AACvC,IAAA,qBAAa,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AACtC,IAAA,yBAAe,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AACxC,IAAA,yBAAe,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AACxC,IAAA,uBAAc,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AACvC,IAAA,qBAAa,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AACtC,IAAA,uBAAc,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AAEvC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAU,EAAE,EAAE;IACpD,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,2 +1,5 @@
1
1
  export declare const LIST_BOARDS_QUERY: string;
2
2
  export declare const GET_BOARD_INFO_QUERY: string;
3
+ export declare const GET_BOARD_SCHEMA_QUERY: string;
4
+ export declare const CREATE_BOARD_MUTATION: string;
5
+ export declare const GET_BOARD_ACTIVITY_QUERY: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_BOARD_INFO_QUERY = exports.LIST_BOARDS_QUERY = void 0;
3
+ exports.GET_BOARD_ACTIVITY_QUERY = exports.CREATE_BOARD_MUTATION = exports.GET_BOARD_SCHEMA_QUERY = exports.GET_BOARD_INFO_QUERY = exports.LIST_BOARDS_QUERY = void 0;
4
4
  const graphql_request_1 = require("graphql-request");
5
5
  exports.LIST_BOARDS_QUERY = (0, graphql_request_1.gql) `
6
6
  query listBoards($limit: Int, $page: Int, $workspaceIds: [ID]) {
@@ -41,4 +41,50 @@ exports.GET_BOARD_INFO_QUERY = (0, graphql_request_1.gql) `
41
41
  }
42
42
  }
43
43
  `;
44
+ exports.GET_BOARD_SCHEMA_QUERY = (0, graphql_request_1.gql) `
45
+ query getBoardSchema($boardId: ID!) {
46
+ boards(ids: [$boardId]) {
47
+ columns {
48
+ id
49
+ title
50
+ type
51
+ }
52
+ groups {
53
+ id
54
+ title
55
+ }
56
+ }
57
+ }
58
+ `;
59
+ exports.CREATE_BOARD_MUTATION = (0, graphql_request_1.gql) `
60
+ mutation createBoard(
61
+ $boardName: String!
62
+ $boardKind: BoardKind!
63
+ $boardDescription: String
64
+ $workspaceId: ID
65
+ ) {
66
+ create_board(
67
+ board_name: $boardName
68
+ board_kind: $boardKind
69
+ description: $boardDescription
70
+ workspace_id: $workspaceId
71
+ ) {
72
+ id
73
+ name
74
+ url
75
+ }
76
+ }
77
+ `;
78
+ exports.GET_BOARD_ACTIVITY_QUERY = (0, graphql_request_1.gql) `
79
+ query getBoardActivity($boardId: ID!, $from: ISO8601DateTime!, $to: ISO8601DateTime!, $limit: Int) {
80
+ boards(ids: [$boardId]) {
81
+ activity_logs(from: $from, to: $to, limit: $limit) {
82
+ user_id
83
+ event
84
+ entity
85
+ created_at
86
+ }
87
+ }
88
+ }
89
+ `;
44
90
  //# sourceMappingURL=boards.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"boards.js","sourceRoot":"","sources":["../../src/queries/boards.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,iBAAiB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;CAcnC,CAAC;AAEW,QAAA,oBAAoB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;CAuBtC,CAAC"}
1
+ {"version":3,"file":"boards.js","sourceRoot":"","sources":["../../src/queries/boards.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,iBAAiB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;CAcnC,CAAC;AAEW,QAAA,oBAAoB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;CAuBtC,CAAC;AAEW,QAAA,sBAAsB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;CAcxC,CAAC;AAEW,QAAA,qBAAqB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;CAkBvC,CAAC;AAEW,QAAA,wBAAwB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;CAW1C,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const CREATE_GROUP_MUTATION: string;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CREATE_GROUP_MUTATION = void 0;
4
+ const graphql_request_1 = require("graphql-request");
5
+ exports.CREATE_GROUP_MUTATION = (0, graphql_request_1.gql) `
6
+ mutation createGroup($boardId: ID!, $groupName: String!, $groupColor: String) {
7
+ create_group(board_id: $boardId, group_name: $groupName, group_color: $groupColor) {
8
+ id
9
+ title
10
+ }
11
+ }
12
+ `;
13
+ //# sourceMappingURL=groups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groups.js","sourceRoot":"","sources":["../../src/queries/groups.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,qBAAqB,GAAG,IAAA,qBAAG,EAAA;;;;;;;CAOvC,CAAC"}
@@ -1,3 +1,5 @@
1
1
  export declare const GET_BOARD_ITEMS_PAGE_QUERY: string;
2
2
  export declare const CREATE_ITEM_MUTATION: string;
3
3
  export declare const CHANGE_ITEM_COLUMN_VALUES_MUTATION: string;
4
+ export declare const DELETE_ITEM_MUTATION: string;
5
+ export declare const MOVE_ITEM_TO_GROUP_MUTATION: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CHANGE_ITEM_COLUMN_VALUES_MUTATION = exports.CREATE_ITEM_MUTATION = exports.GET_BOARD_ITEMS_PAGE_QUERY = void 0;
3
+ exports.MOVE_ITEM_TO_GROUP_MUTATION = exports.DELETE_ITEM_MUTATION = exports.CHANGE_ITEM_COLUMN_VALUES_MUTATION = exports.CREATE_ITEM_MUTATION = exports.GET_BOARD_ITEMS_PAGE_QUERY = void 0;
4
4
  const graphql_request_1 = require("graphql-request");
5
5
  exports.GET_BOARD_ITEMS_PAGE_QUERY = (0, graphql_request_1.gql) `
6
6
  query getBoardItemsPage(
@@ -61,4 +61,18 @@ exports.CHANGE_ITEM_COLUMN_VALUES_MUTATION = (0, graphql_request_1.gql) `
61
61
  }
62
62
  }
63
63
  `;
64
+ exports.DELETE_ITEM_MUTATION = (0, graphql_request_1.gql) `
65
+ mutation deleteItem($itemId: ID!) {
66
+ delete_item(item_id: $itemId) {
67
+ id
68
+ }
69
+ }
70
+ `;
71
+ exports.MOVE_ITEM_TO_GROUP_MUTATION = (0, graphql_request_1.gql) `
72
+ mutation moveItemToGroup($itemId: ID!, $groupId: String!) {
73
+ move_item_to_group(item_id: $itemId, group_id: $groupId) {
74
+ id
75
+ }
76
+ }
77
+ `;
64
78
  //# sourceMappingURL=items.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"items.js","sourceRoot":"","sources":["../../src/queries/items.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,0BAA0B,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B5C,CAAC;AAEW,QAAA,oBAAoB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;CAkBtC,CAAC;AAEW,QAAA,kCAAkC,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;CAYpD,CAAC"}
1
+ {"version":3,"file":"items.js","sourceRoot":"","sources":["../../src/queries/items.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,0BAA0B,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B5C,CAAC;AAEW,QAAA,oBAAoB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;CAkBtC,CAAC;AAEW,QAAA,kCAAkC,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;CAYpD,CAAC;AAEW,QAAA,oBAAoB,GAAG,IAAA,qBAAG,EAAA;;;;;;CAMtC,CAAC;AAEW,QAAA,2BAA2B,GAAG,IAAA,qBAAG,EAAA;;;;;;CAM7C,CAAC"}
@@ -1 +1,2 @@
1
1
  export declare const CREATE_UPDATE_MUTATION: string;
2
+ export declare const GET_ITEM_UPDATES_QUERY: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CREATE_UPDATE_MUTATION = void 0;
3
+ exports.GET_ITEM_UPDATES_QUERY = exports.CREATE_UPDATE_MUTATION = void 0;
4
4
  const graphql_request_1 = require("graphql-request");
5
5
  exports.CREATE_UPDATE_MUTATION = (0, graphql_request_1.gql) `
6
6
  mutation createUpdate($itemId: ID!, $body: String!) {
@@ -14,4 +14,20 @@ exports.CREATE_UPDATE_MUTATION = (0, graphql_request_1.gql) `
14
14
  }
15
15
  }
16
16
  `;
17
+ exports.GET_ITEM_UPDATES_QUERY = (0, graphql_request_1.gql) `
18
+ query getItemUpdates($itemId: ID!, $limit: Int, $page: Int) {
19
+ items(ids: [$itemId]) {
20
+ id
21
+ updates(limit: $limit, page: $page) {
22
+ id
23
+ text_body
24
+ created_at
25
+ creator {
26
+ id
27
+ name
28
+ }
29
+ }
30
+ }
31
+ }
32
+ `;
17
33
  //# sourceMappingURL=updates.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"updates.js","sourceRoot":"","sources":["../../src/queries/updates.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,sBAAsB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;CAWxC,CAAC"}
1
+ {"version":3,"file":"updates.js","sourceRoot":"","sources":["../../src/queries/updates.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,sBAAsB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;CAWxC,CAAC;AAEW,QAAA,sBAAsB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;CAexC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const LIST_USERS_QUERY: string;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LIST_USERS_QUERY = void 0;
4
+ const graphql_request_1 = require("graphql-request");
5
+ exports.LIST_USERS_QUERY = (0, graphql_request_1.gql) `
6
+ query listUsers($limit: Int) {
7
+ users(limit: $limit) {
8
+ id
9
+ name
10
+ email
11
+ title
12
+ is_admin
13
+ is_guest
14
+ }
15
+ }
16
+ `;
17
+ //# sourceMappingURL=users.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/queries/users.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,gBAAgB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;CAWlC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itsalexr/mcli",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "monday.com CLI for Claude Code and coding agents",
5
5
  "bin": {
6
6
  "mcli": "dist/index.js"