TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/slopus/happy/llms.txt
Use this file to discover all available pages before exploring further.
happy doctor command provides comprehensive diagnostics and troubleshooting information for Happy CLI.
Syntax
Subcommands
(default)
Run full system diagnostics.clean
Clean up runaway Happy processes.Description
Thedoctor command helps diagnose and fix issues with Happy CLI. It provides:
- Version information: CLI and system versions
- Configuration details: Settings and environment
- Authentication status: Credentials and machine registration
- Daemon diagnostics: Process status and health
- Process inventory: All running Happy processes
- Log file locations: Recent logs for debugging
- Cleanup utilities: Remove stuck processes
Examples
Run Full Diagnostics
Clean Up Runaway Processes
Daemon-Only Diagnostics
Internal command for daemon-specific diagnostics:happy doctor with a daemon filter, showing only daemon-related information.
Diagnostic Information
Basic Information
- Happy CLI Version: Installed version of Happy
- Platform: Operating system and architecture
- Node.js Version: Runtime version
Daemon Spawn Diagnostics
- Project Root: Source code location
- Wrapper Script: Path to
happy.mjsentry point - CLI Entrypoint: Compiled JavaScript entry point
- File existence: Verification that required files exist
Configuration
- Happy Home: Data directory location
- Server URL: API endpoint
- Logs Dir: Log file directory
Environment Variables
Checks for:HAPPY_HOME_DIR: Custom data directoryHAPPY_SERVER_URL: Custom server URLDANGEROUSLY_LOG_TO_SERVER: Debug logging flagDEBUG: Debug modeNODE_ENV: Node environment
Settings
Displays contents ofsettings.json:
- Machine ID
- Sandbox configuration
- Chrome mode setting
- Other preferences
Authentication
Checks for valid credentials inaccess.key:
- ✓ Authenticated: Credentials found
- ⚠️ Not authenticated: No credentials
- ❌ Error: Failed to read credentials
Daemon Status
Daemon process information:- Running status
- Process ID (PID)
- Start time
- CLI version used to start daemon
- HTTP control port
- Daemon state file contents
Process Inventory
All Happy-related processes grouped by type:The
happy doctor process itselfBackground daemon processes
Sessions started by the daemon (remote sessions)
Sessions started directly from terminal
Development mode processes (from source)
Other doctor processes
Happy processes that couldn’t be categorized
Log Files
Recent log files with paths:- Regular logs: Session and command logs
- Daemon logs: Daemon-specific logs
- Sorted by modification time (newest first)
Cleaning Runaway Processes
Theclean subcommand identifies and terminates:
- Orphaned sessions: Sessions without parent process
- Stuck daemons: Daemon processes that didn’t exit cleanly
- Zombie processes: Completed processes still in process table
- Duplicate processes: Multiple instances that shouldn’t exist
What Gets Cleaned
When to Clean
Runhappy doctor clean when:
- Sessions won’t start (port conflicts)
- Daemon won’t start (stale PID)
- System feels sluggish (too many processes)
- After crashes or forced terminations
- Before major version updates
Troubleshooting Workflows
Authentication Issues
Daemon Won’t Start
Session Won’t Start
Version Mismatch
Log Analysis
Debug Mode
Enable debug logging for more detailed diagnostics:- Output debug logs to console
- Create detailed log files
- Show internal state transitions
- Display network requests
Understanding Output
Color Coding
- 🟢 Green: Success, working correctly
- 🟡 Yellow: Warning, may need attention
- 🔴 Red: Error, needs fixing
- ⚪ Gray: Informational
Status Indicators
✓- Success/Enabled✗- Failure/Disabled⚠️- Warning/Attention needed○- Not configured/Not connected
Sharing Diagnostics
When reporting issues:Related Commands
- happy daemon - Daemon management and status
- happy auth - Authentication diagnostics
- happy sandbox - Sandbox configuration
Run
happy doctor whenever you encounter issues. It provides the information needed for troubleshooting or reporting bugs.