The Laravel Forge CLI.

Related tags

Laravel php laravel forge
Overview

Logo Laravel Forge CLI preview

Build Status Total Downloads Latest Stable Version License

Introduction

Laravel Forge is a server management and site deployment service. After connecting to your preferred server provider, Forge will provision a new server, installing and configuring: PHP, Nginx, MySQL, and more.

In addition, Forge can assist you in managing scheduled jobs, queue workers, SSL certificates, and more. After a server has provisioned, you can then deploy your PHP / Laravel applications or WordPress applications using the Forge UI dashboard or the Forge CLI.

Official Documentation

Documentation for Forge CLI can be found on the Laravel Forge website.

Contributing

Thank you for considering contributing to Forge CLI! You can read the contribution guide here.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

Forge CLI is open-sourced software licensed under the MIT license.

Comments
  • [1.x] Support per-project configuration files

    [1.x] Support per-project configuration files

    This pull request will allow users to store their Forge config on a per-project basis. It works by updating the ConfigRepository binding to check if a .laravel-forge folder exists in the current working directory.

    For example, in a Laravel application you would create this folder and then login to Forge. Your API tokens and other configuration values would be stored in my-project/.laravel-forge instead of the home directory / global config location.

    This effectively allows you to use the Forge CLI with multiple Forge accounts, useful if you have clients with their own accounts or a personal and work account (both of which apply to me).

    My original idea was to support a forge.json in the root of the project instead, but the use of a "hidden" folder makes more sense as it'll be gitignored like other dot-folders in projects.

    opened by ryangjchandler 8
  • Use specified SSH key

    Use specified SSH key

    Would be nice to be able to use a specific SSH key. We have about 30 servers in our Forge account and it's a bit cumbersome to add a specific Forge CLI key to every server, then multiply that with a couple of developers.

    When we provision a new server SSH keys gets added for each developer and then we all can connect without adding the keys manually. Something like this perhaps:

    $ forge server:current --key=my-key-that-is-added-to-all-servers.pub
    

    Maybe I'm missing something, but I've read the docs and couldn't find an override.

    Edit: A thought would be to specify which keys to use in ~/.ssh/config, but then again, we have a bunch of servers which would make that a bit fiddly

    needs more info 
    opened by nivv 7
  • Error after deploying

    Error after deploying

    • Forge CLI Version: 0.1.5
      • PHP Version: 8.0.2
      • Operating System: WINNT
      • Error Message: Unable to connect to remote server. Maybe run [ssh:configure] to configure an SSH Key?

    Description:

    When I deploy to the site, the deployment actually works and the site is deployed. Just a weird thing after that. I get an error, Unable to connect to the remote server. I have the connection working hence I can deploy.

    Steps To Reproduce:

    forge deploy site

    forge-cli

    bug 
    opened by tomsgad 7
  • Failed deployment message exception on forge deploy

    Failed deployment message exception on forge deploy

    • Forge CLI Version: 1.4.0
    • PHP Version: 8.1.7
    • Operating system: Linux

    Description:

    Ran forge deploy [site] and got this error - the deployment did go ahead on Forge however.

    ==> Queuing Deployment
    ==> Waiting For Deployment To Start
    ==> Deploying
    
    
      An unexpected error occured. Please report this issue here:
      https://github.com/laravel/forge-cli/issues/new/choose
    
      - Forge CLI Version: 1.4.0
      - PHP Version: 8.1.7
      - Operating System: Linux
      - Error Message: array_map(): Argument #2 ($array) must be of type array, string given.
    

    image

    Steps To Reproduce:

    • run forge deploy example.com
    • See error

    Hope this helps! Much 💖 for Forge

    needs more info 
    opened by cbowofrivia 5
  • Forge reports error when attempting to ssh into remote server

    Forge reports error when attempting to ssh into remote server

    • Forge CLI Version: 1.40
    • PHP Version: 8.0.18

    Description:

    This is related to a couple of similar issues I have seen - namely #16 and #18

    I am using Forge CLI v.1.4 on Ubuntu MATE 21.04. I am able to connect to machine manually via ssh and all is okay. The command proposed in issue #18: ssh -o "IdentitiesOnly=yes" -i ~/path/to/key forge@SERVER_IP also works for me but when using forge ssh:test I get Unable to connect to remote server. Maybe run [ssh:configure] to configure an SSH Key?. When I deploy, with forge deploy. deployment is fine - i.e. it happens and the Forge UI records it appropriately however, the process disconnects with this error. Out of interest, I ran forge ssh:test -vvv which records an execption:

    me@machine:/var/www/mysite/dev$ forge ssh:test -vvv
    
    Box Requirements Checker
    ========================
    
    > Using PHP 8.0.18
    > PHP is using the following php.ini file:
      /etc/php/8.0/cli/php.ini
    
    > Checking Box requirements:
      ✔ The application requires the version "^8.0" or greater.
      ✔ The application requires the extension "zlib".
      
                                                                                                                                           
     [OK] Your system is ready to run the application.                                                                                     
                                                                                                                                           
    
    ==> Establishing Secure Connection
    
    In Application.php line 124:
                                                                                              
      [LaravelZero\Framework\Exceptions\ConsoleException]                                     
      Unable to connect to remote server. Maybe run [ssh:configure] to configure an SSH Key?  
                                                                                              
    
    Exception trace:
      at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/laravel-zero/framework/src/Application.php:124
     LaravelZero\Framework\Application->abort() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/laravel-zero/foundation/src/Illuminate/Foundation/helpers.php:44
     abort() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/laravel-zero/foundation/src/Illuminate/Foundation/helpers.php:64
     abort_if() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/app/Repositories/RemoteRepository.php:176
     App\Repositories\RemoteRepository->App\Repositories\{closure}() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/spatie/once/src/functions.php:40
     once() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/app/Repositories/RemoteRepository.php:177
     App\Repositories\RemoteRepository->ensureSshIsConfigured() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/app/Commands/SshTestCommand.php:44
     App\Commands\SshTestCommand->handle() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/container/BoundMethod.php:36
     Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/container/Util.php:41
     Illuminate\Container\Util::unwrapIfClosure() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/container/BoundMethod.php:93
     Illuminate\Container\BoundMethod::callBoundMethod() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/container/BoundMethod.php:37
     Illuminate\Container\BoundMethod::call() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/container/Container.php:653
     Illuminate\Container\Container->call() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/console/Command.php:136
     Illuminate\Console\Command->execute() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/app/Commands/Command.php:103
     App\Commands\Command->execute() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/symfony/console/Command/Command.php:291
     Symfony\Component\Console\Command\Command->run() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/console/Command.php:121
     Illuminate\Console\Command->run() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/symfony/console/Application.php:989
     Symfony\Component\Console\Application->doRunCommand() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/symfony/console/Application.php:299
     Symfony\Component\Console\Application->doRun() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/symfony/console/Application.php:171
     Symfony\Component\Console\Application->run() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/console/Application.php:102
     Illuminate\Console\Application->run() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Console/Kernel.php:129
     Illuminate\Foundation\Console\Kernel->handle() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/laravel-zero/framework/src/Kernel.php:95
     LaravelZero\Framework\Kernel->handle() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/forge:36
     require() at /home/me/.config/composer/vendor/laravel/forge-cli/builds/forge:14
     include() at /home/me/.config/composer/vendor/bin/forge:117
    

    Steps To Reproduce:

    1. Configure ssh with ssh:configure
    2. Execute forge ssh:test or forge deploy
    opened by titantwentyone 4
  • Error Message: Trying to access array offset on value of type null.

    Error Message: Trying to access array offset on value of type null.

    • Forge CLI Version: 1.1.0
    • PHP Version: 8.0.3

    Description:

    When using forge ssh:configure I get an error. After selecting the server, creating a new key and naming it I get Error Message: Trying to access array offset on value of type null.

    Steps To Reproduce:

    forge ssh:configure server id 0 (create new key) ssh key name

    Then error shows

    opened by tomcrofty 4
  • Error during `forge ssh:configure`

    Error during `forge ssh:configure`

    • Forge CLI Version: 0.1.5
    • PHP Version: 7.4.3
    • Operating System: WINNT
    • Error Message: Trying to access array offset on value of type null.

    Description:

    Fatal error. VSCode automatically opened laravel\forge-cli\scripts\keysFactory.php.

    Steps To Reproduce:

    • Run forge ssh:configure
    • Select server by typing in server's name
    • Use option 0 to create new key
    • See error
    bug 
    opened by ethanclevenger91 4
  • PHP8 Version error

    PHP8 Version error

    • Forge CLI Version: 0.1.5
    • PHP Version: 8.0.8

    Description:

    I have PHP 8.0.8 installed but the software tells me that it is required PHP 7.3. I checked the composer.json of the package for missing version declaration and noticed there is only one pipe in "^7.3|^8.0". Is this the problem?

    Screen Shot 2021-08-05 at 5 13 57 PM

    Steps To Reproduce:

    1. Install PHP 8.0.8 on Mac via Homebrew
    2. Install latest forge-cli
    needs more info 
    opened by lahivee 4
  • Passing null to parameter #1 ($string) of type string is deprecated

    Passing null to parameter #1 ($string) of type string is deprecated

    • Forge CLI Version: 1.3.4
    • PHP Version: 8.1.2

    Description:

    I am experiencing an error when I try to view my site logs via the CLI. I have authenticated properly, and the SSH is working too. The error message I'm getting is strtolower(): Passing null to parameter #1 ($string) of type string is deprecated.

    Steps To Reproduce:

    Run the command to list site logs: forge site:logs [my_site_name.com]

    needs more info 
    opened by briantuju 3
  • [ERROR] Your system is not ready to run the application.

    [ERROR] Your system is not ready to run the application.

    • Forge CLI Version: 1.3.4
    • PHP Version: 8.0.6
    • MacOs: 12.0
    • Processor: M1 Pro

    Description:

    I am trying to run Forge CLI but get an error message that I am not running a higher version than PHP 7.3 but I'm running it with PHP 8.0.6.

    Box Requirements Checker
    ========================
    
    > Using PHP 8.0.6
    > PHP is using the following php.ini file:
      /usr/local/etc/php/8.0/php.ini
    
    > Checking Box requirements:
      E.
    
                                                                                    
     [ERROR] Your system is not ready to run the application.                       
                                                                                    
    
    Fix the following mandatory requirements:
    =========================================
    
     * The application requires the version "^7.3" or greater.
    

    Steps To Reproduce:

    1. Open Terminal
    2. Run command: forge
    needs more info 
    opened by mathiaspalmqvist 3
  • Not able to SSH into server after `forge ssh:configure`

    Not able to SSH into server after `forge ssh:configure`

    • Forge CLI Version: 1.3.3
    • PHP Version: 7.4.8
    • Git Bash on Windows 10 Pro in case it matters

    Description:

    Picking up from here, forge ssh:test and other ssh commands are resulting in:

    Unable to connect to remote server. Maybe run [ssh:configure] to configure an SSH Key?

    Which I've already done for this server. I've reproduced this on two machines.

    Steps To Reproduce:

    1. Globally install forge-cli
    2. Run forge login and add API key
    3. Run `forge ssh:configure [some-existing-server-slug], and name it some-existing-server-slug. See:
    ==> Creating Key [some_existing_server_slug.pub]
    ==> Adding Key [some_existing_server_slug.pub] With The Name [some-existing-server-slug] To Server [some-existing-server-slug]
    ==> SSH Key Based Secure Authentication Configured Successfully
    
    1. Run forge ssh some-existing-server-slug
    2. See:
    Unable to connect to remote server. Maybe run [ssh:configure] to configure an SSH Key?
    
    1. Run forge server:current. See you're in the context of the server you just configured SSH for
    2. Run forge ssh:test. See:
    Unable to connect to remote server. Maybe run [ssh:configure] to configure an SSH Key?
    
    1. Log into Forge. See SSH key has been added to server.

    I noted in the other issue that I wasn't clear how the system was deciding which SSH key to present and that some debugging was turning up Permission Denied errors, but it's been a while so I'm not 100% sure on any of that anymore.

    needs more info 
    opened by ethanclevenger91 3
  • Add prompt/option for username parameter required by forge api

    Add prompt/option for username parameter required by forge api

    Prior to this, adding new key using ssh:configure command would always end in error when trying to add the key because it was missing the 'username' parameter.

    This adds a way to pass the user as an option when calling ssh:configure, or it will prompt for a username offering 'forge' as default username.

    opened by morales2k 0
Releases(v1.5.0)
Owner
The Laravel Framework
The Laravel Framework
A nice GUI for Laravel Artisan, ready out of the box, configurable and handy for non-CLI experienced developers.

Artisan UI A nice GUI for Laravel Artisan, ready out of the box, configurable and handy for non-CLI experienced developers. Supported commands must be

Pablo Leone 1 Dec 3, 2021
Use Laravel's blade engine as a CLI for rendering files.

Blade CLI Use Laravel's blade engine as a CLI for rendering files. Introduction This package customizes and extends several of the Illuminate\View cla

Sergio Compean 31 Oct 21, 2022
Bunny CLI - Replicate and store your files to the edge!

Bunny CLI - Replicate and store your files to the edge! What is Bunny CLI? Bunny CLI is a tool for the console to upload frontend frameworks such as A

own3d media GmbH 11 Apr 18, 2022
An easy way to add colors in your CLI scripts.

COLORS Here is a preview of what you can achieve with the library: Installation Installation via composer is highly recommended. { "require": {

Kevin Le Brun 335 Dec 4, 2022
Email-flooder - A CLI flooder e-mail tool, made in PHP.

E-mail flooder (PHP 8.0.13) You can send emails to any server, however the request must come from Gmail. (Remember to enable less secure apps to be ab

null 2 Dec 17, 2021
This project uses dflydev/dot-access-data to provide simple output filtering for cli applications.

FilterViaDotAccessData This project uses dflydev/dot-access-data to provide simple output filtering for applications built with annotated-command / Ro

Consolidation 44 Jul 19, 2022
List of 77 languages for Laravel Framework 4, 5, 6, 7 and 8, Laravel Jetstream , Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova and Laravel Spark.

Laravel Lang In this repository, you can find the lang files for the Laravel Framework 4/5/6/7/8, Laravel Jetstream , Laravel Fortify, Laravel Cashier

Laravel Lang 6.9k Jan 2, 2023
⚡ Laravel Charts — Build charts using laravel. The laravel adapter for Chartisan.

What is laravel charts? Charts is a Laravel library used to create Charts using Chartisan. Chartisan does already have a PHP adapter. However, this li

Erik C. Forés 31 Dec 18, 2022
Laravel Kickstart is a Laravel starter configuration that helps you build Laravel websites faster.

Laravel Kickstart What is Laravel Kickstart? Laravel Kickstart is a Laravel starter configuration that helps you build Laravel websites faster. It com

Sam Rapaport 46 Oct 1, 2022
Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

null 9 Dec 14, 2022
Laravel Segment is an opinionated, approach to integrating Segment into your Laravel application.

Laravel Segment Laravel Segment is an opinionated, approach to integrating Segment into your Laravel application. Installation You can install the pac

Octohook 13 May 16, 2022
Laravel Sanctum support for Laravel Lighthouse

Lighthouse Sanctum Add Laravel Sanctum support to Lighthouse Requirements Installation Usage Login Logout Register Email Verification Forgot Password

Daniël de Wit 43 Dec 21, 2022
Bring Laravel 8's cursor pagination to Laravel 6, 7

Laravel Cursor Paginate for laravel 6,7 Installation You can install the package via composer: composer require vanthao03596/laravel-cursor-paginate U

Pham Thao 9 Nov 10, 2022
A package that uses blade templates to control how markdown is converted to HTML inside Laravel, as well as providing support for markdown files to Laravel views.

Install Install via composer. $ composer require olliecodes/laravel-etched-blade Once installed you'll want to publish the config. $ php artisan vendo

Ollie Codes 19 Jul 5, 2021
A light weight laravel package that facilitates dealing with arabic concepts using a set of classes and methods to make laravel speaks arabic

A light weight laravel package that facilitates dealing with arabic concepts using a set of classes and methods to make laravel speaks arabic! concepts like , Hijri Dates & Arabic strings and so on ..

Adnane Kadri 49 Jun 22, 2022
Jetstrap is a lightweight laravel 8 package that focuses on the VIEW side of Jetstream / Breeze package installed in your Laravel application

A Laravel 8 package to easily switch TailwindCSS resources generated by Laravel Jetstream and Breeze to Bootstrap 4.

null 686 Dec 28, 2022
Laravel Jetstream is a beautifully designed application scaffolding for Laravel.

Laravel Jetstream is a beautifully designed application scaffolding for Laravel. Jetstream provides the perfect starting point for your next Laravel application and includes login, registration, email verification, two-factor authentication, session management, API support via Laravel Sanctum, and optional team management.

The Laravel Framework 3.5k Jan 8, 2023
Laravel Larex lets you translate your whole Laravel application from a single CSV file.

Laravel Larex Translate Laravel Apps from a CSV File Laravel Larex lets you translate your whole Laravel application from a single CSV file. You can i

Luca Patera 68 Dec 12, 2022
A Laravel package that adds a simple image functionality to any Laravel model

Laraimage A Laravel package that adds a simple image functionality to any Laravel model Introduction Laraimage served four use cases when using images

Hussein Feras 52 Jul 17, 2022