figmanage 1.2.8 → 1.2.9

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 (2) hide show
  1. package/dist/index.js +14 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -23,12 +23,22 @@ else {
23
23
  .description('Figma workspace management CLI')
24
24
  .version(JSON.parse((await import('node:fs')).readFileSync(new URL('../package.json', import.meta.url), 'utf-8')).version);
25
25
  registerCliCommands(program);
26
- // No subcommand given -- show help
26
+ // No subcommand given: if stdin is piped (MCP client), start MCP server.
27
+ // Otherwise show help.
27
28
  if (process.argv.length <= 2) {
28
- program.outputHelp();
29
- process.exit(0);
29
+ if (!process.stdin.isTTY) {
30
+ const { startMcpServer } = await import('./mcp.js');
31
+ await startMcpServer();
32
+ // Don't exit -- stdio transport keeps the process alive via stdin listener.
33
+ }
34
+ else {
35
+ program.outputHelp();
36
+ process.exit(0);
37
+ }
38
+ }
39
+ else {
40
+ await program.parseAsync(process.argv);
30
41
  }
31
- await program.parseAsync(process.argv);
32
42
  }
33
43
  export {};
34
44
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "figmanage",
3
3
  "mcpName": "io.github.dannykeane/figmanage",
4
- "version": "1.2.8",
4
+ "version": "1.2.9",
5
5
  "description": "MCP server for managing your Figma workspace from the terminal.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",