#!/usr/bin/env php
<?php

use Symfony\Component\Console\Application;

$loader = __DIR__ . '/../vendor/autoload.php';

if (!file_exists($loader)) {
    $loader = __DIR__ . '/../../../autoload.php';
}

if (!file_exists($loader)) {
    die(
        'You must set up the project dependencies, run the following commands:' . PHP_EOL .
        'curl -s http://getcomposer.org/installer | php' . PHP_EOL .
        'php composer.phar install' . PHP_EOL
    );
}

require $loader;

$application = new Application('Herald client', '0.0.1');
$application->setCatchExceptions(true);
$application->add(new \Herald\Client\Command\SendCommand());
$application->run();
