CATALYST-1718: Add catalyst logs command to the CLI#2921
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bundle Size ReportComparing against baseline from No bundle size changes detected. |
Unlighthouse Performance Comparison — VercelComparing PR preview deployment Unlighthouse scores vs production Unlighthouse scores. Summary ScoreAggregate score across all categories as reported by Unlighthouse.
Category Scores
Core Web Vitals
|
044dd5a to
7aa9ce6
Compare
| const lines = raw.split('\n'); | ||
| const dataLines: string[] = []; | ||
|
|
||
| lines.forEach((line) => { |
There was a problem hiding this comment.
🍹 do we want to map instead of forEach + side effect?
There was a problem hiding this comment.
Yes, definitely. Dang Claude, be more functional! 😆
7aa9ce6 to
f778fef
Compare
There was a problem hiding this comment.
Looks good to me! Some minor finishing touches.
Can you update packages/catalyst/src/cli/index.spec.ts to make sure the new command is accounted for, should be pretty quick.
Are we doing CLAUDE.md or AGENTS.md? Maybe something we can discuss later!
Nice job!
f778fef to
dc471b9
Compare
I renamed it to AGENTS.md for now, just incase an engineer is using another model |
dc471b9 to
1d4e0df
Compare
1d4e0df to
77e90fc
Compare
77e90fc to
bce8fc0
Compare
Jira: CATALYST-1718
What/Why?
Adds a
catalyst logs tailcommand that streams live logs from deployed Catalyst applications via SSE. The command connects to the Infrastructure API's log tail endpoint and supports multiple output formats (default,json,pretty,short,request) for different use cases — human-readable by default,jsonfor piping to other tools.The implementation includes TTL-based reconnection to avoid holding long-lived connections, retry logic with back-off for transient failures, and fatal error detection for 4xx responses. A
querysubcommand is stubbed for future historical log retrieval.Also extracts shared CLI options (
--store-hash,--access-token,--api-host,--project-uuid) intolib/shared-options.tsto deduplicate option definitions acrossdeploy,project, andlogscommands.Testing
logs.spec.tscovering SSE parsing, log formatting across all output formats, stream reconnection, TTL expiry, fatal error handling, and retry exhaustion.cd packages/catalyst && pnpm testpnpm build && pnpm exec dist/cli.js logs --store-hash <hash> --access-token <token>Proof of life
Screen.Recording.2026-03-13.at.11.29.38.AM.mov
Migration
No breaking changes. The shared options produce identical CLI flags and env var bindings as before.