@tightknitai/tightknit 0.1.0-alpha.1 → 0.1.0-alpha.2

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.
package/README.md CHANGED
@@ -95,7 +95,7 @@ Add to your Claude Code MCP config (`.claude/settings.json` or `~/.claude.json`)
95
95
  "mcpServers": {
96
96
  "tightknit": {
97
97
  "command": "npx",
98
- "args": ["-p", "@tightknitai/tightknit@alpha", "tightknit-mcp"],
98
+ "args": ["@tightknitai/tightknit@alpha", "mcp"],
99
99
  "env": {
100
100
  "TIGHTKNIT_API_KEY": "sk_your_key_here"
101
101
  }
@@ -111,7 +111,7 @@ Or if installed locally in the monorepo:
111
111
  "mcpServers": {
112
112
  "tightknit": {
113
113
  "command": "npx",
114
- "args": ["tsx", "packages/tightknit-cli/src/mcp/server.ts"],
114
+ "args": ["tsx", "packages/tightknit-cli/bin/tightknit.ts", "mcp"],
115
115
  "cwd": "/path/to/colombo",
116
116
  "env": {
117
117
  "TIGHTKNIT_API_KEY": "sk_your_key_here"
package/bin/tightknit.js CHANGED
@@ -1,14 +1,22 @@
1
1
  #!/usr/bin/env node
2
- import { execFileSync } from "node:child_process";
2
+ import { spawn, execFileSync } from "node:child_process";
3
3
  import { fileURLToPath } from "node:url";
4
4
  import { dirname, join } from "node:path";
5
5
 
6
6
  const __dirname = dirname(fileURLToPath(import.meta.url));
7
7
  const tsx = join(__dirname, "..", "node_modules", ".bin", "tsx");
8
- const script = join(__dirname, "tightknit.ts");
9
8
 
10
- try {
11
- execFileSync(tsx, [script, ...process.argv.slice(2)], { stdio: "inherit" });
12
- } catch (err) {
13
- process.exit(err.status ?? 1);
9
+ // If first arg is "mcp", run the MCP server (needs spawn for bidirectional stdio)
10
+ if (process.argv[2] === "mcp") {
11
+ const script = join(__dirname, "..", "src", "mcp", "server.ts");
12
+ const child = spawn(tsx, [script], { stdio: "inherit" });
13
+ child.on("exit", (code) => process.exit(code ?? 0));
14
+ } else {
15
+ // Run the CLI
16
+ const script = join(__dirname, "tightknit.ts");
17
+ try {
18
+ execFileSync(tsx, [script, ...process.argv.slice(2)], { stdio: "inherit" });
19
+ } catch (err) {
20
+ process.exit(err.status ?? 1);
21
+ }
14
22
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@tightknitai/tightknit",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.2",
4
4
  "description": "CLI and MCP server for the Tightknit API",
5
- "license": "UNLICENSED",
5
+ "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "engines": {
8
8
  "node": ">=18.0.0"