@anjanpoonacha/opencode 1.2.10
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/opencode +33 -0
- package/package.json +23 -0
package/bin/opencode
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawnSync } = require("child_process");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
|
|
6
|
+
const binaries = [
|
|
7
|
+
["darwin", "arm64", "@anjanpoonacha/opencode-darwin-arm64"],
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
const platform = process.platform;
|
|
11
|
+
const arch = process.arch;
|
|
12
|
+
|
|
13
|
+
let binaryPath;
|
|
14
|
+
for (const [os, cpu, pkg] of binaries) {
|
|
15
|
+
if (platform === os && arch === cpu) {
|
|
16
|
+
try {
|
|
17
|
+
const pkgPath = require.resolve(pkg + "/bin/opencode");
|
|
18
|
+
if (fs.existsSync(pkgPath)) {
|
|
19
|
+
binaryPath = pkgPath;
|
|
20
|
+
break;
|
|
21
|
+
}
|
|
22
|
+
} catch {}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (!binaryPath) {
|
|
27
|
+
console.error("No compatible binary found for your platform:", platform, arch);
|
|
28
|
+
console.error("This package currently only supports macOS ARM64.");
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const result = spawnSync(binaryPath, process.argv.slice(2), { stdio: "inherit" });
|
|
33
|
+
process.exit(result.status || 0);
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@anjanpoonacha/opencode",
|
|
3
|
+
"version": "1.2.10",
|
|
4
|
+
"description": "OpenCode fork with subagent chat fix - AI coding agent for the terminal",
|
|
5
|
+
"bin": {
|
|
6
|
+
"opencode": "./bin/opencode"
|
|
7
|
+
},
|
|
8
|
+
"optionalDependencies": {
|
|
9
|
+
"@anjanpoonacha/opencode-darwin-arm64": "1.2.10"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/anjanpoonacha/opencode"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"opencode",
|
|
18
|
+
"ai",
|
|
19
|
+
"cli",
|
|
20
|
+
"coding",
|
|
21
|
+
"assistant"
|
|
22
|
+
]
|
|
23
|
+
}
|