@itznexus/itznexus-cli 0.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 (71) hide show
  1. package/dist/commands/auth.d.ts +2 -0
  2. package/dist/commands/auth.js +119 -0
  3. package/dist/commands/auth.js.map +1 -0
  4. package/dist/commands/company.d.ts +2 -0
  5. package/dist/commands/company.js +193 -0
  6. package/dist/commands/company.js.map +1 -0
  7. package/dist/commands/contact.d.ts +2 -0
  8. package/dist/commands/contact.js +142 -0
  9. package/dist/commands/contact.js.map +1 -0
  10. package/dist/commands/conversation.d.ts +2 -0
  11. package/dist/commands/conversation.js +217 -0
  12. package/dist/commands/conversation.js.map +1 -0
  13. package/dist/commands/health.d.ts +2 -0
  14. package/dist/commands/health.js +27 -0
  15. package/dist/commands/health.js.map +1 -0
  16. package/dist/commands/interaction.d.ts +2 -0
  17. package/dist/commands/interaction.js +214 -0
  18. package/dist/commands/interaction.js.map +1 -0
  19. package/dist/commands/lead.d.ts +2 -0
  20. package/dist/commands/lead.js +299 -0
  21. package/dist/commands/lead.js.map +1 -0
  22. package/dist/commands/organization.d.ts +2 -0
  23. package/dist/commands/organization.js +211 -0
  24. package/dist/commands/organization.js.map +1 -0
  25. package/dist/commands/person.d.ts +2 -0
  26. package/dist/commands/person.js +268 -0
  27. package/dist/commands/person.js.map +1 -0
  28. package/dist/commands/pipeline.d.ts +2 -0
  29. package/dist/commands/pipeline.js +33 -0
  30. package/dist/commands/pipeline.js.map +1 -0
  31. package/dist/commands/project.d.ts +2 -0
  32. package/dist/commands/project.js +180 -0
  33. package/dist/commands/project.js.map +1 -0
  34. package/dist/commands/schema.d.ts +23 -0
  35. package/dist/commands/schema.js +48 -0
  36. package/dist/commands/schema.js.map +1 -0
  37. package/dist/commands/sprint.d.ts +2 -0
  38. package/dist/commands/sprint.js +190 -0
  39. package/dist/commands/sprint.js.map +1 -0
  40. package/dist/commands/task.d.ts +2 -0
  41. package/dist/commands/task.js +216 -0
  42. package/dist/commands/task.js.map +1 -0
  43. package/dist/commands/user.d.ts +2 -0
  44. package/dist/commands/user.js +58 -0
  45. package/dist/commands/user.js.map +1 -0
  46. package/dist/index.d.ts +2 -0
  47. package/dist/index.js +40 -0
  48. package/dist/index.js.map +1 -0
  49. package/dist/lib/api.d.ts +10 -0
  50. package/dist/lib/api.js +36 -0
  51. package/dist/lib/api.js.map +1 -0
  52. package/dist/lib/auto-update.d.ts +6 -0
  53. package/dist/lib/auto-update.js +96 -0
  54. package/dist/lib/auto-update.js.map +1 -0
  55. package/dist/lib/config.d.ts +7 -0
  56. package/dist/lib/config.js +28 -0
  57. package/dist/lib/config.js.map +1 -0
  58. package/dist/lib/format.d.ts +23 -0
  59. package/dist/lib/format.js +59 -0
  60. package/dist/lib/format.js.map +1 -0
  61. package/dist/skills/claude-code/itznexus-auth.md +61 -0
  62. package/dist/skills/claude-code/itznexus-company.md +143 -0
  63. package/dist/skills/claude-code/itznexus-contact.md +109 -0
  64. package/dist/skills/claude-code/itznexus-conversation.md +146 -0
  65. package/dist/skills/claude-code/itznexus-lead.md +146 -0
  66. package/dist/skills/claude-code/itznexus-project.md +115 -0
  67. package/dist/skills/claude-code/itznexus-sprint.md +126 -0
  68. package/dist/skills/claude-code/itznexus-task.md +159 -0
  69. package/dist/skills/claude-code/itznexus-user.md +66 -0
  70. package/dist/skills/openclaw-tools.json +1404 -0
  71. package/package.json +50 -0
@@ -0,0 +1,268 @@
1
+ import { Command } from "commander";
2
+ import chalk from "chalk";
3
+ import { api } from "../lib/api.js";
4
+ import { printList, printDetail, handleError } from "../lib/format.js";
5
+ // --- list ---
6
+ const listCommand = new Command("list")
7
+ .description("List all persons")
8
+ .option("--search <query>", "Search by name")
9
+ .option("--json", "Output as JSON")
10
+ .action(async (opts) => {
11
+ try {
12
+ const params = new URLSearchParams();
13
+ if (opts.search)
14
+ params.set("search", opts.search);
15
+ const qs = params.toString();
16
+ const data = await api.get(`/persons${qs ? `?${qs}` : ""}`);
17
+ printList(data, [
18
+ { key: "name", label: "Name", width: 25 },
19
+ { key: "notes", label: "Notes", width: 30 },
20
+ { key: "organizationCount", label: "Orgs", width: 8 },
21
+ { key: "createdAt", label: "Created", width: 24 },
22
+ ], opts);
23
+ }
24
+ catch (err) {
25
+ handleError(err);
26
+ }
27
+ });
28
+ // --- get ---
29
+ const getCommand = new Command("get")
30
+ .description("Get person details")
31
+ .argument("<id>", "Person ID")
32
+ .option("--json", "Output as JSON")
33
+ .action(async (id, opts) => {
34
+ try {
35
+ const data = await api.get(`/persons/${id}`);
36
+ if (opts.json) {
37
+ console.log(JSON.stringify(data, null, 2));
38
+ return;
39
+ }
40
+ console.log(chalk.bold(data.name));
41
+ printDetail(data, [
42
+ { key: "id", label: "ID" },
43
+ { key: "notes", label: "Notes" },
44
+ { key: "createdAt", label: "Created" },
45
+ { key: "updatedAt", label: "Updated" },
46
+ ], opts);
47
+ if (data.phones.length > 0) {
48
+ console.log(chalk.dim(`\n Phones (${data.phones.length}):`));
49
+ for (const p of data.phones) {
50
+ const label = p.label ? chalk.dim(` (${p.label})`) : "";
51
+ const primary = p.isPrimary ? chalk.cyan(" ★") : "";
52
+ console.log(` ${p.phone}${label}${primary}`);
53
+ }
54
+ }
55
+ if (data.emails.length > 0) {
56
+ console.log(chalk.dim(`\n Emails (${data.emails.length}):`));
57
+ for (const e of data.emails) {
58
+ const label = e.label ? chalk.dim(` (${e.label})`) : "";
59
+ const primary = e.isPrimary ? chalk.cyan(" ★") : "";
60
+ console.log(` ${e.email}${label}${primary}`);
61
+ }
62
+ }
63
+ if (data.organizations.length > 0) {
64
+ console.log(chalk.dim(`\n Organizations (${data.organizations.length}):`));
65
+ for (const o of data.organizations) {
66
+ const role = o.role ? chalk.dim(` (${o.role})`) : "";
67
+ console.log(` ${o.name}${role}`);
68
+ }
69
+ }
70
+ }
71
+ catch (err) {
72
+ handleError(err);
73
+ }
74
+ });
75
+ // --- create ---
76
+ const createCommand = new Command("create")
77
+ .description("Create a new person")
78
+ .requiredOption("--name <name>", "Person name")
79
+ .option("--notes <notes>", "Notes (markdown)")
80
+ .option("--json", "Output as JSON")
81
+ .action(async (opts) => {
82
+ try {
83
+ const data = await api.post("/persons", {
84
+ name: opts.name,
85
+ notes: opts.notes,
86
+ });
87
+ if (opts.json) {
88
+ console.log(JSON.stringify(data, null, 2));
89
+ }
90
+ else {
91
+ console.log(chalk.green("✓"), `Person created: ${chalk.bold(data.name)} (${data.id})`);
92
+ }
93
+ }
94
+ catch (err) {
95
+ handleError(err);
96
+ }
97
+ });
98
+ // --- update ---
99
+ const updateCommand = new Command("update")
100
+ .description("Update a person")
101
+ .argument("<id>", "Person ID")
102
+ .option("--name <name>", "Person name")
103
+ .option("--notes <notes>", "Notes (markdown)")
104
+ .option("--json", "Output as JSON")
105
+ .action(async (id, opts) => {
106
+ try {
107
+ const { json: _, ...fields } = opts;
108
+ void _;
109
+ const payload = Object.fromEntries(Object.entries(fields).filter(([, v]) => v !== undefined));
110
+ const data = await api.post(`/persons/${id}`, payload);
111
+ if (opts.json) {
112
+ console.log(JSON.stringify(data, null, 2));
113
+ }
114
+ else {
115
+ console.log(chalk.green("✓"), `Person updated: ${chalk.bold(data.name)}`);
116
+ }
117
+ }
118
+ catch (err) {
119
+ handleError(err);
120
+ }
121
+ });
122
+ // --- notes ---
123
+ const notesCommand = new Command("notes")
124
+ .description("Update person notes")
125
+ .argument("<id>", "Person ID")
126
+ .option("--notes <notes>", "Notes (markdown), omit to clear")
127
+ .option("--json", "Output as JSON")
128
+ .action(async (id, opts) => {
129
+ try {
130
+ const data = await api.post(`/persons/${id}/notes`, {
131
+ notes: opts.notes ?? null,
132
+ });
133
+ if (opts.json) {
134
+ console.log(JSON.stringify(data, null, 2));
135
+ }
136
+ else {
137
+ console.log(chalk.green("✓"), opts.notes ? "Notes updated" : "Notes cleared");
138
+ }
139
+ }
140
+ catch (err) {
141
+ handleError(err);
142
+ }
143
+ });
144
+ // --- delete ---
145
+ const deleteCommand = new Command("delete")
146
+ .description("Delete a person")
147
+ .argument("<id>", "Person ID")
148
+ .option("--json", "Output as JSON")
149
+ .action(async (id, opts) => {
150
+ try {
151
+ await api.delete(`/persons/${id}`);
152
+ if (opts.json) {
153
+ console.log(JSON.stringify({ deleted: true, id }));
154
+ }
155
+ else {
156
+ console.log(chalk.green("✓"), "Person deleted");
157
+ }
158
+ }
159
+ catch (err) {
160
+ handleError(err);
161
+ }
162
+ });
163
+ // --- add-phone ---
164
+ const addPhoneCommand = new Command("add-phone")
165
+ .description("Add a phone number to a person")
166
+ .argument("<id>", "Person ID")
167
+ .requiredOption("--phone <phone>", "Phone number")
168
+ .option("--label <label>", "Label (e.g. mobile, work)")
169
+ .option("--primary", "Set as primary phone")
170
+ .option("--json", "Output as JSON")
171
+ .action(async (id, opts) => {
172
+ try {
173
+ const data = await api.post(`/persons/${id}/phones`, {
174
+ phone: opts.phone,
175
+ label: opts.label,
176
+ isPrimary: opts.primary,
177
+ });
178
+ if (opts.json) {
179
+ console.log(JSON.stringify(data, null, 2));
180
+ }
181
+ else {
182
+ console.log(chalk.green("✓"), "Phone added");
183
+ }
184
+ }
185
+ catch (err) {
186
+ handleError(err);
187
+ }
188
+ });
189
+ // --- remove-phone ---
190
+ const removePhoneCommand = new Command("remove-phone")
191
+ .description("Remove a phone number from a person")
192
+ .argument("<id>", "Person ID")
193
+ .requiredOption("--phone-id <phoneId>", "Phone ID to remove")
194
+ .option("--json", "Output as JSON")
195
+ .action(async (id, opts) => {
196
+ try {
197
+ await api.delete(`/persons/${id}/phones/${opts.phoneId}`);
198
+ if (opts.json) {
199
+ console.log(JSON.stringify({ deleted: true }));
200
+ }
201
+ else {
202
+ console.log(chalk.green("✓"), "Phone removed");
203
+ }
204
+ }
205
+ catch (err) {
206
+ handleError(err);
207
+ }
208
+ });
209
+ // --- add-email ---
210
+ const addEmailCommand = new Command("add-email")
211
+ .description("Add an email address to a person")
212
+ .argument("<id>", "Person ID")
213
+ .requiredOption("--email <email>", "Email address")
214
+ .option("--label <label>", "Label (e.g. personal, work)")
215
+ .option("--primary", "Set as primary email")
216
+ .option("--json", "Output as JSON")
217
+ .action(async (id, opts) => {
218
+ try {
219
+ const data = await api.post(`/persons/${id}/emails`, {
220
+ email: opts.email,
221
+ label: opts.label,
222
+ isPrimary: opts.primary,
223
+ });
224
+ if (opts.json) {
225
+ console.log(JSON.stringify(data, null, 2));
226
+ }
227
+ else {
228
+ console.log(chalk.green("✓"), "Email added");
229
+ }
230
+ }
231
+ catch (err) {
232
+ handleError(err);
233
+ }
234
+ });
235
+ // --- remove-email ---
236
+ const removeEmailCommand = new Command("remove-email")
237
+ .description("Remove an email address from a person")
238
+ .argument("<id>", "Person ID")
239
+ .requiredOption("--email-id <emailId>", "Email ID to remove")
240
+ .option("--json", "Output as JSON")
241
+ .action(async (id, opts) => {
242
+ try {
243
+ await api.delete(`/persons/${id}/emails/${opts.emailId}`);
244
+ if (opts.json) {
245
+ console.log(JSON.stringify({ deleted: true }));
246
+ }
247
+ else {
248
+ console.log(chalk.green("✓"), "Email removed");
249
+ }
250
+ }
251
+ catch (err) {
252
+ handleError(err);
253
+ }
254
+ });
255
+ // --- parent ---
256
+ export const personCommand = new Command("person")
257
+ .description("Manage persons")
258
+ .addCommand(listCommand)
259
+ .addCommand(getCommand)
260
+ .addCommand(createCommand)
261
+ .addCommand(updateCommand)
262
+ .addCommand(notesCommand)
263
+ .addCommand(deleteCommand)
264
+ .addCommand(addPhoneCommand)
265
+ .addCommand(removePhoneCommand)
266
+ .addCommand(addEmailCommand)
267
+ .addCommand(removeEmailCommand);
268
+ //# sourceMappingURL=person.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"person.js","sourceRoot":"","sources":["../../src/commands/person.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAA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,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,WAAW,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,iBAAiB;AAEjB,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC/C,WAAW,CAAC,gBAAgB,CAAC;KAC7B,UAAU,CAAC,WAAW,CAAC;KACvB,UAAU,CAAC,UAAU,CAAC;KACtB,UAAU,CAAC,aAAa,CAAC;KACzB,UAAU,CAAC,aAAa,CAAC;KACzB,UAAU,CAAC,YAAY,CAAC;KACxB,UAAU,CAAC,aAAa,CAAC;KACzB,UAAU,CAAC,eAAe,CAAC;KAC3B,UAAU,CAAC,kBAAkB,CAAC;KAC9B,UAAU,CAAC,eAAe,CAAC;KAC3B,UAAU,CAAC,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare const pipelineCommand: Command;
@@ -0,0 +1,33 @@
1
+ import { Command } from "commander";
2
+ import { api } from "../lib/api.js";
3
+ import { handleError } from "../lib/format.js";
4
+ const listCommand = new Command("list")
5
+ .description("List all pipeline definitions")
6
+ .option("--domain <domain>", "Filter by domain (leads, tasks, sprints, projects)")
7
+ .option("--json", "Output as JSON")
8
+ .action(async (opts) => {
9
+ try {
10
+ const data = await api.get("/pipelines");
11
+ const filtered = opts.domain
12
+ ? data.filter((p) => p.domain === opts.domain)
13
+ : data;
14
+ if (opts.json) {
15
+ console.log(JSON.stringify(filtered, null, 2));
16
+ return;
17
+ }
18
+ for (const pipeline of filtered) {
19
+ console.log(`\n${pipeline.domain}/${pipeline.slug}:`);
20
+ for (const stage of pipeline.stages) {
21
+ const terminal = stage.terminal ? " (terminal)" : "";
22
+ console.log(` ${stage.slug.padEnd(22)} ${stage.name}${terminal}`);
23
+ }
24
+ }
25
+ }
26
+ catch (err) {
27
+ handleError(err);
28
+ }
29
+ });
30
+ export const pipelineCommand = new Command("pipeline")
31
+ .description("View pipeline definitions")
32
+ .addCommand(listCommand);
33
+ //# sourceMappingURL=pipeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../src/commands/pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAe/C,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KACpC,WAAW,CAAC,+BAA+B,CAAC;KAC5C,MAAM,CAAC,mBAAmB,EAAE,oDAAoD,CAAC;KACjF,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC;KAClC,MAAM,CAAC,KAAK,EAAE,IAAyC,EAAE,EAAE;IAC1D,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,GAAG,CAAa,YAAY,CAAC,CAAC;QACrD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM;YAC1B,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,CAAC;YAC9C,CAAC,CAAC,IAAI,CAAC;QAET,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC/C,OAAO;QACT,CAAC;QAED,KAAK,MAAM,QAAQ,IAAI,QAAQ,EAAE,CAAC;YAChC,OAAO,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,IAAI,GAAG,CAAC,CAAC;YACtD,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;gBACpC,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;gBACrD,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC,IAAI,GAAG,QAAQ,EAAE,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,WAAW,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;KACnD,WAAW,CAAC,2BAA2B,CAAC;KACxC,UAAU,CAAC,WAAW,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare const projectCommand: Command;
@@ -0,0 +1,180 @@
1
+ import { Command } from "commander";
2
+ import chalk from "chalk";
3
+ import { api } from "../lib/api.js";
4
+ import { printList, printDetail, handleError } from "../lib/format.js";
5
+ // --- list ---
6
+ const listCommand = new Command("list")
7
+ .description("List all projects")
8
+ .option("--status <status>", "Filter by status (draft, active, paused, completed, cancelled)")
9
+ .option("--search <query>", "Search by name")
10
+ .option("--json", "Output as JSON")
11
+ .action(async (opts) => {
12
+ try {
13
+ const params = new URLSearchParams();
14
+ if (opts.status)
15
+ params.set("status", opts.status);
16
+ if (opts.search)
17
+ params.set("search", opts.search);
18
+ const qs = params.toString();
19
+ const data = await api.get(`/projects${qs ? `?${qs}` : ""}`);
20
+ printList(data, [
21
+ { key: "name", label: "Name", width: 30 },
22
+ { key: "status", label: "Status", width: 12 },
23
+ { key: "sprintCount", label: "Sprints", width: 10 },
24
+ { key: "createdAt", label: "Created", width: 24 },
25
+ ], opts);
26
+ }
27
+ catch (err) {
28
+ handleError(err);
29
+ }
30
+ });
31
+ // --- get ---
32
+ const getCommand = new Command("get")
33
+ .description("Get project details")
34
+ .argument("<id>", "Project ID")
35
+ .option("--json", "Output as JSON")
36
+ .action(async (id, opts) => {
37
+ try {
38
+ const data = await api.get(`/projects/${id}`);
39
+ if (opts.json) {
40
+ console.log(JSON.stringify(data, null, 2));
41
+ return;
42
+ }
43
+ console.log(chalk.bold(data.name));
44
+ printDetail(data, [
45
+ { key: "id", label: "ID" },
46
+ { key: "status", label: "Status" },
47
+ { key: "description", label: "Description" },
48
+ { key: "notes", label: "Notes" },
49
+ { key: "createdAt", label: "Created" },
50
+ { key: "updatedAt", label: "Updated" },
51
+ ], opts);
52
+ if (data.backlogTaskCount > 0) {
53
+ console.log(chalk.dim(`\n Backlog: ${data.backlogTaskCount} task(s)`));
54
+ }
55
+ if (data.sprints.length > 0) {
56
+ console.log(chalk.dim(`\n Sprints (${data.sprints.length}):`));
57
+ for (const s of data.sprints) {
58
+ console.log(` ${s.name} ${chalk.dim(s.status)} ${chalk.dim(`${s.taskCount} tasks`)}`);
59
+ }
60
+ }
61
+ }
62
+ catch (err) {
63
+ handleError(err);
64
+ }
65
+ });
66
+ // --- create ---
67
+ const createCommand = new Command("create")
68
+ .description("Create a new project")
69
+ .requiredOption("--name <name>", "Project name")
70
+ .option("--description <text>", "Project description")
71
+ .option("--notes <text>", "Project notes")
72
+ .option("--status <status>", "Status (draft, active, paused, completed, cancelled)", "draft")
73
+ .option("--organization <organizationId>", "Organization ID")
74
+ .option("--json", "Output as JSON")
75
+ .action(async (opts) => {
76
+ try {
77
+ const data = await api.post("/projects", {
78
+ name: opts.name,
79
+ description: opts.description,
80
+ notes: opts.notes,
81
+ status: opts.status,
82
+ organizationId: opts.organization,
83
+ });
84
+ if (opts.json) {
85
+ console.log(JSON.stringify(data, null, 2));
86
+ }
87
+ else {
88
+ console.log(chalk.green("\u2713"), `Project created: ${chalk.bold(data.name)} (${data.id})`);
89
+ }
90
+ }
91
+ catch (err) {
92
+ handleError(err);
93
+ }
94
+ });
95
+ // --- update ---
96
+ const updateCommand = new Command("update")
97
+ .description("Update a project")
98
+ .argument("<id>", "Project ID")
99
+ .option("--name <name>", "Project name")
100
+ .option("--description <text>", "Description")
101
+ .option("--notes <text>", "Notes")
102
+ .option("--status <status>", "Status")
103
+ .option("--organization <organizationId>", "Organization ID")
104
+ .option("--json", "Output as JSON")
105
+ .action(async (id, opts) => {
106
+ try {
107
+ const payload = {};
108
+ if (opts.name !== undefined)
109
+ payload.name = opts.name;
110
+ if (opts.description !== undefined)
111
+ payload.description = opts.description;
112
+ if (opts.notes !== undefined)
113
+ payload.notes = opts.notes;
114
+ if (opts.status !== undefined)
115
+ payload.status = opts.status;
116
+ if (opts.organization !== undefined)
117
+ payload.organizationId = opts.organization;
118
+ const data = await api.post(`/projects/${id}`, payload);
119
+ if (opts.json) {
120
+ console.log(JSON.stringify(data, null, 2));
121
+ }
122
+ else {
123
+ console.log(chalk.green("\u2713"), `Project updated: ${chalk.bold(data.name)}`);
124
+ }
125
+ }
126
+ catch (err) {
127
+ handleError(err);
128
+ }
129
+ });
130
+ // --- notes ---
131
+ const notesCommand = new Command("notes")
132
+ .description("Update project notes")
133
+ .argument("<id>", "Project ID")
134
+ .argument("<notes>", "Notes (empty string to clear)")
135
+ .option("--json", "Output as JSON")
136
+ .action(async (id, notes, opts) => {
137
+ try {
138
+ const data = await api.post(`/projects/${id}`, {
139
+ notes: notes === "" ? null : notes,
140
+ });
141
+ if (opts.json) {
142
+ console.log(JSON.stringify(data, null, 2));
143
+ }
144
+ else {
145
+ console.log(chalk.green("\u2713"), "Project notes updated");
146
+ }
147
+ }
148
+ catch (err) {
149
+ handleError(err);
150
+ }
151
+ });
152
+ // --- delete ---
153
+ const deleteCommand = new Command("delete")
154
+ .description("Delete a project")
155
+ .argument("<id>", "Project ID")
156
+ .option("--json", "Output as JSON")
157
+ .action(async (id, opts) => {
158
+ try {
159
+ await api.delete(`/projects/${id}`);
160
+ if (opts.json) {
161
+ console.log(JSON.stringify({ deleted: true, id }));
162
+ }
163
+ else {
164
+ console.log(chalk.green("\u2713"), "Project deleted");
165
+ }
166
+ }
167
+ catch (err) {
168
+ handleError(err);
169
+ }
170
+ });
171
+ // --- parent ---
172
+ export const projectCommand = new Command("project")
173
+ .description("Manage projects")
174
+ .addCommand(listCommand)
175
+ .addCommand(getCommand)
176
+ .addCommand(createCommand)
177
+ .addCommand(updateCommand)
178
+ .addCommand(notesCommand)
179
+ .addCommand(deleteCommand);
180
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/commands/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAoBvE,eAAe;AAEf,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KACpC,WAAW,CAAC,mBAAmB,CAAC;KAChC,MAAM,CACL,mBAAmB,EACnB,gEAAgE,CACjE;KACA,MAAM,CAAC,kBAAkB,EAAE,gBAAgB,CAAC;KAC5C,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC;KAClC,MAAM,CACL,KAAK,EAAE,IAA0D,EAAE,EAAE;IACnE,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,MAAM;YAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,IAAI,CAAC,MAAM;YAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAEnD,MAAM,EAAE,GAAG,MAAM,CAAC,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CAAC,kBAAkB,CAAC;KAC/B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;KAC9B,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC;KAClC,MAAM,CAAC,KAAK,EAAE,EAAU,EAAE,IAAwB,EAAE,EAAE;IACrD,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;QAEpC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QACrD,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,WAAW,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,iBAAiB;AAEjB,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC;KACjD,WAAW,CAAC,iBAAiB,CAAC;KAC9B,UAAU,CAAC,WAAW,CAAC;KACvB,UAAU,CAAC,UAAU,CAAC;KACtB,UAAU,CAAC,aAAa,CAAC;KACzB,UAAU,CAAC,aAAa,CAAC;KACzB,UAAU,CAAC,YAAY,CAAC;KACxB,UAAU,CAAC,aAAa,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { Command } from "commander";
2
+ type OptionSchema = {
3
+ flags: string;
4
+ description: string;
5
+ required: boolean;
6
+ defaultValue?: unknown;
7
+ };
8
+ type ArgumentSchema = {
9
+ name: string;
10
+ description: string;
11
+ required: boolean;
12
+ };
13
+ type CommandSchema = {
14
+ name: string;
15
+ fullName: string;
16
+ description: string;
17
+ arguments: ArgumentSchema[];
18
+ options: OptionSchema[];
19
+ subcommands?: CommandSchema[];
20
+ };
21
+ export declare function buildSchema(program: Command): CommandSchema;
22
+ export declare const schemaCommand: Command;
23
+ export {};
@@ -0,0 +1,48 @@
1
+ import { Command } from "commander";
2
+ function extractCommand(cmd, parentName) {
3
+ const name = cmd.name();
4
+ const fullName = parentName ? `${parentName} ${name}` : name;
5
+ const args = cmd.registeredArguments.map((arg) => ({
6
+ name: arg.name(),
7
+ description: arg.description,
8
+ required: arg.required,
9
+ }));
10
+ const options = cmd.options
11
+ .filter((opt) => opt.long !== "--version" && opt.long !== "--help")
12
+ .map((opt) => ({
13
+ flags: opt.flags,
14
+ description: opt.description,
15
+ // opt.mandatory = true when added via .requiredOption()
16
+ // opt.required = true when the flag needs a value (<value> syntax)
17
+ required: opt.mandatory,
18
+ ...(opt.defaultValue !== undefined
19
+ ? { defaultValue: opt.defaultValue }
20
+ : {}),
21
+ }));
22
+ const subcommands = cmd.commands
23
+ .filter((sub) => !sub.name().startsWith("__"))
24
+ .map((sub) => extractCommand(sub, fullName));
25
+ return {
26
+ name,
27
+ fullName,
28
+ description: cmd.description(),
29
+ arguments: args,
30
+ options,
31
+ ...(subcommands.length > 0 ? { subcommands } : {}),
32
+ };
33
+ }
34
+ export function buildSchema(program) {
35
+ return extractCommand(program, "");
36
+ }
37
+ export const schemaCommand = new Command("__schema")
38
+ .description("Output the full command tree as JSON (for skill generation)")
39
+ .action(() => {
40
+ // Walk up to root program
41
+ let root = schemaCommand;
42
+ while (root.parent) {
43
+ root = root.parent;
44
+ }
45
+ const schema = buildSchema(root);
46
+ console.log(JSON.stringify(schema, null, 2));
47
+ });
48
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/commands/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwBpC,SAAS,cAAc,CAAC,GAAY,EAAE,UAAkB;IACtD,MAAM,IAAI,GAAG,GAAG,C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