Skip to content

feat: add welcome message and update check on no arguments in CLI#89

Merged
felipefreitag merged 8 commits intoresend:mainfrom
Shubhdeep12:feat/welcome-message
Mar 20, 2026
Merged

feat: add welcome message and update check on no arguments in CLI#89
felipefreitag merged 8 commits intoresend:mainfrom
Shubhdeep12:feat/welcome-message

Conversation

@Shubhdeep12
Copy link
Contributor

@Shubhdeep12 Shubhdeep12 commented Mar 13, 2026

related #88

  • added welcome message
  • added test for welcome and logo
image

Summary by cubic

Show a plain ASCII banner when the CLI runs with no arguments, only when stdout is a TTY. Prints the logo without colors, runs the update check, and exits 0.

  • New Features

    • Added src/lib/logo.ts with printBannerPlain; tests for banner and no-args welcome.
    • Skip banner when stdout is not a TTY; other commands unchanged and update still skips the update check.
  • Refactors

    • Simplified banner to plain ASCII; removed unnecessary process.exit and improved test exec options.

Written for commit 804ebbf. Summary will update on new commits.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 issues found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tests/welcome.test.ts">

<violation number="1" location="tests/welcome.test.ts:18">
P2: `execFileSync('npx', ...)` runs without a shell. On Windows `npx` is a `.cmd` shim, and Node requires `shell: true` to execute `.cmd`/`.bat` files after the CVE-2024-27980 changes. This will fail the test on Windows regardless of CLI behavior. Add a Windows-only shell or wrap with `cmd.exe`/`npx.cmd`.</violation>
</file>

<file name="src/cli.ts">

<violation number="1" location="src/cli.ts:108">
P2: No-argument CLI path makes update-check failures fatal, unlike the existing best-effort updater behavior.</violation>

<violation number="2" location="src/cli.ts:109">
P2: Forced `process.exit(0)` after welcome/update output can truncate pending stdout/stderr writes.</violation>
</file>

<file name="src/lib/logo.ts">

<violation number="1" location="src/lib/logo.ts:40">
P2: Welcome-screen command hints misuse `|` as “or”, causing copy/pasted examples to execute as invalid shell pipelines.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@Shubhdeep12
Copy link
Contributor Author

i think we can add some branding in CLI. wdyt about this @felipefreitag ?

@felipefreitag
Copy link
Contributor

Thanks, I'll check with the team

@felipefreitag felipefreitag merged commit 89d5955 into resend:main Mar 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants