Added both execute and spawn handlers for CLI commands.