PHPackages                             ryangjchandler/forge-previewer - 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. ryangjchandler/forge-previewer

AbandonedArchivedProject

ryangjchandler/forge-previewer
==============================

Create preview deployments for pull request with Laravel Forge.

v0.2.1(3y ago)7588114[1 issues](https://github.com/ryangjchandler/forge-previewer/issues)MITPHPPHP ^8.0

Since Jun 12Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ryangjchandler/forge-previewer)[ Packagist](https://packagist.org/packages/ryangjchandler/forge-previewer)[ RSS](/packages/ryangjchandler-forge-previewer/feed)WikiDiscussions main Synced today

READMEChangelog (8)Dependencies (5)Versions (9)Used By (0)

Forge Previewer
===============

[](#forge-previewer)

This CLI is designed to create "preview" environments for pull requests and branches using Laravel Forge.

It's intended for use inside of CI tools such as GitHub Actions to automatically create a site on Forge that is connected to your pull request branch, then once the pull request is merged the CLI can be used to cleanup too.

Prerequisites
-------------

[](#prerequisites)

Before using this tool, please make sure you have the following:

- A server connected to [Forge](https://forge.laravel.com)
- A wildcard subdomain DNS record pointing to your Forge server.
- A [Forge API token](https://forge.laravel.com/docs/1.0/accounts/api.html)

Installation
------------

[](#installation)

Install this package with Composer:

```
composer global require ryangjchandler/forge-previewer
```

Usage
-----

[](#usage)

There are two commands in the command.

- `deploy` - Creates and deploys a site.
- `destroy` - Deletes and cleans up after a site.

### `deploy`

[](#deploy)

The `deploy` command is used to do the following things:

1. Create a site on Forge.
2. Generate an SSL certificate for the new site.
3. Create a database for the new site.
4. Enable quick deploy so all changes appear on the preview site automatically.
5. Update the environment variables to point to the database.
6. Deploy your site once.
7. Run any additional commands provided.
8. Create a scheduled job if required.

The command accepts the following flags:

```
Description:
  Deploy a branch / pull request to Laravel Forge.

Usage:
  deploy [options]

Options:
    --token[=TOKEN]              The Forge API token.
    --server[=SERVER]            The ID of the target server.
    --provider[=PROVIDER]        The Git provider. [default: "github"]
    --repo[=REPO]                The name of the repository being deployed.
    --branch[=BRANCH]            The name of the branch being deployed.
    --domain[=DOMAIN]            The domain you'd like to use for deployments, e.g. mydomain.com.
    --php-version[=PHP-VERSION]  The version of PHP the site should use, e.g. php81, php80, ... [default: "php81"]
    --command[=COMMAND]          A command you would like to execute on the site, e.g. php artisan db:seed. (multiple values allowed)
    --edit-env[=EDIT-ENV]        The colon-separated name and value that will be added/updated in the site's environment, e.g. "MY_API_KEY:my_api_key_value". (multiple values allowed)
    --scheduler                  Setup a cronjob to run Laravel's scheduler.
    --no-quick-deploy            Create your site without "Quick Deploy".
    --no-deploy                  Avoid deploying the site.

```

> **Note**: the `deploy` command can be run multiple times and will skip any steps that have already been run previously.

### `destroy`

[](#destroy)

The `destroy` command simply reverses all of the things that the `deploy` command does. It checks for the existence of certain resources in Forge and removes them if they exist.

The command accepts the following flags:

```
Description:
  Destroy a previously created preview site.

Usage:
  destroy [options]

Options:
    --token[=TOKEN]    The Forge API token.
    --server[=SERVER]  The ID of the target server.
    --repo[=REPO]      The name of the repository being deployed.
    --branch[=BRANCH]  The name of the branch being deployed.
    --domain[=DOMAIN]  The domain you'd like to use for deployments.

```

Since Forge Previewer is convention based, we will try to detect resources based on the names we generate for them.

Example Workflow
----------------

[](#example-workflow)

*TODO*

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.1% 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 ~30 days

Recently: every ~53 days

Total

8

Last Release

1212d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/568d485d441c691b0358b9091254a6a671fef8f76b73f28af1180ad568d142b2?d=identicon)[ryangjchandler](/maintainers/ryangjchandler)

---

Top Contributors

[![ryangjchandler](https://avatars.githubusercontent.com/u/41837763?v=4)](https://github.com/ryangjchandler "ryangjchandler (19 commits)")[![Illizian](https://avatars.githubusercontent.com/u/703800?v=4)](https://github.com/Illizian "Illizian (6 commits)")[![ziming](https://avatars.githubusercontent.com/u/679513?v=4)](https://github.com/ziming "ziming (1 commits)")

---

Tags

laravelforgepreview-deploy

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/ryangjchandler-forge-previewer/health.svg)

```
[![Health](https://phpackages.com/badges/ryangjchandler-forge-previewer/health.svg)](https://phpackages.com/packages/ryangjchandler-forge-previewer)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[worksome/envy

Automatically keep your .env files in sync.

6871.8M](/packages/worksome-envy)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[laravel/forge-cli

The Laravel Forge CLI.

23594.6k](/packages/laravel-forge-cli)

PHPackages © 2026

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