From 0d670bf4461f86789a0eba915c6ff00d516f6780 Mon Sep 17 00:00:00 2001 From: Emilio Amaya Date: Wed, 28 Jan 2026 15:49:56 -0500 Subject: [PATCH] feat(paas): add real-time log streaming with --follow flag Add --follow (-f) flag to `npx atxp paas worker logs` command for continuous log streaming via client-side polling. Features: - Stream logs continuously with Ctrl+C to stop - Configurable polling interval via --interval flag (default: 2000ms) - Color-coded log output by level (error, warn, info, debug) - Deduplication to prevent duplicate log entries - Automatic retry logic (3 attempts with 5s delay) - Memory-bounded deduplication set (max 10k entries) - Works with existing filters (--level, --since) Usage: npx atxp paas worker logs my-api --follow npx atxp paas worker logs my-api -f --interval 500 npx atxp paas worker logs my-api --follow --level error Co-Authored-By: Claude Opus 4.5 --- packages/atxp/src/commands/paas/help.ts | 5 + packages/atxp/src/commands/paas/index.ts | 4 + packages/atxp/src/commands/paas/worker.ts | 137 ++++++++++++++++++++++ packages/atxp/src/index.ts | 4 + 4 files changed, 150 insertions(+) diff --git a/packages/atxp/src/commands/paas/help.ts b/packages/atxp/src/commands/paas/help.ts index dbb0b6f..a6d2da7 100644 --- a/packages/atxp/src/commands/paas/help.ts +++ b/packages/atxp/src/commands/paas/help.ts @@ -106,12 +106,17 @@ export const COMMAND_HELP: Record = { usage: 'atxp paas worker logs [options]', description: 'View logs for a deployed worker.', options: [ + { flag: '--follow, -f', description: 'Stream logs continuously (Ctrl+C to stop)' }, + { flag: '--interval ', description: 'Polling interval in milliseconds [default: 2000]' }, { flag: '--limit ', description: 'Number of log entries to show' }, { flag: '--level ', description: 'Filter by log level (error, warn, info, debug)' }, { flag: '--since