thingd-cli 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AASA,OAAO,EAOL,MAAM,EACN,KAAK,YAAY,EAClB,MAAM,QAAQ,CAAC;AAKhB,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAEjD,KAAK,YAAY,GAAG;IAClB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC7B,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,UAAU,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AA0DF,wBAAsB,MAAM,CAC1B,IAAI,WAAwB,EAC5B,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,MAAM,CAAC,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CAAC;CAChB,CAAC;AA2DF,wBAAsB,MAAM,CAC1B,IAAI,WAAwB,EAC5B,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,MAAM,CAAC,CAiEjB;AA8jBD,wBAAsB,MAAM,CAC1B,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GACtC,OAAO,CAAC,IAAI,CAAC,CAcf;AA4BD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,GAAG,iBAAiB,CA2BxE"}
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ Admin and operator CLI for thingd.
17
17
  Usage:
18
18
  thingd status [--url <url>]
19
19
  thingd tools --url <url>
20
- thingd install [--raw] [--claude] [--cursor]
20
+ thingd install [--raw] [--claude] [--cursor] [--antigravity]
21
21
  thingd doctor
22
22
  thingd mcp [--path <path>] [--driver <driver>]
23
23
  thingd mcp-http [--path <path>] [--driver <driver>] [--host <host>] [--port <port>] [--auth-token <tok>] [--allow-unauthenticated]
@@ -62,6 +62,7 @@ const BOOLEAN_FLAGS = new Set([
62
62
  "raw",
63
63
  "claude",
64
64
  "cursor",
65
+ "antigravity",
65
66
  "smoke",
66
67
  ]);
67
68
  export async function runCli(args = process.argv.slice(2), options = {}) {
@@ -816,5 +817,14 @@ if (process.argv[1]) {
816
817
  }
817
818
  }
818
819
  if (isMain) {
819
- process.exitCode = await runCli();
820
+ runCli()
821
+ .then((code) => {
822
+ if (code !== 0) {
823
+ process.exit(code);
824
+ }
825
+ })
826
+ .catch((error) => {
827
+ console.error(error);
828
+ process.exit(1);
829
+ });
820
830
  }
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAwB7C,wBAAsB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAyInE"}
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAwB7C,wBAAsB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA4JnE"}
package/dist/install.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { existsSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
2
2
  import { homedir, platform } from "node:os";
3
- import { join, resolve } from "node:path";
3
+ import { dirname, join, resolve } from "node:path";
4
4
  import { createInterface } from "node:readline/promises";
5
5
  import pc from "picocolors";
6
6
  import { defaultThingdDbPath, ensureThingdDir } from "./paths.js";
@@ -25,6 +25,7 @@ export async function runInstall(context) {
25
25
  const isRaw = context.parsed.booleans.has("raw") || context.parsed.flags.has("raw");
26
26
  const isClaude = context.parsed.booleans.has("claude") || context.parsed.flags.has("claude");
27
27
  const isCursor = context.parsed.booleans.has("cursor") || context.parsed.flags.has("cursor");
28
+ const isAntigravity = context.parsed.booleans.has("antigravity") || context.parsed.flags.has("antigravity");
28
29
  if (!isRaw) {
29
30
  context.stderr.write(`\n${pc.bold("thingd install")}\n\n`);
30
31
  }
@@ -32,9 +33,9 @@ export async function runInstall(context) {
32
33
  let dbPath = dbPathDefault;
33
34
  let driver = driverDefault;
34
35
  if (isRaw) {
35
- choice = "4";
36
+ choice = "5";
36
37
  }
37
- else if (isClaude && isCursor) {
38
+ else if (isClaude && isCursor && isAntigravity) {
38
39
  choice = "1";
39
40
  }
40
41
  else if (isClaude) {
@@ -43,14 +44,18 @@ export async function runInstall(context) {
43
44
  else if (isCursor) {
44
45
  choice = "3";
45
46
  }
47
+ else if (isAntigravity) {
48
+ choice = "4";
49
+ }
46
50
  else if (process.stdin.isTTY) {
47
51
  // 1. Where to install
48
52
  context.stderr.write(`${pc.bold("Where would you like to install the MCP configuration?")}\n`);
49
- context.stderr.write(` [1] Claude Desktop & Cursor (Default)\n`);
53
+ context.stderr.write(` [1] Claude Desktop, Cursor & Antigravity (Default)\n`);
50
54
  context.stderr.write(` [2] Claude Desktop only\n`);
51
55
  context.stderr.write(` [3] Cursor only\n`);
52
- context.stderr.write(` [4] Print raw JSON configuration only\n\n`);
53
- const answerInstall = await askQuestion(`Select option [1-4] (default 1): `);
56
+ context.stderr.write(` [4] Antigravity only\n`);
57
+ context.stderr.write(` [5] Print raw JSON configuration only\n\n`);
58
+ const answerInstall = await askQuestion(`Select option [1-5] (default 1): `);
54
59
  choice = answerInstall.trim() || "1";
55
60
  context.stderr.write("\n");
56
61
  // 2. Database Path
@@ -97,7 +102,8 @@ export async function runInstall(context) {
97
102
  }
98
103
  const showClaude = choice === "1" || choice === "2";
99
104
  const showCursor = choice === "1" || choice === "3";
100
- const showRaw = choice === "4";
105
+ const showAntigravity = choice === "1" || choice === "4";
106
+ const showRaw = choice === "5";
101
107
  if (showClaude) {
102
108
  const claudeResult = updateClaudeDesktopConfig(config);
103
109
  if (claudeResult.updated) {
@@ -109,6 +115,17 @@ export async function runInstall(context) {
109
115
  context.stderr.write(` ${pc.yellow("⊘")} Skipped: ${claudeResult.reason}\n\n`);
110
116
  }
111
117
  }
118
+ if (showAntigravity) {
119
+ const antigravityResult = updateAntigravityConfig(config);
120
+ if (antigravityResult.updated) {
121
+ context.stderr.write(` ${pc.bold("Antigravity IDE:")}\n`);
122
+ context.stderr.write(` ${pc.green("✓")} Updated ${pc.cyan(antigravityResult.path)}\n\n`);
123
+ }
124
+ else if (antigravityResult.skipped) {
125
+ context.stderr.write(` ${pc.bold("Antigravity IDE:")}\n`);
126
+ context.stderr.write(` ${pc.yellow("⊘")} Skipped: ${antigravityResult.reason}\n\n`);
127
+ }
128
+ }
112
129
  if (showCursor) {
113
130
  context.stderr.write(` ${pc.bold("Cursor:")}\n`);
114
131
  context.stderr.write(` Paste this into Cursor Settings → Features → MCP → Add New MCP Server:\n\n`);
@@ -128,7 +145,7 @@ export async function runInstall(context) {
128
145
  context.stdout.write(`${JSON.stringify(fullConfig, null, 2)}\n`);
129
146
  }
130
147
  if (choice === "1") {
131
- context.stderr.write(`\n Restart Claude Desktop to activate. Cursor activates immediately after pasting.\n\n`);
148
+ context.stderr.write(`\n Restart Claude Desktop or Antigravity to activate. Cursor activates immediately.\n\n`);
132
149
  }
133
150
  else if (choice === "2") {
134
151
  context.stderr.write(`\n Restart Claude Desktop to activate.\n\n`);
@@ -136,6 +153,9 @@ export async function runInstall(context) {
136
153
  else if (choice === "3") {
137
154
  context.stderr.write(`\n Cursor activates immediately after pasting.\n\n`);
138
155
  }
156
+ else if (choice === "4") {
157
+ context.stderr.write(`\n Restart Antigravity IDE to activate.\n\n`);
158
+ }
139
159
  }
140
160
  function findGlobalBinPath() {
141
161
  try {
@@ -220,3 +240,33 @@ function updateClaudeDesktopConfig(config) {
220
240
  };
221
241
  }
222
242
  }
243
+ function updateAntigravityConfig(config) {
244
+ const configPath = join(homedir(), ".gemini", "antigravity-ide", "mcp_config.json");
245
+ const dir = dirname(configPath);
246
+ if (!existsSync(dir)) {
247
+ return {
248
+ skipped: true,
249
+ reason: `Antigravity directory not found at ${dir}.`,
250
+ };
251
+ }
252
+ try {
253
+ let existing = {};
254
+ if (existsSync(configPath)) {
255
+ const raw = readFileSync(configPath, "utf-8").trim();
256
+ if (raw) {
257
+ existing = JSON.parse(raw);
258
+ }
259
+ }
260
+ const mcpServers = (existing.mcpServers ?? {});
261
+ mcpServers.thingd = config;
262
+ existing.mcpServers = mcpServers;
263
+ writeFileSync(configPath, `${JSON.stringify(existing, null, 2)}\n`, "utf-8");
264
+ return { updated: true, path: configPath };
265
+ }
266
+ catch (error) {
267
+ return {
268
+ skipped: true,
269
+ reason: `Failed to update config: ${error instanceof Error ? error.message : String(error)}`,
270
+ };
271
+ }
272
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thingd-cli",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Command-line interface, Interactive TUI Dashboard, and MCP server for thingd.",
5
5
  "type": "module",
6
6
  "author": "Sayan Mohsin",
@@ -33,7 +33,7 @@
33
33
  "cli-table3": "^0.6.5",
34
34
  "picocolors": "^1.1.1",
35
35
  "zod": "^4.4.3",
36
- "thingd": "0.12.0"
36
+ "thingd": "0.13.0"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=20"