Skip to content

Conversation

malhotra5
Copy link
Contributor

@malhotra5 malhotra5 commented Sep 26, 2025

Summary

This PR adds a splash screen to the OpenHands CLI PyInstaller executable to provide visual feedback during the application startup process. The splash screen features ASCII art branding and loading indicators to improve the user experience.

Changes Made

🎨 Splash Screen Implementation

  • ASCII Art Design: Created terminal-style splash screen with OpenHands CLI logo in ASCII art
  • Color Scheme: Used classic terminal colors (green/cyan) for consistency with CLI aesthetic
  • Loading Indicators: Added progress bar and "Initializing..." text with dynamic updates

🔧 PyInstaller Integration

  • Spec File Configuration: Modified openhands-cli.spec to include Splash screen configuration
  • Image Generation: Added create_splash.py script to generate the 800x500 splash screen image
  • Entry Point Updates: Updated simple_main.py to properly handle splash screen lifecycle

🛠️ Build System Improvements

  • Graceful Error Handling: Modified build.py to handle missing SDK dependencies during build
  • Splash Screen Lifecycle: Added proper splash screen closing logic with text updates

Technical Details

Splash Screen Features

  • Dimensions: 800x500 pixels optimized for PyInstaller
  • ASCII Art Logo: Clean, readable OpenHands CLI branding
  • Progress Indicators: Visual progress bar and loading text
  • Terminal Styling: Consistent with CLI application aesthetic

PyInstaller Configuration

splash = Splash(
    'splash.png',
    binaries=a.binaries,
    datas=a.datas,
    text_pos=(10, 350),
    text_size=12,
    text_color='white',
    minify_script=True,
    always_on_top=True,
)

Lifecycle Management

  • Splash screen displays immediately when executable starts
  • Text updates to "Initializing OpenHands CLI..." during startup
  • Automatically closes after 1 second delay for visibility
  • Graceful error handling for non-PyInstaller environments

Testing

  • ✅ PyInstaller build process successfully integrates splash screen
  • ✅ Splash screen module (pyi_splash) properly included in executable
  • ✅ Build artifacts include splash screen resources
  • ✅ Executable starts with splash screen integration (tested in headless environment)
  • ✅ All pre-commit hooks pass

Files Changed

  • openhands-cli/openhands-cli.spec - Added Splash configuration
  • openhands-cli/simple_main.py - Added splash screen lifecycle management
  • openhands-cli/build.py - Improved error handling for missing dependencies
  • openhands-cli/create_splash.py - New script for generating splash screen image
  • openhands-cli/splash.png - Generated splash screen image (11KB)

User Experience Impact

  • Improved Feedback: Users now see immediate visual feedback when starting the CLI
  • Professional Appearance: ASCII art branding provides consistent visual identity
  • Loading Indication: Clear indication that the application is initializing
  • No Performance Impact: Splash screen adds minimal overhead to startup time

Future Enhancements

  • Could add animated progress indicators
  • Potential for customizable splash screen themes
  • Integration with application loading progress

Note: This PR focuses specifically on the OpenHands CLI standalone project in the openhands-cli/ subdirectory and does not affect the main OpenHands application.

@malhotra5 can click here to continue refining the PR


To run this PR locally, use the following command:

GUI with Docker:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:6d630bd-nikolaik   --name openhands-app-6d630bd   docker.all-hands.dev/all-hands-ai/openhands:6d630bd

CLI with uvx:

uvx --python 3.12 --from git+https://github.com/All-Hands-AI/OpenHands@feature/cli-splash-screen openhands

- Add splash screen generation script with ASCII art OpenHands CLI logo
- Configure PyInstaller spec file to include splash screen with loading text
- Update main entry point to properly close splash screen after initialization
- Modify build script to handle missing SDK dependencies gracefully
- Generate 800x500 splash screen with terminal-style green/cyan color scheme
- Include progress bar and loading indicators for better user experience

The splash screen displays during PyInstaller executable startup to indicate
the application is loading, improving user experience for the CLI tool.

Co-authored-by: openhands <[email protected]>
@malhotra5 malhotra5 changed the title feat(cli): Add ASCII art splash screen to PyInstaller executable V1(CLI): Add ASCII art splash screen to PyInstaller executable Sep 26, 2025
@malhotra5 malhotra5 changed the title V1(CLI): Add ASCII art splash screen to PyInstaller executable CLI(V1): Add ASCII art splash screen to PyInstaller executable Sep 26, 2025
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