@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,96 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import os from "node:os";
4
+ import { execSync } from "node:child_process";
5
+ import { fileURLToPath } from "node:url";
6
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
+ const PKG_ROOT = path.resolve(__dirname, "..", "..");
8
+ const CACHE_DIR = path.join(os.homedir(), ".itznexus");
9
+ const CACHE_FILE = path.join(CACHE_DIR, "last-update-check");
10
+ const CHECK_INTERVAL_MS = 60 * 60 * 1000; // 1 hour
11
+ const PKG_NAME = "@itznexus/itznexus-cli";
12
+ /**
13
+ * Running from source via npm link — .git exists in the package root.
14
+ * In this case, skip auto-update entirely.
15
+ */
16
+ function isDevMode() {
17
+ try {
18
+ fs.statSync(path.join(PKG_ROOT, ".git"));
19
+ return true;
20
+ }
21
+ catch {
22
+ return false;
23
+ }
24
+ }
25
+ function getInstalledVersion() {
26
+ const pkgPath = path.join(PKG_ROOT, "package.json");
27
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
28
+ return pkg.version;
29
+ }
30
+ function getLastCheckTime() {
31
+ try {
32
+ const raw = fs.readFileSync(CACHE_FILE, "utf-8").trim();
33
+ return parseInt(raw, 10) || 0;
34
+ }
35
+ catch {
36
+ return 0;
37
+ }
38
+ }
39
+ function saveCheckTime() {
40
+ if (!fs.existsSync(CACHE_DIR)) {
41
+ fs.mkdirSync(CACHE_DIR, { recursive: true });
42
+ }
43
+ fs.writeFileSync(CACHE_FILE, String(Date.now()));
44
+ }
45
+ function getLatestVersion() {
46
+ try {
47
+ const output = execSync(`npm view ${PKG_NAME} version`, {
48
+ encoding: "utf-8",
49
+ timeout: 10_000,
50
+ stdio: ["pipe", "pipe", "pipe"],
51
+ });
52
+ return output.trim();
53
+ }
54
+ catch {
55
+ return null;
56
+ }
57
+ }
58
+ function performUpdate() {
59
+ try {
60
+ execSync(`npm install -g ${PKG_NAME}@latest`, {
61
+ timeout: 60_000,
62
+ stdio: ["pipe", "pipe", "pipe"],
63
+ });
64
+ return true;
65
+ }
66
+ catch {
67
+ return false;
68
+ }
69
+ }
70
+ /**
71
+ * Check for updates and auto-install if a newer version is available.
72
+ * Skips entirely in dev mode (npm link) or if checked recently.
73
+ * Runs silently — never blocks or errors the main command.
74
+ */
75
+ export function checkForUpdates() {
76
+ try {
77
+ if (isDevMode())
78
+ return;
79
+ const lastCheck = getLastCheckTime();
80
+ if (Date.now() - lastCheck < CHECK_INTERVAL_MS)
81
+ return;
82
+ saveCheckTime();
83
+ const installed = getInstalledVersion();
84
+ const latest = getLatestVersion();
85
+ if (!latest || latest === installed)
86
+ return;
87
+ const updated = performUpdate();
88
+ if (updated) {
89
+ console.error(`[itznexus] Updated ${installed} → ${latest}`);
90
+ }
91
+ }
92
+ catch {
93
+ // Never let update logic break the CLI
94
+ }
95
+ }
96
+ //# sourceMappingURL=auto-update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-update.js","sourceRoot":"","sources":["../../src/lib/auto-update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/D,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAErD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC;AACvD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;AAC7D,MAAM,iBAAiB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,SAAS;AAEnD,MAAM,QAAQ,GAAG,wBAAwB,CAAC;AAE1C;;;GAGG;AACH,SAAS,SAAS;IAChB,IAAI,CAAC;QACH,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;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SAAS,EAAE;YAC5C,OAAO,EAAE,MAAM;YACf,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;SAChC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe;IAC7B,IAAI,CAAC;QACH,IAAI,SAAS,EAAE;YAAE,OAAO;QAExB,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,GAAG,iBAAiB;YAAE,OAAO;QAEvD,aAAa,EAAE,CAAC;QAEhB,MAAM,SAAS,GAAG,mBAAmB,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,gBAAgB,EAAE,CAAC;QAClC,IAAI,CAAC,MAAM,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO;QAE5C,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;QAChC,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,CAAC,sBAAsB,SAAS,MAAM,MAAM,EAAE,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,uCAAuC;IACzC,CAAC;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ type Config = {
2
+ apiUrl: string;
3
+ apiKey?: string;
4
+ };
5
+ export declare function loadConfig(): Config;
6
+ export declare function saveConfig(config: Partial<Config>): void;
7
+ export {};
@@ -0,0 +1,28 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import os from "node:os";
4
+ const CONFIG_DIR = path.join(os.homedir(), ".itznexus");
5
+ const CONFIG_FILE = path.join(CONFIG_DIR, "config.json");
6
+ function defaultConfig() {
7
+ return {
8
+ apiUrl: process.env.ITZNEXUS_API_URL ?? "http://localhost:4100",
9
+ };
10
+ }
11
+ export function loadConfig() {
12
+ const defaults = defaultConfig();
13
+ if (!fs.existsSync(CONFIG_FILE)) {
14
+ return defaults;
15
+ }
16
+ const raw = fs.readFileSync(CONFIG_FILE, "utf-8");
17
+ const stored = JSON.parse(raw);
18
+ return { ...defaults, ...stored };
19
+ }
20
+ export function saveConfig(config) {
21
+ const current = loadConfig();
22
+ const merged = { ...current, ...config };
23
+ if (!fs.existsSync(CONFIG_DIR)) {
24
+ fs.mkdirSync(CONFIG_DIR, { recursive: true });
25
+ }
26
+ fs.writeFileSync(CONFIG_FILE, JSON.stringify(merged, null, 2) + "\n");
27
+ }
28
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC;AACxD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AAOzD,SAAS,aAAa;IACpB,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,uBAAuB;KAChE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,MAAM,QAAQ,GAAG,aAAa,EAAE,CAAC;IAEjC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAChC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAoB,CAAC;IAElD,OAAO,EAAE,GAAG,QAAQ,EAAE,GAAG,MAAM,EAAE,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,MAAuB;IAChD,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC;IAEzC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/B,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,EAAE,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AACxE,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Print a list of records as a table or JSON.
3
+ */
4
+ export declare function printList(records: Record<string, unknown>[], columns: {
5
+ key: string;
6
+ label: string;
7
+ width?: number;
8
+ }[], opts: {
9
+ json?: boolean;
10
+ }): void;
11
+ /**
12
+ * Print a single record as key/value pairs or JSON.
13
+ */
14
+ export declare function printDetail(record: Record<string, unknown>, fields: {
15
+ key: string;
16
+ label: string;
17
+ }[], opts: {
18
+ json?: boolean;
19
+ }): void;
20
+ /**
21
+ * Handle API or network errors consistently.
22
+ */
23
+ export declare function handleError(err: unknown): never;
@@ -0,0 +1,59 @@
1
+ import chalk from "chalk";
2
+ import { ApiError } from "./api.js";
3
+ /**
4
+ * Print a list of records as a table or JSON.
5
+ */
6
+ export function printList(records, columns, opts) {
7
+ if (opts.json) {
8
+ console.log(JSON.stringify(records, null, 2));
9
+ return;
10
+ }
11
+ if (records.length === 0) {
12
+ console.log(chalk.dim("No results."));
13
+ return;
14
+ }
15
+ // Header
16
+ const header = columns.map((c) => c.label.padEnd(c.width ?? 20)).join(" ");
17
+ console.log(chalk.dim(header));
18
+ console.log(chalk.dim("─".repeat(header.length)));
19
+ // Rows
20
+ for (const record of records) {
21
+ const row = columns
22
+ .map((c) => {
23
+ const val = record[c.key];
24
+ const str = val == null ? "-" : String(val);
25
+ return str.padEnd(c.width ?? 20);
26
+ })
27
+ .join(" ");
28
+ console.log(row);
29
+ }
30
+ console.log(chalk.dim(`\n${records.length} result${records.length !== 1 ? "s" : ""}`));
31
+ }
32
+ /**
33
+ * Print a single record as key/value pairs or JSON.
34
+ */
35
+ export function printDetail(record, fields, opts) {
36
+ if (opts.json) {
37
+ console.log(JSON.stringify(record, null, 2));
38
+ return;
39
+ }
40
+ const maxLabel = Math.max(...fields.map((f) => f.label.length));
41
+ for (const field of fields) {
42
+ const val = record[field.key];
43
+ const str = val == null ? chalk.dim("-") : String(val);
44
+ console.log(` ${field.label.padEnd(maxLabel + 1)} ${str}`);
45
+ }
46
+ }
47
+ /**
48
+ * Handle API or network errors consistently.
49
+ */
50
+ export function handleError(err) {
51
+ if (err instanceof ApiError) {
52
+ console.error(chalk.red("✗"), `API error: ${err.message}`);
53
+ }
54
+ else {
55
+ console.error(chalk.red("✗"), "Cannot reach API. Is it running?");
56
+ }
57
+ process.exit(1);
58
+ }
59
+ //# sourceMappingURL=format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/lib/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC;;GAEG;AACH,MAAM,UAAU,SAAS,CACvB,OAAkC,EAClC,OAAyD,EACzD,IAAwB;IAExB,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC9C,OAAO;IACT,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,aAA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
8
+ Manage authentication. All commands return JSON when called with `--json`.
9
+
10
+ ## Response Shape
11
+
12
+ All commands output JSON to stdout:
13
+ - **Success:** the created/updated/fetched object(s) directly
14
+ - **Error:** process exits with code 1 and prints an error message to stderr
15
+
16
+ ## When to Use
17
+
18
+ Use this skill when you need to create, read, update, or delete **auth** records in ITzNexus. Always use the `--json` flag so output is machine-parseable.
19
+
20
+ ## Commands
21
+
22
+ ### login
23
+
24
+ Configure API key authentication.
25
+
26
+ ```bash
27
+ itznexus auth login [--api-url] [--api-key] --json
28
+ ```
29
+
30
+ | Parameter | Required | Description |
31
+ |-----------|----------|-------------|
32
+ | `--api-url` | no | API base URL |
33
+ | `--api-key` | no | API key (sk-itznx_...) |
34
+
35
+ ### status
36
+
37
+ Show current authentication status.
38
+
39
+ ```bash
40
+ itznexus auth status --json
41
+ ```
42
+
43
+ ### logout
44
+
45
+ Remove stored API key.
46
+
47
+ ```bash
48
+ itznexus auth logout --json
49
+ ```
50
+
51
+ ## Example Flows
52
+
53
+ **Check authentication:**
54
+ ```bash
55
+ itznexus auth status --json
56
+ ```
57
+ ## Important
58
+
59
+ - Always pass `--json` for machine-readable output.
60
+ - IDs are UUIDs. Get them from `list` or `create` responses.
61
+ - The CLI authenticates via API key stored in `~/.itznexus/config.json`. Run `itznexus auth status --json` to verify.
@@ -0,0 +1,143 @@
1
+ ---
2
+ name: itznexus-company
3
+ description: "Manage companies via the ITzNexus CLI"
4
+ ---
5
+
6
+ # itznexus company
7
+
8
+ Manage companies. All commands return JSON when called with `--json`.
9
+
10
+ ## Response Shape
11
+
12
+ All commands output JSON to stdout:
13
+ - **Success:** the created/updated/fetched object(s) directly
14
+ - **Error:** process exits with code 1 and prints an error message to stderr
15
+
16
+ ## When to Use
17
+
18
+ Use this skill when you need to create, read, update, or delete **company** records in ITzNexus. Always use the `--json` flag so output is machine-parseable.
19
+
20
+ ## Commands
21
+
22
+ ### list
23
+
24
+ List all companies.
25
+
26
+ ```bash
27
+ itznexus company list [--status] [--search] --json
28
+ ```
29
+
30
+ | Parameter | Required | Description |
31
+ |-----------|----------|-------------|
32
+ | `--status` | no | Filter by status (active, inactive, churned) |
33
+ | `--search` | no | Search by name |
34
+
35
+ ### get
36
+
37
+ Get company details.
38
+
39
+ ```bash
40
+ itznexus company get <id> --json
41
+ ```
42
+
43
+ | Parameter | Required | Description |
44
+ |-----------|----------|-------------|
45
+ | `id` | yes | Company ID |
46
+
47
+ ### create
48
+
49
+ Create a new company.
50
+
51
+ ```bash
52
+ itznexus company create --name <name> [--website] [--referral] [--status] [--notes] --json
53
+ ```
54
+
55
+ | Parameter | Required | Description |
56
+ |-----------|----------|-------------|
57
+ | `--name` | yes | Company name |
58
+ | `--website` | no | Website URL |
59
+ | `--referral` | no | Referral source |
60
+ | `--status` | no | Status (active, inactive, churned) (default: `"active"`) |
61
+ | `--notes` | no | Notes (markdown) |
62
+
63
+ ### update
64
+
65
+ Update a company.
66
+
67
+ ```bash
68
+ itznexus company update <id> [--name] [--website] [--referral] [--status] [--notes] --json
69
+ ```
70
+
71
+ | Parameter | Required | Description |
72
+ |-----------|----------|-------------|
73
+ | `id` | yes | Company ID |
74
+ | `--name` | no | Company name |
75
+ | `--website` | no | Website URL |
76
+ | `--referral` | no | Referral source |
77
+ | `--status` | no | Status (active, inactive, churned) |
78
+ | `--notes` | no | Notes (markdown) |
79
+
80
+ ### delete
81
+
82
+ Delete a company.
83
+
84
+ ```bash
85
+ itznexus company delete <id> --json
86
+ ```
87
+
88
+ | Parameter | Required | Description |
89
+ |-----------|----------|-------------|
90
+ | `id` | yes | Company ID |
91
+
92
+ ### link-contact
93
+
94
+ Link a contact to this company.
95
+
96
+ ```bash
97
+ itznexus company link-contact <companyId> --contact <contactId> [--role] --json
98
+ ```
99
+
100
+ | Parameter | Required | Description |
101
+ |-----------|----------|-------------|
102
+ | `companyId` | yes | Company ID |
103
+ | `--contact` | yes | Contact ID to link |
104
+ | `--role` | no | Role at this company (e.g. CTO) |
105
+
106
+ ### unlink-contact
107
+
108
+ Unlink a contact from this company.
109
+
110
+ ```bash
111
+ itznexus company unlink-contact <companyId> --contact <contactId> --json
112
+ ```
113
+
114
+ | Parameter | Required | Description |
115
+ |-----------|----------|-------------|
116
+ | `companyId` | yes | Company ID |
117
+ | `--contact` | yes | Contact ID to unlink |
118
+
119
+ ## Example Flows
120
+
121
+ **Create a company and link a contact:**
122
+ ```bash
123
+ # Create the company
124
+ itznexus company create --name "Acme Corp" --website "https://acme.com" --json
125
+
126
+ # Create or find a contact, then link them
127
+ itznexus company link-contact <companyId> --contact <contactId> --role "CTO" --json
128
+ ```
129
+
130
+ **Find a company by name:**
131
+ ```bash
132
+ itznexus company list --search "Acme" --json
133
+ ```
134
+
135
+ **Change a company status to churned:**
136
+ ```bash
137
+ itznexus company update <companyId> --status churned --json
138
+ ```
139
+ ## Important
140
+
141
+ - Always pass `--json` for machine-readable output.
142
+ - IDs are UUIDs. Get them from `list` or `create` responses.
143
+ - The CLI authenticates via API key stored in `~/.itznexus/config.json`. Run `itznexus auth status --json` to verify.
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: itznexus-contact
3
+ description: "Manage contacts via the ITzNexus CLI"
4
+ ---
5
+
6
+ # itznexus contact
7
+
8
+ Manage contacts. All commands return JSON when called with `--json`.
9
+
10
+ ## Response Shape
11
+
12
+ All commands output JSON to stdout:
13
+ - **Success:** the created/updated/fetched object(s) directly
14
+ - **Error:** process exits with code 1 and prints an error message to stderr
15
+
16
+ ## When to Use
17
+
18
+ Use this skill when you need to create, read, update, or delete **contact** records in ITzNexus. Always use the `--json` flag so output is machine-parseable.
19
+
20
+ ## Commands
21
+
22
+ ### list
23
+
24
+ List all contacts.
25
+
26
+ ```bash
27
+ itznexus contact list [--search] --json
28
+ ```
29
+
30
+ | Parameter | Required | Description |
31
+ |-----------|----------|-------------|
32
+ | `--search` | no | Search by name |
33
+
34
+ ### get
35
+
36
+ Get contact details.
37
+
38
+ ```bash
39
+ itznexus contact get <id> --json
40
+ ```
41
+
42
+ | Parameter | Required | Description |
43
+ |-----------|----------|-------------|
44
+ | `id` | yes | Contact ID |
45
+
46
+ ### create
47
+
48
+ Create a new contact.
49
+
50
+ ```bash
51
+ itznexus contact create --name <name> [--email] [--phone] [--notes] --json
52
+ ```
53
+
54
+ | Parameter | Required | Description |
55
+ |-----------|----------|-------------|
56
+ | `--name` | yes | Contact name |
57
+ | `--email` | no | Email address |
58
+ | `--phone` | no | Phone number |
59
+ | `--notes` | no | Notes (markdown) |
60
+
61
+ ### update
62
+
63
+ Update a contact.
64
+
65
+ ```bash
66
+ itznexus contact update <id> [--name] [--email] [--phone] [--notes] --json
67
+ ```
68
+
69
+ | Parameter | Required | Description |
70
+ |-----------|----------|-------------|
71
+ | `id` | yes | Contact ID |
72
+ | `--name` | no | Contact name |
73
+ | `--email` | no | Email address |
74
+ | `--phone` | no | Phone number |
75
+ | `--notes` | no | Notes (markdown) |
76
+
77
+ ### delete
78
+
79
+ Delete a contact.
80
+
81
+ ```bash
82
+ itznexus contact delete <id> --json
83
+ ```
84
+
85
+ | Parameter | Required | Description |
86
+ |-----------|----------|-------------|
87
+ | `id` | yes | Contact ID |
88
+
89
+ ## Example Flows
90
+
91
+ **Create a contact:**
92
+ ```bash
93
+ itznexus contact create --name "Jane Smith" --email "jane@example.com" --json
94
+ ```
95
+
96
+ **Find contacts by name:**
97
+ ```bash
98
+ itznexus contact list --search "Jane" --json
99
+ ```
100
+
101
+ **Get full details including linked companies:**
102
+ ```bash
103
+ itznexus contact get <contactId> --json
104
+ ```
105
+ ## Important
106
+
107
+ - Always pass `--json` for machine-readable output.
108
+ - IDs are UUIDs. Get them from `list` or `create` responses.
109
+ - The CLI authenticates via API key stored in `~/.itznexus/config.json`. Run `itznexus auth status --json` to verify.
@@ -0,0 +1,146 @@
1
+ ---
2
+ name: itznexus-conversation
3
+ description: "Manage conversations via the ITzNexus CLI"
4
+ ---
5
+
6
+ # itznexus conversation
7
+
8
+ Manage conversations. All commands return JSON when called with `--json`.
9
+
10
+ ## Response Shape
11
+
12
+ All commands output JSON to stdout:
13
+ - **Success:** the created/updated/fetched object(s) directly
14
+ - **Error:** process exits with code 1 and prints an error message to stderr
15
+
16
+ ## When to Use
17
+
18
+ Use this skill when you need to create, read, update, or delete **conversation** records in ITzNexus. Always use the `--json` flag so output is machine-parseable.
19
+
20
+ ## Commands
21
+
22
+ ### list
23
+
24
+ List conversations.
25
+
26
+ ```bash
27
+ itznexus conversation list [--contact] [--lead] [--project] [--channel] [--status] [--search] --json
28
+ ```
29
+
30
+ | Parameter | Required | Description |
31
+ |-----------|----------|-------------|
32
+ | `--contact` | no | Filter by contact |
33
+ | `--lead` | no | Filter by lead |
34
+ | `--project` | no | Filter by project |
35
+ | `--channel` | no | Filter by channel (upwork, whatsapp, email, slack) |
36
+ | `--status` | no | Filter by status (active, archived) |
37
+ | `--search` | no | Search by subject |
38
+
39
+ ### get
40
+
41
+ Get conversation details with messages.
42
+
43
+ ```bash
44
+ itznexus conversation get <id> --json
45
+ ```
46
+
47
+ | Parameter | Required | Description |
48
+ |-----------|----------|-------------|
49
+ | `id` | yes | Conversation ID |
50
+
51
+ ### create
52
+
53
+ Create a new conversation.
54
+
55
+ ```bash
56
+ itznexus conversation create --contact <contactId> --channel <channel> [--subject] [--lead] [--project] --json
57
+ ```
58
+
59
+ | Parameter | Required | Description |
60
+ |-----------|----------|-------------|
61
+ | `--contact` | yes | Contact ID |
62
+ | `--channel` | yes | Channel (upwork, whatsapp, email, slack) |
63
+ | `--subject` | no | Subject |
64
+ | `--lead` | no | Lead ID |
65
+ | `--project` | no | Project ID |
66
+
67
+ ### update
68
+
69
+ Update a conversation.
70
+
71
+ ```bash
72
+ itznexus conversation update <id> [--subject] [--status] [--channel] [--lead] [--project] --json
73
+ ```
74
+
75
+ | Parameter | Required | Description |
76
+ |-----------|----------|-------------|
77
+ | `id` | yes | Conversation ID |
78
+ | `--subject` | no | Subject |
79
+ | `--status` | no | Status (active, archived) |
80
+ | `--channel` | no | Channel |
81
+ | `--lead` | no | Lead ID |
82
+ | `--project` | no | Project ID |
83
+
84
+ ### message
85
+
86
+ Add a message to a conversation.
87
+
88
+ ```bash
89
+ itznexus conversation message <conversationId> --body <text> [--direction] [--sender] --json
90
+ ```
91
+
92
+ | Parameter | Required | Description |
93
+ |-----------|----------|-------------|
94
+ | `conversationId` | yes | Conversation ID |
95
+ | `--body` | yes | Message body |
96
+ | `--direction` | no | Direction (inbound, outbound) (default: `"outbound"`) |
97
+ | `--sender` | no | Sender name (for inbound) |
98
+
99
+ ### delete
100
+
101
+ Delete a conversation.
102
+
103
+ ```bash
104
+ itznexus conversation delete <id> --json
105
+ ```
106
+
107
+ | Parameter | Required | Description |
108
+ |-----------|----------|-------------|
109
+ | `id` | yes | Conversation ID |
110
+
111
+ ## Example Flows
112
+
113
+ **Start a conversation with a contact:**
114
+ ```bash
115
+ itznexus conversation create --contact <contactId> --channel upwork --subject "Project proposal" --json
116
+ ```
117
+
118
+ **Log an outbound message:**
119
+ ```bash
120
+ itznexus conversation message <conversationId> --body "Hi, following up on the proposal" --json
121
+ ```
122
+
123
+ **Log an inbound message:**
124
+ ```bash
125
+ itznexus conversation message <conversationId> --body "Looks great, let's proceed" --direction inbound --sender "John" --json
126
+ ```
127
+
128
+ **Link a conversation to a lead:**
129
+ ```bash
130
+ itznexus conversation update <conversationId> --lead <leadId> --json
131
+ ```
132
+
133
+ **List conversations by channel:**
134
+ ```bash
135
+ itznexus conversation list --channel whatsapp --json
136
+ ```
137
+
138
+ **Archive a conversation:**
139
+ ```bash
140
+ itznexus conversation update <conversationId> --status archived --json
141
+ ```
142
+ ## Important
143
+
144
+ - Always pass `--json` for machine-readable output.
145
+ - IDs are UUIDs. Get them from `list` or `create` responses.
146
+ - The CLI authenticates via API key stored in `~/.itznexus/config.json`. Run `itznexus auth status --json` to verify.