PHPackages                             brunocfalcao/larapush - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. brunocfalcao/larapush

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

brunocfalcao/larapush
=====================

php artisan push - Deploy your codebase into your web server with a single Artisan command

v1.1.4(5y ago)14813711MITPHPPHP ^7.2

Since Apr 14Pushed 5y ago4 watchersCompare

[ Source](https://github.com/brunocfalcao/larapush)[ Packagist](https://packagist.org/packages/brunocfalcao/larapush)[ Docs](https://github.com/brunocfalcao/larapush)[ RSS](/packages/brunocfalcao-larapush/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (7)Versions (20)Used By (0)

 [![Larapush logo](https://camo.githubusercontent.com/c1acebca890775749e2656c922874d06c10c1109b4b836706c18415a0cf5a479/687474703a2f2f6173736574732e776179676f752e636f6d2f6c617261707573682e6a7067)](https://camo.githubusercontent.com/c1acebca890775749e2656c922874d06c10c1109b4b836706c18415a0cf5a479/687474703a2f2f6173736574732e776179676f752e636f6d2f6c617261707573682e6a7067)

 [![Latest Stable Version](https://camo.githubusercontent.com/6aee3f436c41224a836813169c9802fdb7ccf2b4dd3bff6d0683e4675c9b4b0e/68747470733a2f2f706f7365722e707567782e6f72672f6272756e6f6366616c63616f2f6c617261707573682f762f737461626c652e737667)](https://packagist.org/packages/brunocfalcao/larapush) [![Total Downloads](https://camo.githubusercontent.com/faeba2aa05ca099769a5bd8b59db39f7a751afc7235097785e1d9f596f561560/68747470733a2f2f706f7365722e707567782e6f72672f6272756e6f6366616c63616f2f6c617261707573682f642f746f74616c2e737667)](https://packagist.org/packages/brunocfalcao/larapush) [![License](https://camo.githubusercontent.com/ac78308e71ecbf05d0454bd1101d636d367eefd57321eac6f05750e49fb5f021/68747470733a2f2f706f7365722e707567782e6f72672f6272756e6f6366616c63616f2f6c617261707573682f6c6963656e73652e737667)](https://packagist.org/packages/brunocfalcao/larapush)

Deploy your codebase to your web server using a new Laravel Artisan command

**php artisan push**

### Features

[](#features)

- Client &lt;-&gt; Server communications using HTTP. No need to have SSH access!
- Choose what codebase you want to upload (files, folders).
- Run pre-scripts and post-scripts that you define (artisan commands, invokable classes, or custom methods).
- You can choose to upload only modified files, or all files inside your codebase.
- Blacklist files so they can never be uploaded to your web server (e.g. .env).
- Keeps all of your uploaded codebase versions backup on your storage path.
- Get prompted in case you are uploading to production environments.
- Works on both UNIX and Windows web servers.

### Requirements

[](#requirements)

> Database is only needed in your **web server** (Laravel Passport will be installed)
> PHP 7.2+
> Laravel 5.8+

### Installation

[](#installation)

❗ In order to generate your OAuth client and token, you need to first install Larapush on your web server!

Log in into your web server and run the following commands:

```
composer require brunocfalcao/larapush
```

```
php artisan larapush:install-remote
```

At the end, it will generate your command line that you will need to use to install it on your local computer. As example:

[![](https://camo.githubusercontent.com/22c9462487f696cc76abcbb585cfa474d9de4bf47e7f1a97610b271168a911c7/68747470733a2f2f6173736574732e776179676f752e636f6d2f696d67312e6a7067)](https://camo.githubusercontent.com/22c9462487f696cc76abcbb585cfa474d9de4bf47e7f1a97610b271168a911c7/68747470733a2f2f6173736574732e776179676f752e636f6d2f696d67312e6a7067)

❗ Now copy+paste the one generated on your web server so you can use it later on your local installation.

On your **local development computer**, run the following commands:

```
composer require brunocfalcao/larapush
```

Now paste the line from your previous web server installation **to your local computer prompt**. Here is an example:

```
php artisan larapush:install-local --client=4 --secret=5DrehY2gjPWTPL4rxzQwseHiQHWq8FXaH0Y --token=WXD2W6ZVK5
```

The installer will prompt to insert your web server URL. Just add it in the FQDN format (e.g.: ).

The installation completes you should see:

```
All good! Now you can push your codebase to your web server!

Don't forget to update your larapush.php configuration file for the correct codebase files and directories
that you want to upload.
```

### Usage

[](#usage)

Henceforth all you have to do is to run the command:

```
php artisan push
```

It will upload your codebase that you define on your larapush.php configuration file (larapush.codebase) and the scripts that you also specified (larapush.scripts).

### Configuration

[](#configuration)

A new larapush.php configuration file is created. Let's explore it.

#### larapush.type

[](#larapushtype)

No need to change this, it is automatically configured by the installers using .env keys that will be registered.

#### larapush.environment

[](#larapushenvironment)

If your web server environment name matches one of the ones specified here, then Larapush will ask you to confirm the upload each time you push your code. This will avoid you to upload your codebase to environments that you might not want to (like a production).

#### larapush.remote

[](#larapushremote)

No need to change these keys by default, unless you want to change the main root URL path, or force a web server URL.

#### larapush.scripts (pre\_scripts and post\_scripts)

[](#larapushscripts-pre_scripts-and-post_scripts)

You can specify actions to run before and after the code is deployed on your web server. For each, you can:

- Run an Artisan command. E.g.: \['cache:clear', ScriptType::ARTISAN\]
- Execute an invokable method. E.g.: \[MyClass::class, ScriptType::CLASSMETHOD\]
- Execute a specific object method: E.g.: \['MyClass@myMethod', ScriptType::CLASSMETHOD\]
- Execute a system shell commands: E.g.:"\['composer dumpautoload', ScriptType::SHELLCMD\]

You can add as much as you want. All outputs are stored inside your transaction folder (later to be explained).

#### larapush.codebase

[](#larapushcodebase)

Important part, where you can specify your codebase folders and files. Just add them as array values, E.g.:

```
    'codebase' => [
        'App', 'database', 'resources/views/file.blade.php', 'webpack.js'
    ],
```

#### larapush.storage

[](#larapushstorage)

This is the path where all of your codebase push transactions are stored. See it like a versioning way of storing all of your codebase along time.

#### larapush.oauth

[](#larapushoauth)

These are security tokens generated by Laravel Passport. Don't change them, they are recorded on your .env file.

#### larapush.token

[](#larapushtoken)

This is an extra security layer, of a token that needs to be the same in both web server and your local dev computer. Registered via your installation process.

### Codebase transaction repository

[](#codebase-transaction-repository)

Each time you upload your codebase, Larapush stores that codebase plus your configured "pre" and "post" scripts both in your local computer and in your web server. This is called a transaction. By default these transaction folders are on your storage\_path("app/larapush"). You can change this path on your larapush.php configuration file.

As example, you are pushing your codebase and you see this line on your artisan command info:

```
[...]

Creating local environment codebase repository (20190413-211644-GFKXN)...

[...]
```

That code between parenthesis is the transaction code. If you navigate to your storage-path/app/larapush you will see all the transaction folders listed there. Each of those correspond to a push you have made to your web server.

Here is an example of the folders location:
[![Codebase transaction folders](https://camo.githubusercontent.com/078727c67846b490a451f1bda30d3e61b6e2e32478593c5e88ed76895a98866d/68747470733a2f2f6173736574732e776179676f752e636f6d2f696d67322e6a7067)](https://camo.githubusercontent.com/078727c67846b490a451f1bda30d3e61b6e2e32478593c5e88ed76895a98866d/68747470733a2f2f6173736574732e776179676f752e636f6d2f696d67322e6a7067)

In your web server it works exactly the same way. Additionally on each of the folder you might see also 2 files:

```
output_pre_scripts.log
output_post_scripts.log
```

Those are the console exports of the scripts that ran on each of your codebase push. So, in case you are running scripts you will see your console output there. Nice, heim? :)

### Security above all

[](#security-above-all)

Larapush was developed taking security very seriously. At the end, anyone that knows your endpoint would be able to upload a malicious codebase to your web server. That's why Larapush uses OAuth client grant access tokens for each of the HTTP transactions that are handshaken between your web server and your local computer. At the end of the HTTP transaction, the client access token is marked as used, so it cannot be used again.

When you install Larapush on your web server, it installs Laravel Passport and generates a specific client token that will be unique between your web server and your local computer. Henceforth any transaction between your local computer and your web server needs to first request a new client grant token and then use that token on the respective HTTP call. Additionally there is also a token that is passed on each request that needs to be the same between your local computer and the web server. If not, the transaction aborts in error.

All of this is done automatically each time you push your codebase. Nice and smooth!

### Security

[](#security)

If you find any security related issue please send me a direct email.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 99.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~22 days

Recently: every ~11 days

Total

19

Last Release

2175d ago

Major Versions

v0.2.0 → v1.02019-05-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/525c935c766b8289c38b87a2453f5b1480b2025b23ac51cfb41f46deef8469ec?d=identicon)[brunofalcao](/maintainers/brunofalcao)

---

Top Contributors

[![brunocfalcao](https://avatars.githubusercontent.com/u/34269950?v=4)](https://github.com/brunocfalcao "brunocfalcao (240 commits)")[![atefBB](https://avatars.githubusercontent.com/u/10966925?v=4)](https://github.com/atefBB "atefBB (1 commits)")

---

Tags

codebasedeploymentlaraninglaraveloauthpassportphpbrunocfalcaolarapushbruno falcao

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/brunocfalcao-larapush/health.svg)

```
[![Health](https://phpackages.com/badges/brunocfalcao-larapush/health.svg)](https://phpackages.com/packages/brunocfalcao-larapush)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[olssonm/l5-very-basic-auth

Laravel stateless HTTP basic auth without the need for a database

1662.5M1](/packages/olssonm-l5-very-basic-auth)[scaler-tech/laravel-saml2

SAML2 Service Provider integration for Laravel applications, based on OneLogin toolkit

2737.5k](/packages/scaler-tech-laravel-saml2)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)[pschocke/laravel-telegram-login-widget

Easily integrate Telegrams login widget into your Laravel application to send Telegram messages

1610.4k](/packages/pschocke-laravel-telegram-login-widget)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
