@itsalexr/mcli 1.0.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.
Files changed (50) hide show
  1. package/README.md +151 -0
  2. package/dist/client.d.ts +4 -0
  3. package/dist/client.js +25 -0
  4. package/dist/client.js.map +1 -0
  5. package/dist/commands/auth.d.ts +7 -0
  6. package/dist/commands/auth.js +144 -0
  7. package/dist/commands/auth.js.map +1 -0
  8. package/dist/commands/boards.d.ts +44 -0
  9. package/dist/commands/boards.js +88 -0
  10. package/dist/commands/boards.js.map +1 -0
  11. package/dist/commands/graphql.d.ts +4 -0
  12. package/dist/commands/graphql.js +60 -0
  13. package/dist/commands/graphql.js.map +1 -0
  14. package/dist/commands/items.d.ts +48 -0
  15. package/dist/commands/items.js +172 -0
  16. package/dist/commands/items.js.map +1 -0
  17. package/dist/commands/me.d.ts +16 -0
  18. package/dist/commands/me.js +35 -0
  19. package/dist/commands/me.js.map +1 -0
  20. package/dist/commands/updates.d.ts +14 -0
  21. package/dist/commands/updates.js +42 -0
  22. package/dist/commands/updates.js.map +1 -0
  23. package/dist/commands/workspaces.d.ts +14 -0
  24. package/dist/commands/workspaces.js +50 -0
  25. package/dist/commands/workspaces.js.map +1 -0
  26. package/dist/config.d.ts +6 -0
  27. package/dist/config.js +50 -0
  28. package/dist/config.js.map +1 -0
  29. package/dist/index.d.ts +2 -0
  30. package/dist/index.js +36 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/output.d.ts +7 -0
  33. package/dist/output.js +29 -0
  34. package/dist/output.js.map +1 -0
  35. package/dist/queries/boards.d.ts +2 -0
  36. package/dist/queries/boards.js +44 -0
  37. package/dist/queries/boards.js.map +1 -0
  38. package/dist/queries/items.d.ts +3 -0
  39. package/dist/queries/items.js +64 -0
  40. package/dist/queries/items.js.map +1 -0
  41. package/dist/queries/me.d.ts +1 -0
  42. package/dist/queries/me.js +19 -0
  43. package/dist/queries/me.js.map +1 -0
  44. package/dist/queries/updates.d.ts +1 -0
  45. package/dist/queries/updates.js +17 -0
  46. package/dist/queries/updates.js.map +1 -0
  47. package/dist/queries/workspaces.d.ts +1 -0
  48. package/dist/queries/workspaces.js +14 -0
  49. package/dist/queries/workspaces.js.map +1 -0
  50. package/package.json +39 -0
package/README.md ADDED
@@ -0,0 +1,151 @@
1
+ # mcli — monday.com CLI
2
+
3
+ A CLI for monday.com's GraphQL API. Works standalone or as a skill inside Claude Code and other coding agents.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g @itsalexr/mcli
9
+ ```
10
+
11
+ Or run without installing:
12
+
13
+ ```bash
14
+ npx @itsalexr/mcli boards list
15
+ ```
16
+
17
+ ## Authentication
18
+
19
+ Get your API token: **monday.com → Avatar → Administration → Connections → Personal API Token**
20
+
21
+ ```bash
22
+ mcli auth login # interactive setup, saves token to ~/.env
23
+ mcli auth status # verify token and show current user
24
+ mcli auth logout # remove stored token
25
+ ```
26
+
27
+ Or set the environment variable directly:
28
+
29
+ ```bash
30
+ export MONDAY_TOKEN=your_token_here
31
+ ```
32
+
33
+ ## Commands
34
+
35
+ ### User & workspaces
36
+
37
+ ```bash
38
+ mcli me
39
+ mcli workspaces
40
+ mcli workspaces --limit 10 --page 2
41
+ ```
42
+
43
+ ### Boards
44
+
45
+ ```bash
46
+ mcli boards list
47
+ mcli boards list --workspace-id 12345
48
+ mcli boards get <boardId>
49
+ ```
50
+
51
+ ### Items
52
+
53
+ ```bash
54
+ mcli items list <boardId>
55
+ mcli items list <boardId> --columns # include column values
56
+ mcli items list <boardId> --limit 50 --cursor <cursor>
57
+
58
+ mcli items create <boardId> --name "My Task"
59
+ mcli items create <boardId> --name "My Task" --group-id grp1 --column-values '{"status": "Done"}'
60
+
61
+ mcli items update-columns <boardId> <itemId> '{"status": "In Progress"}'
62
+ ```
63
+
64
+ ### Updates (comments)
65
+
66
+ ```bash
67
+ mcli updates create <itemId> "This is a comment"
68
+ ```
69
+
70
+ ### Raw GraphQL
71
+
72
+ ```bash
73
+ mcli graphql '{ me { id name email } }'
74
+ mcli graphql 'query { boards(limit: 5) { id name } }'
75
+ mcli graphql 'query GetBoard($id: ID!) { boards(ids: [$id]) { id name } }' --variables '{"id": "12345"}'
76
+ ```
77
+
78
+ ## Output
79
+
80
+ All commands output JSON by default. Add `--table` for human-readable output:
81
+
82
+ ```bash
83
+ mcli boards list --table
84
+ mcli items list <boardId> --table
85
+ ```
86
+
87
+ ---
88
+
89
+ ## Use with coding agents
90
+
91
+ ### Claude Code (plugin — recommended)
92
+
93
+ Paste into Claude Code:
94
+
95
+ ```
96
+ /plugin marketplace add itsalexr/mcli
97
+ /plugin install monday@monday-cli
98
+ /reload-plugins
99
+ ```
100
+
101
+ The plugin puts `mcli` in PATH automatically. The Claude Code plugin lives in `claude-plugin/` inside this repo.
102
+
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
+ ---
129
+
130
+ ## Development
131
+
132
+ ```bash
133
+ npm run build # compile TypeScript
134
+ npm test # run all tests
135
+ npx jest --testPathPattern=boards # run a specific module's tests
136
+ npm run dev # run via ts-node (no build step)
137
+ ```
138
+
139
+ ## Publishing
140
+
141
+ ```bash
142
+ npm run build
143
+ npm publish --access public
144
+ ```
145
+
146
+ ## Configuration
147
+
148
+ | Variable | Description |
149
+ |---|---|
150
+ | `MONDAY_TOKEN` | API token (required) |
151
+ | `API_VERSION` | monday.com API version (default: `2026-07`) |
@@ -0,0 +1,4 @@
1
+ import { GraphQLClient } from 'graphql-request';
2
+ import type { Config } from './config';
3
+ export declare function createClient(config: Config): GraphQLClient;
4
+ export declare function gqlRequest<T>(client: GraphQLClient, query: string, variables?: Record<string, unknown>): Promise<T>;
package/dist/client.js ADDED
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createClient = createClient;
4
+ exports.gqlRequest = gqlRequest;
5
+ const graphql_request_1 = require("graphql-request");
6
+ function createClient(config) {
7
+ return new graphql_request_1.GraphQLClient(config.endpoint, {
8
+ headers: {
9
+ Authorization: config.token,
10
+ 'API-Version': config.apiVersion,
11
+ },
12
+ });
13
+ }
14
+ async function gqlRequest(client, query, variables) {
15
+ try {
16
+ return await client.request(query, variables);
17
+ }
18
+ catch (error) {
19
+ if (error instanceof graphql_request_1.ClientError && error.response?.errors?.length) {
20
+ throw new Error(error.response.errors.map((e) => e.message).join('; '));
21
+ }
22
+ throw error;
23
+ }
24
+ }
25
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;AAGA,oCAOC;AAED,gCAaC;AAzBD,qDAA6D;AAG7D,SAAgB,YAAY,CAAC,MAAc;IACzC,OAAO,IAAI,+BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;QACxC,OAAO,EAAE;YACP,aAAa,EAAE,MAAM,CAAC,KAAK;YAC3B,aAAa,EAAE,MAAM,CAAC,UAAU;SACjC;KACF,CAAC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,UAAU,CAC9B,MAAqB,EACrB,KAAa,EACb,SAAmC;IAEnC,IAAI,CAAC;QACH,OAAO,MAAM,MAAM,CAAC,OAAO,CAAI,KAAK,EAAE,SAAS,CAAC,CAAC;IACnD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,6BAAW,IAAI,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;YACnE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1E,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Command } from 'commander';
2
+ import { GraphQLClient } from 'graphql-request';
3
+ import { OutputFormat } from '../output';
4
+ export declare function saveToken(token: string, envPath?: string): void;
5
+ export declare function clearToken(envPath?: string): void;
6
+ export declare function runAuthStatus(client: GraphQLClient, format: OutputFormat): Promise<void>;
7
+ export declare function registerAuth(program: Command, clientFactory: () => GraphQLClient): void;
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.saveToken = saveToken;
40
+ exports.clearToken = clearToken;
41
+ exports.runAuthStatus = runAuthStatus;
42
+ exports.registerAuth = registerAuth;
43
+ const fs = __importStar(require("fs"));
44
+ const path = __importStar(require("path"));
45
+ const graphql_request_1 = require("graphql-request");
46
+ const zod_1 = require("zod");
47
+ const chalk_1 = __importDefault(require("chalk"));
48
+ const client_1 = require("../client");
49
+ const output_1 = require("../output");
50
+ const ME_QUERY = (0, graphql_request_1.gql) `
51
+ query me {
52
+ me {
53
+ id
54
+ name
55
+ email
56
+ title
57
+ account {
58
+ id
59
+ name
60
+ }
61
+ }
62
+ }
63
+ `;
64
+ const defaultEnvPath = path.join(process.cwd(), '.env');
65
+ function saveToken(token, envPath = defaultEnvPath) {
66
+ let content = '';
67
+ if (fs.existsSync(envPath)) {
68
+ content = fs.readFileSync(envPath, 'utf8');
69
+ }
70
+ const lines = content.split('\n');
71
+ const tokenLine = `MONDAY_TOKEN=${token}`;
72
+ const idx = lines.findIndex((l) => l.startsWith('MONDAY_TOKEN='));
73
+ if (idx >= 0) {
74
+ lines[idx] = tokenLine;
75
+ fs.writeFileSync(envPath, lines.join('\n'));
76
+ }
77
+ else {
78
+ const trimmed = content.trimEnd();
79
+ fs.writeFileSync(envPath, trimmed ? `${trimmed}\n${tokenLine}\n` : `${tokenLine}\n`);
80
+ }
81
+ }
82
+ function clearToken(envPath = defaultEnvPath) {
83
+ if (!fs.existsSync(envPath))
84
+ return;
85
+ const content = fs.readFileSync(envPath, 'utf8');
86
+ const filtered = content
87
+ .split('\n')
88
+ .filter((l) => !l.startsWith('MONDAY_TOKEN='))
89
+ .join('\n');
90
+ fs.writeFileSync(envPath, filtered);
91
+ }
92
+ async function runAuthStatus(client, format) {
93
+ const data = await (0, client_1.gqlRequest)(client, ME_QUERY);
94
+ (0, output_1.printOutput)(data.me, format, (me) => ({
95
+ headers: ['ID', 'Name', 'Email', 'Title', 'Account ID', 'Account Name'],
96
+ rows: [[me.id, me.name, me.email ?? '', me.title ?? '', me.account.id, me.account.name]],
97
+ }));
98
+ }
99
+ const LoginSchema = zod_1.z.object({
100
+ token: zod_1.z.string().min(1, 'Token cannot be empty'),
101
+ });
102
+ function registerAuth(program, clientFactory) {
103
+ const auth = program.command('auth').description('Manage authentication');
104
+ auth
105
+ .command('login')
106
+ .description('Save your monday.com API token to .env')
107
+ .requiredOption('--token <token>', 'Monday.com API token')
108
+ .action((opts) => {
109
+ try {
110
+ const { token } = LoginSchema.parse({ token: opts.token });
111
+ saveToken(token);
112
+ console.log(chalk_1.default.green('Token saved to .env'));
113
+ }
114
+ catch (err) {
115
+ if (err instanceof zod_1.z.ZodError) {
116
+ console.error(chalk_1.default.red('Validation error: ' + err.issues.map((i) => i.message).join(', ')));
117
+ process.exit(1);
118
+ }
119
+ throw err;
120
+ }
121
+ });
122
+ auth
123
+ .command('logout')
124
+ .description('Remove MONDAY_TOKEN from .env')
125
+ .action(() => {
126
+ clearToken();
127
+ console.log(chalk_1.default.green('Token removed from .env'));
128
+ });
129
+ auth
130
+ .command('status')
131
+ .description('Verify token and show current user')
132
+ .action(async () => {
133
+ const format = program.opts().table ? 'table' : 'json';
134
+ try {
135
+ const client = clientFactory();
136
+ await runAuthStatus(client, format);
137
+ }
138
+ catch (err) {
139
+ console.error(chalk_1.default.red(err.message));
140
+ process.exit(1);
141
+ }
142
+ });
143
+ }
144
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,8BAiBC;AAED,gCAQC;AAED,sCAMC;AAMD,oCA0CC;AAvHD,uCAAyB;AACzB,2CAA6B;AAE7B,qDAAqD;AACrD,6BAAwB;AACxB,kDAA0B;AAC1B,sCAAuC;AACvC,sCAAsD;AAEtD,MAAM,QAAQ,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;CAanB,CAAC;AAYF,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;AAExD,SAAgB,SAAS,CAAC,KAAa,EAAE,UAAkB,cAAc;IACvE,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,SAAS,GAAG,gBAAgB,KAAK,EAAE,CAAC;IAC1C,MAAM,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC;IAElE,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC;QACb,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;QACvB,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,CAAC;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AAC,+BAA+B,CAAC;SAC5C,MAAM,CAAC,GAAG,EAAE;QACX,UAAU,EAAE,CAAC;QACb,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEL,IAAI;SACD,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,oCAAoC,CAAC;SACjD,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,MAAM,GAAI,OAAO,CAAC,IAAI,EAAE,CAAC,KAA6B,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;QAChF,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;YAC/B,MAAM,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACtC,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,44 @@
1
+ import { Command } from 'commander';
2
+ import { GraphQLClient } from 'graphql-request';
3
+ export interface BoardsListResult {
4
+ boards: Array<{
5
+ id: string;
6
+ name: string;
7
+ description: string | null;
8
+ state: string;
9
+ board_kind: string;
10
+ workspace: {
11
+ id: string;
12
+ name: string;
13
+ } | null;
14
+ }>;
15
+ }
16
+ export interface BoardInfoResult {
17
+ boards: Array<{
18
+ id: string;
19
+ name: string;
20
+ description: string | null;
21
+ state: string;
22
+ board_kind: string;
23
+ columns: Array<{
24
+ id: string;
25
+ title: string;
26
+ type: string;
27
+ }>;
28
+ groups: Array<{
29
+ id: string;
30
+ title: string;
31
+ }>;
32
+ workspace: {
33
+ id: string;
34
+ name: string;
35
+ } | null;
36
+ }>;
37
+ }
38
+ export declare function fetchBoards(client: GraphQLClient, opts: {
39
+ limit: number;
40
+ page: number;
41
+ workspaceId?: string;
42
+ }): Promise<BoardsListResult>;
43
+ export declare function fetchBoardInfo(client: GraphQLClient, boardId: string): Promise<BoardInfoResult>;
44
+ export declare function registerBoards(program: Command, clientFactory: () => GraphQLClient): void;
@@ -0,0 +1,88 @@
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.fetchBoards = fetchBoards;
7
+ exports.fetchBoardInfo = fetchBoardInfo;
8
+ exports.registerBoards = registerBoards;
9
+ const zod_1 = require("zod");
10
+ const chalk_1 = __importDefault(require("chalk"));
11
+ const client_1 = require("../client");
12
+ const output_1 = require("../output");
13
+ const boards_1 = require("../queries/boards");
14
+ async function fetchBoards(client, opts) {
15
+ return (0, client_1.gqlRequest)(client, boards_1.LIST_BOARDS_QUERY, {
16
+ limit: opts.limit,
17
+ page: opts.page,
18
+ workspaceIds: opts.workspaceId ? [opts.workspaceId] : undefined,
19
+ });
20
+ }
21
+ async function fetchBoardInfo(client, boardId) {
22
+ return (0, client_1.gqlRequest)(client, boards_1.GET_BOARD_INFO_QUERY, { boardId });
23
+ }
24
+ function printBoardInfo(board, format) {
25
+ if (format === 'json') {
26
+ (0, output_1.printJson)(board);
27
+ return;
28
+ }
29
+ (0, output_1.printTable)(['ID', 'Name', 'State', 'Kind', 'Workspace'], [[board.id, board.name, board.state, board.board_kind, board.workspace?.name ?? '']]);
30
+ (0, output_1.printTable)(['Column ID', 'Title', 'Type'], board.columns.map((c) => [c.id, c.title, c.type]));
31
+ (0, output_1.printTable)(['Group ID', 'Title'], board.groups.map((g) => [g.id, g.title]));
32
+ }
33
+ const BoardsListOptionsSchema = zod_1.z.object({
34
+ workspaceId: zod_1.z.string().optional(),
35
+ limit: zod_1.z.coerce.number().int().positive().default(50),
36
+ page: zod_1.z.coerce.number().int().positive().default(1),
37
+ });
38
+ function registerBoards(program, clientFactory) {
39
+ const boards = program.command('boards').description('Manage monday.com boards');
40
+ boards
41
+ .command('list', { isDefault: true })
42
+ .description('List boards')
43
+ .option('--workspace-id <id>', 'Filter by workspace ID')
44
+ .option('--limit <n>', 'Number of boards to return', '50')
45
+ .option('--page <n>', 'Page number', '1')
46
+ .action(async (opts) => {
47
+ const format = program.opts().table ? 'table' : 'json';
48
+ try {
49
+ const { workspaceId, limit, page } = BoardsListOptionsSchema.parse(opts);
50
+ const client = clientFactory();
51
+ const data = await fetchBoards(client, { limit, page, workspaceId });
52
+ if (format === 'table') {
53
+ (0, output_1.printTable)(['ID', 'Name', 'State', 'Kind', 'Workspace'], data.boards.map((b) => [b.id, b.name, b.state, b.board_kind, b.workspace?.name ?? '']));
54
+ }
55
+ else {
56
+ (0, output_1.printJson)(data.boards);
57
+ }
58
+ }
59
+ catch (err) {
60
+ if (err instanceof zod_1.z.ZodError) {
61
+ console.error(chalk_1.default.red('Validation error: ' + err.issues.map((i) => i.message).join(', ')));
62
+ process.exit(1);
63
+ }
64
+ console.error(chalk_1.default.red(err.message));
65
+ process.exit(1);
66
+ }
67
+ });
68
+ boards
69
+ .command('get <boardId>')
70
+ .description('Get detailed board info')
71
+ .action(async (boardId) => {
72
+ const format = program.opts().table ? 'table' : 'json';
73
+ try {
74
+ const client = clientFactory();
75
+ const data = await fetchBoardInfo(client, boardId);
76
+ if (data.boards.length === 0) {
77
+ console.error(chalk_1.default.red(`Board ${boardId} not found`));
78
+ process.exit(1);
79
+ }
80
+ printBoardInfo(data.boards[0], format);
81
+ }
82
+ catch (err) {
83
+ console.error(chalk_1.default.red(err.message));
84
+ process.exit(1);
85
+ }
86
+ });
87
+ }
88
+ //# sourceMappingURL=boards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boards.js","sourceRoot":"","sources":["../../src/commands/boards.ts"],"names":[],"mappings":";;;;;AAgCA,kCASC;AAED,wCAKC;AA2BD,w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;SACxB,WAAW,CAAC,yBAAyB,CAAC;SACtC,MAAM,CAAC,KAAK,EAAE,OAAe,EAAE,EAAE;QAChC,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,IAAI,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YACnD,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC7B,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,SAAS,OAAO,YAAY,CAAC,CAAC,CAAC;gBACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;YACD,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;QACzC,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,4 @@
1
+ import { Command } from 'commander';
2
+ import { GraphQLClient } from 'graphql-request';
3
+ export declare function runRawGraphql(client: GraphQLClient, query: string, variablesJson?: string): Promise<unknown>;
4
+ export declare function registerGraphql(program: Command, clientFactory: () => GraphQLClient): void;
@@ -0,0 +1,60 @@
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.runRawGraphql = runRawGraphql;
7
+ exports.registerGraphql = registerGraphql;
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 isValidJson = (v) => {
13
+ if (!v)
14
+ return true;
15
+ try {
16
+ JSON.parse(v);
17
+ return true;
18
+ }
19
+ catch {
20
+ return false;
21
+ }
22
+ };
23
+ const GraphqlCmdSchema = zod_1.z.object({
24
+ query: zod_1.z.string().min(1, 'Query cannot be empty'),
25
+ variables: zod_1.z
26
+ .string()
27
+ .optional()
28
+ .refine(isValidJson, { message: '--variables must be valid JSON' }),
29
+ });
30
+ async function runRawGraphql(client, query, variablesJson) {
31
+ if (variablesJson !== undefined) {
32
+ // Validate JSON before sending
33
+ GraphqlCmdSchema.parse({ query, variables: variablesJson });
34
+ }
35
+ const variables = variablesJson ? JSON.parse(variablesJson) : undefined;
36
+ return (0, client_1.gqlRequest)(client, query, variables);
37
+ }
38
+ function registerGraphql(program, clientFactory) {
39
+ program
40
+ .command('graphql <query>')
41
+ .description('Execute a raw GraphQL query or mutation')
42
+ .option('--variables <json>', 'Variables as JSON string')
43
+ .action(async (query, opts) => {
44
+ try {
45
+ GraphqlCmdSchema.parse({ query, variables: opts.variables });
46
+ const client = clientFactory();
47
+ const result = await runRawGraphql(client, query, opts.variables);
48
+ (0, output_1.printJson)(result);
49
+ }
50
+ catch (err) {
51
+ if (err instanceof zod_1.z.ZodError) {
52
+ console.error(chalk_1.default.red('Validation error: ' + err.issues.map((i) => i.message).join(', ')));
53
+ process.exit(1);
54
+ }
55
+ console.error(chalk_1.default.red(err.message));
56
+ process.exit(1);
57
+ }
58
+ });
59
+ }
60
+ //# sourceMappingURL=graphql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../src/commands/graphql.ts"],"names":[],"mappings":";;;;;AAyBA,sCAWC;AAED,0CAoBC;AAxDD,6BAAwB;AACxB,kDAA0B;AAC1B,sCAAuC;AACvC,sCAAsC;AAEtC,MAAM,WAAW,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AE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;YAC7D,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAClE,IAAA,kBAAS,EAAC,MAAM,CAAC,CAAC;QACpB,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,48 @@
1
+ import { Command } from 'commander';
2
+ import { GraphQLClient } from 'graphql-request';
3
+ export interface ItemsPageResult {
4
+ boards: Array<{
5
+ items_page: {
6
+ items: Array<{
7
+ id: string;
8
+ name: string;
9
+ url: string;
10
+ created_at: string;
11
+ updated_at: string;
12
+ column_values: Array<{
13
+ id: string;
14
+ type: string;
15
+ text: string;
16
+ value: string;
17
+ }>;
18
+ }>;
19
+ cursor: string | null;
20
+ };
21
+ }>;
22
+ }
23
+ export interface CreateItemResult {
24
+ create_item: {
25
+ id: string;
26
+ name: string;
27
+ url: string;
28
+ };
29
+ }
30
+ export interface UpdateColumnsResult {
31
+ change_multiple_column_values: {
32
+ id: string;
33
+ name: string;
34
+ url: string;
35
+ };
36
+ }
37
+ export declare function fetchItems(client: GraphQLClient, boardId: string, opts: {
38
+ limit: number;
39
+ includeColumns: boolean;
40
+ cursor?: string;
41
+ }): Promise<ItemsPageResult>;
42
+ export declare function createItem(client: GraphQLClient, boardId: string, opts: {
43
+ name: string;
44
+ groupId?: string;
45
+ columnValues?: string;
46
+ }): Promise<CreateItemResult>;
47
+ export declare function updateItemColumns(client: GraphQLClient, boardId: string, itemId: string, columnValuesJson: string): Promise<UpdateColumnsResult>;
48
+ export declare function registerItems(program: Command, clientFactory: () => GraphQLClient): void;