@ork-sh/cli 0.1.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/bin/index.js +41 -0
- package/bin/ork-darwin-amd64 +0 -0
- package/bin/ork-darwin-arm64 +0 -0
- package/package.json +26 -0
package/bin/index.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawnSync } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const os = require('os');
|
|
6
|
+
|
|
7
|
+
let binaryName;
|
|
8
|
+
const platform = os.platform();
|
|
9
|
+
const arch = os.arch();
|
|
10
|
+
|
|
11
|
+
if (platform === 'darwin') {
|
|
12
|
+
if (arch === 'arm64') {
|
|
13
|
+
binaryName = 'ork-darwin-arm64';
|
|
14
|
+
} else {
|
|
15
|
+
binaryName = 'ork-darwin-amd64';
|
|
16
|
+
}
|
|
17
|
+
} else {
|
|
18
|
+
process.stderr.write('Error: Currently, @ork-sh/cli only supports macOS.\n');
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const binaryPath = path.join(__dirname, binaryName);
|
|
23
|
+
|
|
24
|
+
const args = process.argv.slice(2);
|
|
25
|
+
|
|
26
|
+
const result = spawnSync(binaryPath, args, {
|
|
27
|
+
stdio: 'inherit',
|
|
28
|
+
windowsHide: true,
|
|
29
|
+
shell: false
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
if (result.error) {
|
|
33
|
+
if (result.error.code === 'ENOENT') {
|
|
34
|
+
process.stderr.write(`Error: Binary not found at ${binaryPath}\n`);
|
|
35
|
+
} else {
|
|
36
|
+
process.stderr.write(`Execution failed: ${result.error.message}\n`);
|
|
37
|
+
}
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
process.exit(result.status ?? 0);
|
|
Binary file
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ork-sh/cli",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Orchestrate your AI",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"bin"
|
|
8
|
+
],
|
|
9
|
+
"bin": {
|
|
10
|
+
"ork": "bin/index.js"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"postinstall": "chmod +x bin/index.js bin/ork-darwin-amd64 bin/ork-darwin-arm64"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"ai",
|
|
17
|
+
"agents",
|
|
18
|
+
"cli",
|
|
19
|
+
"orchestration"
|
|
20
|
+
],
|
|
21
|
+
"author": "",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=14.0.0"
|
|
25
|
+
}
|
|
26
|
+
}
|