@jamesaphoenix/tx-cli 0.4.5 → 0.4.6
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/bin/tx +41 -0
- package/package.json +10 -7
package/bin/tx
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const { execFileSync } = require("child_process");
|
|
5
|
+
const { join } = require("path");
|
|
6
|
+
|
|
7
|
+
const PLATFORMS = {
|
|
8
|
+
"darwin-arm64": "@jamesaphoenix/tx-cli-darwin-arm64",
|
|
9
|
+
"darwin-x64": "@jamesaphoenix/tx-cli-darwin-x64",
|
|
10
|
+
"linux-x64": "@jamesaphoenix/tx-cli-linux-x64",
|
|
11
|
+
"linux-arm64": "@jamesaphoenix/tx-cli-linux-arm64",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const platformKey = `${process.platform}-${process.arch}`;
|
|
15
|
+
const pkg = PLATFORMS[platformKey];
|
|
16
|
+
|
|
17
|
+
if (!pkg) {
|
|
18
|
+
console.error(
|
|
19
|
+
`Error: Unsupported platform ${platformKey}.\n` +
|
|
20
|
+
`tx supports: ${Object.keys(PLATFORMS).join(", ")}`
|
|
21
|
+
);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
let binPath;
|
|
26
|
+
try {
|
|
27
|
+
binPath = join(require.resolve(`${pkg}/package.json`), "..", "tx");
|
|
28
|
+
} catch {
|
|
29
|
+
console.error(
|
|
30
|
+
`Error: Platform package ${pkg} is not installed.\n` +
|
|
31
|
+
`Try reinstalling: npm install -g @jamesaphoenix/tx-cli`
|
|
32
|
+
);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
try {
|
|
37
|
+
execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
|
|
38
|
+
} catch (e) {
|
|
39
|
+
if (e.status !== undefined) process.exit(e.status);
|
|
40
|
+
throw e;
|
|
41
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamesaphoenix/tx-cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "TX command line tool - task management for AI agents and humans",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cli.js",
|
|
7
7
|
"types": "./dist/cli.d.ts",
|
|
8
8
|
"bin": {
|
|
9
|
-
"tx": "./
|
|
9
|
+
"tx": "./bin/tx"
|
|
10
10
|
},
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
|
+
"bin",
|
|
18
19
|
"dist",
|
|
19
20
|
"!dist/tx",
|
|
20
21
|
"!dist/tx-*",
|
|
@@ -28,11 +29,7 @@
|
|
|
28
29
|
"scripts": {
|
|
29
30
|
"build": "tsc -b",
|
|
30
31
|
"build:binary": "bun build ./src/cli.ts --compile --outfile dist/tx --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external @node-llama-cpp/*",
|
|
31
|
-
"build:
|
|
32
|
-
"build:darwin-x64": "bun build ./src/cli.ts --compile --outfile dist/tx-darwin-x64 --target bun-darwin-x64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external @node-llama-cpp/*",
|
|
33
|
-
"build:linux-x64": "bun build ./src/cli.ts --compile --outfile dist/tx-linux-x64 --target bun-linux-x64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external @node-llama-cpp/*",
|
|
34
|
-
"build:linux-arm64": "bun build ./src/cli.ts --compile --outfile dist/tx-linux-arm64 --target bun-linux-arm64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external @node-llama-cpp/*",
|
|
35
|
-
"build:all": "bun run build:darwin-arm64 && bun run build:darwin-x64 && bun run build:linux-x64 && bun run build:linux-arm64",
|
|
32
|
+
"build:platforms": "bun build ./src/cli.ts --compile --outfile npm/darwin-arm64/tx --target bun-darwin-arm64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external '@node-llama-cpp/*' && bun build ./src/cli.ts --compile --outfile npm/darwin-x64/tx --target bun-darwin-x64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external '@node-llama-cpp/*' && bun build ./src/cli.ts --compile --outfile npm/linux-x64/tx --target bun-linux-x64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external '@node-llama-cpp/*' && bun build ./src/cli.ts --compile --outfile npm/linux-arm64/tx --target bun-linux-arm64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external '@node-llama-cpp/*'",
|
|
36
33
|
"typecheck": "tsc --noEmit",
|
|
37
34
|
"lint": "eslint src/",
|
|
38
35
|
"test": "bun vitest run --passWithNoTests"
|
|
@@ -42,6 +39,12 @@
|
|
|
42
39
|
"@jamesaphoenix/tx-types": "*",
|
|
43
40
|
"effect": "^3.19.15"
|
|
44
41
|
},
|
|
42
|
+
"optionalDependencies": {
|
|
43
|
+
"@jamesaphoenix/tx-cli-darwin-arm64": "0.4.5",
|
|
44
|
+
"@jamesaphoenix/tx-cli-darwin-x64": "0.4.5",
|
|
45
|
+
"@jamesaphoenix/tx-cli-linux-x64": "0.4.5",
|
|
46
|
+
"@jamesaphoenix/tx-cli-linux-arm64": "0.4.5"
|
|
47
|
+
},
|
|
45
48
|
"peerDependencies": {
|
|
46
49
|
"@modelcontextprotocol/sdk": "^1.25.3"
|
|
47
50
|
},
|