public function setupDrushLocalAlias($alias_name = null)
    {
        $config = ProjectX::getProjectConfig();

        $alias_name = isset($alias_name)
            ? Utiltiy::machineName($alias_name)
            : ProjectX::getProjectMachineName();

        $alias_content = $this->drushAliasFileContent(
            $alias_name,
            $config->getHost()['name'],
            $this->getInstallPath()
        );
        $project_root = ProjectX::projectRoot();

        $this
            ->taskWriteToFile("$project_root/drush/site-aliases/local.aliases.drushrc.php")
            ->line($alias_content)
            ->run();

        return $this;
    }