openagent-cli 1.0.9 → 1.0.11
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/openagent.js +18 -0
- package/package.json +4 -2
- package/bin/openagent.js +0 -12
package/openagent.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawn } = require("child_process")
|
|
3
|
+
const path = require("path")
|
|
4
|
+
|
|
5
|
+
const scriptDir = __dirname
|
|
6
|
+
const exe = path.join(scriptDir, "bin", "open-agent.exe")
|
|
7
|
+
|
|
8
|
+
const args = process.argv.slice(2)
|
|
9
|
+
if (args.includes("--version") || args.includes("-v")) {
|
|
10
|
+
console.log(require("./package.json").version)
|
|
11
|
+
process.exit(0)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const child = spawn(exe, args, { stdio: "inherit" })
|
|
15
|
+
child.on("exit", (code) => process.exit(code ?? 1))
|
|
16
|
+
|
|
17
|
+
process.on("SIGINT", () => child.kill("SIGINT"))
|
|
18
|
+
process.on("SIGTERM", () => child.kill("SIGTERM"))
|
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openagent-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "OpenAgent - AI coding agent. Run from any directory.",
|
|
5
|
-
"bin": {
|
|
5
|
+
"bin": {
|
|
6
|
+
"openagent": "openagent.js"
|
|
7
|
+
},
|
|
6
8
|
"license": "MIT"
|
|
7
9
|
}
|
package/bin/openagent.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const { spawn } = require("child_process")
|
|
3
|
-
const path = require("path")
|
|
4
|
-
|
|
5
|
-
const binDir = __dirname
|
|
6
|
-
const exe = path.join(binDir, "open-agent.exe")
|
|
7
|
-
|
|
8
|
-
const child = spawn(exe, process.argv.slice(2), { stdio: "inherit" })
|
|
9
|
-
child.on("exit", (code) => process.exit(code ?? 1))
|
|
10
|
-
|
|
11
|
-
process.on("SIGINT", () => child.kill("SIGINT"))
|
|
12
|
-
process.on("SIGTERM", () => child.kill("SIGTERM"))
|