@emqo/claudebridge 0.1.3 → 0.1.4
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/dist/cli.js +4 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -29,13 +29,14 @@ function removePid() { try {
|
|
|
29
29
|
catch { } }
|
|
30
30
|
const args = process.argv.slice(2);
|
|
31
31
|
if (args.includes("--help") || args.includes("-h")) {
|
|
32
|
-
console.log("Usage: claudebridge <start|stop|status|reload|init> [--config path] [--
|
|
32
|
+
console.log("Usage: claudebridge <start|stop|status|reload|init> [--config path] [--foreground|-f]");
|
|
33
33
|
process.exit(0);
|
|
34
34
|
}
|
|
35
35
|
const cmd = args.find(a => !a.startsWith("-")) || "start";
|
|
36
36
|
const cfgIdx = args.indexOf("--config");
|
|
37
37
|
const cfgPath = cfgIdx !== -1 ? args[cfgIdx + 1] : undefined;
|
|
38
38
|
const daemon = args.includes("--daemon") || args.includes("-d");
|
|
39
|
+
const foreground = args.includes("--foreground") || args.includes("-f");
|
|
39
40
|
const DEFAULT_CFG = join(DIR, "config.yaml");
|
|
40
41
|
switch (cmd) {
|
|
41
42
|
case "start": {
|
|
@@ -46,7 +47,7 @@ switch (cmd) {
|
|
|
46
47
|
}
|
|
47
48
|
const resolvedCfg = cfgPath || DEFAULT_CFG;
|
|
48
49
|
const childArgs = [ENTRY, "--config", resolvedCfg];
|
|
49
|
-
if (
|
|
50
|
+
if (!foreground) {
|
|
50
51
|
ensureDir();
|
|
51
52
|
const { openSync } = await import("fs");
|
|
52
53
|
const logFd = openSync(LOG_FILE, "a");
|
|
@@ -114,6 +115,6 @@ switch (cmd) {
|
|
|
114
115
|
break;
|
|
115
116
|
}
|
|
116
117
|
default:
|
|
117
|
-
console.log("Usage: claudebridge <start|stop|status|reload|init> [--config path] [--
|
|
118
|
+
console.log("Usage: claudebridge <start|stop|status|reload|init> [--config path] [--foreground|-f]");
|
|
118
119
|
process.exit(1);
|
|
119
120
|
}
|