@orlan-maker/cli 0.1.0
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/.claude-plugin/marketplace.json +15 -0
- package/.claude-plugin/plugin.json +14 -0
- package/.mcp.json +9 -0
- package/LICENSE +21 -0
- package/README.md +179 -0
- package/bin/orlan +8 -0
- package/dist/agents.js +406 -0
- package/dist/browser.js +27 -0
- package/dist/commands.js +1465 -0
- package/dist/config.js +55 -0
- package/dist/http.js +156 -0
- package/dist/main.js +114 -0
- package/dist/mcp.js +113 -0
- package/dist/secrets.js +120 -0
- package/dist/skills.js +20 -0
- package/hooks/hooks.json +68 -0
- package/hooks/session-start +11 -0
- package/monitors/monitors.json +7 -0
- package/opencode/orlan.js +109 -0
- package/package.json +46 -0
- package/skills/orlan-review/SKILL.md +78 -0
- package/skills/orlan-versions/SKILL.md +29 -0
package/dist/browser.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
/**
|
|
3
|
+
* Opens a URL in the person's browser, without waiting for it. $BROWSER wins when it is set, as in
|
|
4
|
+
* other command line tools. Returns false when no browser could start: the command then prints the URL.
|
|
5
|
+
*/
|
|
6
|
+
export function openBrowser(url) {
|
|
7
|
+
const [command, args] = process.env.BROWSER
|
|
8
|
+
? [process.env.BROWSER, [url]]
|
|
9
|
+
: process.platform === "darwin"
|
|
10
|
+
? ["open", [url]]
|
|
11
|
+
: process.platform === "win32"
|
|
12
|
+
? ["cmd", ["/c", "start", '""', url.replaceAll("&", "^&")]]
|
|
13
|
+
: ["xdg-open", [url]];
|
|
14
|
+
return new Promise((resolve) => {
|
|
15
|
+
try {
|
|
16
|
+
const child = spawn(command, args, { detached: true, stdio: "ignore" });
|
|
17
|
+
child.on("error", () => resolve(false));
|
|
18
|
+
child.on("spawn", () => {
|
|
19
|
+
child.unref();
|
|
20
|
+
resolve(true);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
resolve(false);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|