Merge pull request #2014 from codeflash-ai/feat/show-logo-on-help

feat: display logo when running `codeflash --help`
This commit is contained in:
Kevin Turcios 2026-04-23 06:11:12 -05:00 committed by GitHub
commit 2054796acd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 0 deletions

View file

@ -31,6 +31,8 @@ def main() -> None:
from codeflash.cli_cmds.cli import parse_args from codeflash.cli_cmds.cli import parse_args
if "--help" in sys.argv[1:] or "-h" in sys.argv[1:]:
print_codeflash_banner()
args = parse_args() args = parse_args()
# Auth commands skip banner, telemetry, and version check entirely # Auth commands skip banner, telemetry, and version check entirely

18
tests/test_help_banner.py Normal file
View file

@ -0,0 +1,18 @@
import subprocess
import sys
def test_help_displays_logo() -> None:
result = subprocess.run(
[sys.executable, "-c", "from codeflash.main import main; main()", "--help"], capture_output=True, text=True
)
assert result.returncode == 0
assert "codeflash.ai" in result.stdout
def test_help_short_flag_displays_logo() -> None:
result = subprocess.run(
[sys.executable, "-c", "from codeflash.main import main; main()", "-h"], capture_output=True, text=True
)
assert result.returncode == 0
assert "codeflash.ai" in result.stdout