feat: add LAN mode config options to setup.mjs

This commit is contained in:
2026-04-10 21:17:19 +10:00
parent 4f4e1edf16
commit aa0adab784
+8
View File
@@ -36,6 +36,8 @@ const DEFAULT_MODEL = opt("default-model", "opus"); // opus | sonnet | haiku
const DRY_RUN = flag("dry-run"); const DRY_RUN = flag("dry-run");
const SKIP_START = flag("no-start"); const SKIP_START = flag("no-start");
const PROVIDER_NAME = opt("provider-name", "claude-local"); const PROVIDER_NAME = opt("provider-name", "claude-local");
const BIND_ADDRESS = opt("bind", "127.0.0.1");
const AUTH_MODE_CONFIG = opt("auth-mode", "none");
const MODEL_ID_MAP = { const MODEL_ID_MAP = {
opus: "claude-opus-4-6", opus: "claude-opus-4-6",
@@ -363,6 +365,10 @@ if (!DRY_RUN) {
<dict> <dict>
<key>CLAUDE_PROXY_PORT</key> <key>CLAUDE_PROXY_PORT</key>
<string>${PORT}</string> <string>${PORT}</string>
<key>CLAUDE_BIND</key>
<string>${BIND_ADDRESS}</string>
<key>CLAUDE_AUTH_MODE</key>
<string>${AUTH_MODE_CONFIG}</string>
</dict> </dict>
<key>RunAtLoad</key> <key>RunAtLoad</key>
<true/> <true/>
@@ -399,6 +405,8 @@ After=network.target
[Service] [Service]
ExecStart=${nodeBin} ${serverPath} ExecStart=${nodeBin} ${serverPath}
Environment=CLAUDE_PROXY_PORT=${PORT} Environment=CLAUDE_PROXY_PORT=${PORT}
Environment=CLAUDE_BIND=${BIND_ADDRESS}
Environment=CLAUDE_AUTH_MODE=${AUTH_MODE_CONFIG}
Restart=always Restart=always
RestartSec=5 RestartSec=5
StandardOutput=append:${logPath} StandardOutput=append:${logPath}