Skip to content

feat: display logo when running codeflash --help#2014

Draft
aseembits93 wants to merge 3 commits intomainfrom
feat/show-logo-on-help
Draft

feat: display logo when running codeflash --help#2014
aseembits93 wants to merge 3 commits intomainfrom
feat/show-logo-on-help

Conversation

@aseembits93
Copy link
Copy Markdown
Contributor

Summary

  • Show the Codeflash ASCII logo banner before the help text when --help or -h is passed

Test plan

  • Verified codeflash --help displays logo followed by help text
  • Verified codeflash init --help displays logo followed by subcommand help

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link
Copy Markdown
Contributor

claude bot commented Apr 6, 2026

Claude finished @aseembits93's task in 2m 12s —— View job


PR Review Summary

Prek Checks

Linting and formatting passed. Fixed missing -> None return type annotations in tests/test_help_banner.py (auto-committed).

Code Review

SMALL PR — focused correctness check.

The implementation is clean and correct:

  • main.py:36-37 — checks sys.argv[1:] before parse_args() so the banner is printed before argparse intercepts and exits. No double-banner risk since argparse exits via sys.exit(0) when --help is passed, so line 40 is never reached.
  • print_codeflash_banner() at line 40 handles the normal (non-help, non-auth) flow, unchanged from before.

One minor observation: codeflash init --help (and other subcommands) will also trigger the banner since --help is in sys.argv[1:] regardless of position. This matches the stated test plan, so it appears intentional.

No bugs, security issues, or breaking changes found.

Duplicate Detection

No duplicates detected. print_codeflash_banner() is already defined and reused.

Test Coverage

Tests cover both --help and -h flags. The subprocess-based approach correctly verifies the full CLI behavior end-to-end.


Auto-fixed: Added -> None return type annotations to both test functions in tests/test_help_banner.py (commit 8e2bab2e).


Last updated: 2026-04-06

aseembits93 and others added 2 commits April 6, 2026 16:09
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Aseem Saxena <aseembits93@users.noreply.github.com>
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.

1 participant