From 8421ef7b4aa8a4fa1ae7d875a17fee3f6e5b681b Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 20 Dec 2025 19:35:21 +0000 Subject: [PATCH] feat(gateway): add gateway-daemon command --- src/cli/gateway-cli.ts | 126 +++++++++++++++++++++++++++++++++++++++++ src/cli/program.ts | 8 ++- 2 files changed, 132 insertions(+), 2 deletions(-) diff --git a/src/cli/gateway-cli.ts b/src/cli/gateway-cli.ts index 4d56a5e84..13f6bc19b 100644 --- a/src/cli/gateway-cli.ts +++ b/src/cli/gateway-cli.ts @@ -45,6 +45,132 @@ const callGatewayCli = async ( }); export function registerGatewayCli(program: Command) { + program + .command("gateway-daemon") + .description("Run the WebSocket Gateway as a long-lived daemon") + .option("--port ", "Port for the gateway WebSocket", "18789") + .option( + "--bind ", + 'Bind mode ("loopback"|"tailnet"|"lan"|"auto"). Defaults to config gateway.bind (or loopback).', + ) + .option( + "--token ", + "Shared token required in connect.params.auth.token (default: CLAWDIS_GATEWAY_TOKEN env if set)", + ) + .option("--verbose", "Verbose logging to stdout/stderr", false) + .option( + "--ws-log