Forge: Introducing The Forge CLI

Aug, 9 2021#forge

Today we're proud to introduce you to our new command-line tool: Forge CLI. This new open-source tool provides a number of helpful commands that can assist you in managing your Forge servers, sites, and resources from the command-line.

Once you install Forge CLI, you may run forge from the command-line to get started:

image

The first release (v1.0) of the Forge CLI contains around thirty commands, including initiating deployments, viewing application logs, configuring SSH key authentication, and more. In this article, we are going to highlight some of these new commands. And, of course, you may refer to the official documentation for more details.

Initiating Deployments

One of the primary features of Laravel Forge is deployments, and now those may be initiated via the Forge CLI using the deploy command:

image

Viewing Application Logs

You may also view site logs directly from the command-line. To do so, use the site:logs command:

image

Configuring SSH Key Authentication

To configure SSH key authentication, you may use the ssh:configure command:

image

After you have configured SSH key authentication, you may use the ssh command to quickly create a secure connection to your server:

image

Connecting To A Database Locally

You may even use the database:shell command to quickly access a command-line shell that lets you interact with your database:

image


Be sure to check out the official Forge CLI documentation for more details. There you will find a listing of all of the available commands and options. We hope you enjoy this new command-line tool!

If you don’t have a Forge account, now is a great time to sign up! Forge allows you to painlessly create and manage PHP servers which include MySQL, Redis, Memcached, database backups, and everything else you need to run robust, modern Laravel applications.

By Nuno Maduro

Laravel Team, Creator of Pest.

Follow the RSS Feed.