Skip to content

Commit 9dc3161

Browse files
Ralph Agentclaude
andcommitted
🐛 Defer Gemini client imports to fix CLI startup
Move generate_banner and generate_logo imports from module scope to inside _run_media_generation(). This prevents genai.Client instantiation at import time, allowing all CLI commands to work without GEMINI_API_KEY configured. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent d61f870 commit 9dc3161

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

onboard.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
from rich.panel import Panel
1616
from rich.table import Table
1717

18-
from init.generate_banner import generate_banner as gen_banner
19-
from init.generate_logo import generate_logo as gen_logo
20-
2118
console = Console()
2219

2320
PROJECT_ROOT = Path(__file__).parent
@@ -457,6 +454,9 @@ def _check_gemini_key() -> bool:
457454

458455
def _run_media_generation(choice: str, project_name: str, theme: str) -> list[str]:
459456
"""Run the selected media generation and return list of generated file paths."""
457+
from init.generate_banner import generate_banner as gen_banner
458+
from init.generate_logo import generate_logo as gen_logo
459+
460460
generated_files: list[str] = []
461461

462462
if choice in ("Banner only", "Both"):

0 commit comments

Comments
 (0)