Test for command line

From within a package installer, or anywhere else for that matter, is there a simple test for whether Concrete is running from the CLI or from a web page?

No sooner posted than found the code:

$app->isRunThroughCommandLineInterface()

Thanks for posting the solution John!