protected function appStatus(InputInterface $input, OutputInterface $output)
    {
        $output->writeln('<info>App:</info> ' . $input->getArgument('app_name'));
      // If there are no apps, return
        if (count($this->getApplication()->getTerra()->getConfig()->get('apps')) == 0) {
            $output->writeln('<comment>There are no apps!</comment>');
            $output->writeln('Use the command <info>terra app:add</info> to add your first app.');

            return;
        }

        $app_name = strtr($input->getArgument('app_name'), array(
        '-' => '_',
        ));

        $app = $this->getApplication()->getTerra()->getConfig()->get('apps', $app_name);

        if (empty($app)) {
            $output->writeln('<error>No app with that name! </error>');

            return 1;
        }

        // If no environments:
        if (count(($app['environments'])) == 0) {
            $output->writeln('<comment>There are no environments!</comment>');
            $output->writeln('Use the command <info>terra environment:add</info> to add your first environment.');

            return;
        }

        $table = $this->getHelper('table');
        $table->setHeaders(array(
          'Name',
          'Code Path / docroot',
          'URLs & Drush Alias',
          'Version',
        ));

        $rows = array();

        foreach ($app['environments'] as $environment) {
            // @TODO: Detect if URL proxy is online
            $environment_factory = new EnvironmentFactory($environment, $app);

            // Build list of domains.
            $environment['domains'][] = 'http://'. $environment_factory->getHost() . ':' . $environment_factory->getPort();
            $environment['domains'][] = 'http://'.$environment_factory->getUrl();

            $environment['url'] = implode(PHP_EOL, $environment['domains']);
            $environment['url'] .= PHP_EOL . $environment_factory->getDrushAlias();

            unset($environment['domains']);

            $rows[] = array(
                $environment['name'],
                $environment['path'] . PHP_EOL . $environment['document_root'],
                $environment['url'],
                $environment['version'],
            );
        }

        $table->setRows($rows);
        $table->render($output);
    }