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

// Include composer auto-loader.
$localPath = __DIR__.'/../vendor/autoload.php'; // Development Path
$globalPath = __DIR__.'/../../../autoload.php'; // Global Path

// Import the correct file
if (file_exists($globalPath)) {
    require $globalPath;
} else {
    require $localPath;
}

// Imports for shorter code.
use Symfony\Component\Console\Application;
use Yoke\Console\Commands\{AddCommand, EditCommand, ServersCommand, ConnectCommand, DeleteCommand};

// Create a new console application instance.
$yoke = new Application();
// Set the application name.
$yoke->setName('Yoke: SSH Connection Manager');
// Add Yoke commands.
$yoke->add(new AddCommand());
$yoke->add(new ServersCommand());
$yoke->add(new ConnectCommand());
$yoke->add(new DeleteCommand());
$yoke->add(new EditCommand());
// Run the application.
$yoke->run();
