From 654fc2d2131b02e69f15c158bdc388d8713aa864 Mon Sep 17 00:00:00 2001 From: Charles Packer Date: Wed, 4 Mar 2026 15:44:53 -0800 Subject: [PATCH] rename: `letta remote` -> `letta server` with `remote` as alias (#1265) Co-authored-by: Letta Code --- src/cli/App.tsx | 9 +++++++-- src/cli/commands/listen.ts | 17 +++++++++-------- src/cli/subcommands/listen.tsx | 10 +++++----- src/cli/subcommands/router.ts | 3 ++- src/websocket/listen-log.ts | 2 +- src/websocket/listen-register.ts | 2 +- 6 files changed, 25 insertions(+), 18 deletions(-) diff --git a/src/cli/App.tsx b/src/cli/App.tsx index 986c795..51295b3 100644 --- a/src/cli/App.tsx +++ b/src/cli/App.tsx @@ -7209,8 +7209,13 @@ export default function App({ return { submitted: true }; } - // Special handling for /listen command - start listener mode - if (trimmed === "/remote" || trimmed.startsWith("/remote ")) { + // Special handling for /server command (alias: /remote) + if ( + trimmed === "/server" || + trimmed.startsWith("/server ") || + trimmed === "/remote" || + trimmed.startsWith("/remote ") + ) { // Tokenize with quote support: --name "my laptop" const parts = Array.from( trimmed.matchAll( diff --git a/src/cli/commands/listen.ts b/src/cli/commands/listen.ts index 7c9bc74..18be4fd 100644 --- a/src/cli/commands/listen.ts +++ b/src/cli/commands/listen.ts @@ -1,6 +1,6 @@ /** - * Listen mode - Register letta-code as a listener to receive messages from Letta Cloud - * Usage: letta listen --name "george" + * Server mode - Register letta-code as a listener to receive messages from Letta Cloud + * Usage: letta server --name "george" */ import { hostname } from "node:os"; @@ -135,17 +135,18 @@ export async function handleListen( ctx.buffersRef, ctx.refreshDerived, msg, - "Usage: /remote [--env-name ]\n" + - " /remote off\n\n" + - "Register this letta-code instance to receive messages from Letta Cloud.\n\n" + + "Usage: /server [--env-name ]\n" + + " /server off\n\n" + + "Register this letta-code instance to receive messages from Letta Cloud.\n" + + "Alias: /remote\n\n" + "Options:\n" + " --env-name Friendly name for this environment (uses hostname if not provided)\n" + " off Stop the active listener connection\n" + " -h, --help Show this help message\n\n" + "Examples:\n" + - " /remote # Start listener with hostname\n" + - ' /remote --env-name "work-laptop" # Start with custom name\n' + - " /remote off # Stop listening\n\n" + + " /server # Start listener with hostname\n" + + ' /server --env-name "work-laptop" # Start with custom name\n' + + " /server off # Stop listening\n\n" + "Once connected, this instance will listen for incoming messages from cloud agents.\n" + "Messages will be executed locally using your letta-code environment.", true, diff --git a/src/cli/subcommands/listen.tsx b/src/cli/subcommands/listen.tsx index 08e208a..c389795 100644 --- a/src/cli/subcommands/listen.tsx +++ b/src/cli/subcommands/listen.tsx @@ -1,5 +1,5 @@ /** - * CLI subcommand: letta listen --name \"george\" + * CLI subcommand: letta server --name \"george\" * Register letta-code as a listener to receive messages from Letta Cloud */ @@ -63,7 +63,7 @@ export async function runListenSubcommand(argv: string[]): Promise { // Show help if (values.help) { - console.log("Usage: letta remote [--env-name ] [--debug]\n"); + console.log("Usage: letta server [--env-name ] [--debug]\n"); console.log( "Register this letta-code instance to receive messages from Letta Cloud.\n", ); @@ -77,10 +77,10 @@ export async function runListenSubcommand(argv: string[]): Promise { console.log(" -h, --help Show this help message\n"); console.log("Examples:"); console.log( - " letta remote # Uses hostname as default", + " letta server # Uses hostname as default", ); - console.log(' letta remote --env-name "work-laptop"'); - console.log(" letta remote --debug # Log all WS events\n"); + console.log(' letta server --env-name "work-laptop"'); + console.log(" letta server --debug # Log all WS events\n"); console.log( "Once connected, this instance will listen for incoming messages from cloud agents.", ); diff --git a/src/cli/subcommands/router.ts b/src/cli/subcommands/router.ts index d497bf0..9993f4d 100644 --- a/src/cli/subcommands/router.ts +++ b/src/cli/subcommands/router.ts @@ -21,7 +21,8 @@ export async function runSubcommand(argv: string[]): Promise { return runMessagesSubcommand(rest); case "blocks": return runBlocksSubcommand(rest); - case "remote": + case "server": + case "remote": // alias return runListenSubcommand(rest); case "connect": return runConnectSubcommand(rest); diff --git a/src/websocket/listen-log.ts b/src/websocket/listen-log.ts index d86998e..4eea88e 100644 --- a/src/websocket/listen-log.ts +++ b/src/websocket/listen-log.ts @@ -1,5 +1,5 @@ /** - * Always-on file logger for letta remote sessions. + * Always-on file logger for letta server sessions. * Writes to ~/.letta/logs/remote/{timestamp}.log regardless of --debug mode. * Debug mode additionally prints to console; this file always captures the log. */ diff --git a/src/websocket/listen-register.ts b/src/websocket/listen-register.ts index e997514..3e435f5 100644 --- a/src/websocket/listen-register.ts +++ b/src/websocket/listen-register.ts @@ -1,5 +1,5 @@ /** - * Shared registration helper for letta remote / /remote command. + * Shared registration helper for letta server / /server command. * Owns the HTTP request contract and error handling; callers own UX strings and logging. */ import { getVersion } from "../version.ts";