PHPackages                             zerofyi/shipit - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. zerofyi/shipit

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

zerofyi/shipit
==============

A zero-dependency dual-protocol deployment wizard for Hostinger shared hosting.

v1.0.1(yesterday)06↑2400%MITPHPPHP ^8.1

Since Jun 8Pushed yesterdayCompare

[ Source](https://github.com/zerofyi/shipit)[ Packagist](https://packagist.org/packages/zerofyi/shipit)[ RSS](/packages/zerofyi-shipit/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (2)Versions (3)Used By (0)

ShipIt 🚀
========

[](#shipit-)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a2138b932c680b8b8b9187546b275772a36c1c9623e226db60a5b77949488589/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a65726f6679692f7368697069742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zerofyi/shipit)[![Total Downloads](https://camo.githubusercontent.com/7264eaaf48ad55ddd1c6fef4f0fc40fdf8ea7db6d555579358095649fed84cc0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a65726f6679692f7368697069742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zerofyi/shipit)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![PHP Version Support](https://camo.githubusercontent.com/c3d372b55ac2d4fcf386a178e11d9788310097b35f3893cf3daae574b6b4cd3e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e312d626c75652e7376673f7374796c653d666c61742d737175617265)](https://php.net)

`ShipIt` is an enterprise-grade, zero-dependency deployment engine engineered specifically to bridge local development environments with **Hostinger Shared Hosting** architectures.

It cleanly handles the entire deployment pipeline in under a minute — staging your git changes, pushing code upstream, establishing secure trust handshakes, streaming compiled UI bundles, and firing remote Laravel optimizations over strict circuit-breaking SSH channels.

---

🔥 Key Features
--------------

[](#-key-features)

- **Dual-Protocol Smart Switching:** Keeps your local machine on **HTTPS** while forcing the Hostinger server to communicate over **SSH** via private deployment identities — no conflicts, no credential clashes.
- **Agnostic Privacy Detection:** Pre-flights repository visibility automatically. Public repos clone and pull over HTTPS without any key setup. Private repos activate the token injection core.
- **Automated Deploy Key Injection:** Uses your `GITHUB_API_TOKEN` to handle remote RSA key creation and GitHub handshaking end-to-end. Falls back to a guided manual card if token access is unavailable.
- **Compressed Asset Streaming:** Skips slow FTP uploads entirely. Locally built Vite/Mix bundles are archived and streamed as compressed binaries directly over your active SSH session.
- **Circuit-Breaker Pipeline:** If any remote step fails, the engine halts immediately to protect your live site from partial deployments.

---

💾 Installation
--------------

[](#-installation)

```
composer require zerofyi/shipit
```

The package uses Laravel's auto-discovery — no manual provider registration needed.

---

✅ Prerequisites
---------------

[](#-prerequisites)

Before using ShipIt, make sure both of the following are in place on your Hostinger account:

### 🔑 Passwordless SSH Connection

[](#-passwordless-ssh-connection)

ShipIt communicates with your server entirely over SSH. Your local machine must be able to connect **without being asked for a password or passphrase**.

If that's not set up yet, [see the SSH Setup Guide ↓](#-ssh-setup-guide)

---

### ⚙️ PHP `exec` Must Be Enabled

[](#️-php-exec-must-be-enabled)

ShipIt runs remote shell commands via PHP's `exec()` function. Hostinger disables it by default — you must remove it from the disabled functions list before ShipIt can operate.

**hPanel → your website → Advanced → PHP Configuration → PHP Options → Disable Functions**

Find `exec` in the list and remove it, then save.

> 📖 **Official guide:** [How to Enable Disabled PHP Functions in Hostinger → hostinger.com](https://www.hostinger.com/support/3212034-how-to-enable-disabled-php-functions-in-hostinger/)

> ⚠️ Without this, ShipIt will silently fail during the server sync phase regardless of SSH or any other configuration being correct.

---

⚙️ Environment Configuration
----------------------------

[](#️-environment-configuration)

Add the following to your local `.env` file:

```
# ------------------------------------------------------------------------------
# GitHub
# ------------------------------------------------------------------------------
GITHUB_REPO_URL=https://github.com/your-username/your-repo.git
# GITHUB_API_TOKEN=

# ------------------------------------------------------------------------------
# Hostinger
# ------------------------------------------------------------------------------
HOSTINGER_SSH_HOST=12.34.56.78
HOSTINGER_SSH_USERNAME=u123456789
HOSTINGER_SSH_PORT=65002
HOSTINGER_SITE_DIR=yourdomain.com
```

> 💡 `GITHUB_API_TOKEN` is **optional**. If your repository is **private** and you want ShipIt to handle GitHub deploy key registration fully automatically — with no manual steps — add a Fine-grained Personal Access Token here. [See how to generate one ↓](#generating-a-github-fine-grained-token)

> 📡 Not sure where to find your Hostinger SSH details? [See Step 1 of the SSH Setup Guide ↓](#step-1--enable-ssh-in-hpanel)

> 🔒 `HOSTINGER_SITE_DIR` is validated against path traversal payloads (`..`, `/`, `\`) before any remote operation runs.

---

🚀 Usage
-------

[](#-usage)

### Deploy to Hostinger

[](#deploy-to-hostinger)

```
php artisan push:hostinger
```

The master deployment command. Builds assets locally, commits and pushes to GitHub, then syncs your server and runs all remote optimizations in one shot.

FlagDescription`--dry-run`Simulates the entire pipeline — checks environments, builds assets, and tests the server connection — without touching your live server. Perfect for testing before a real deploy.`--debug`Prints raw network payloads, shell command statuses, and step-by-step error traces directly in your terminal.---

### Push to GitHub Only

[](#push-to-github-only)

```
php artisan push:github
```

Standalone Git command. Scans for uncommitted changes, prompts for a commit message, and pushes to your remote branch.

FlagDescription`--dry-run`Checks your uncommitted changes and active branch, but halts before staging or committing anything.`--debug`Streams raw Git execution output directly to your terminal.`--skip-assets`Bypasses local asset compilation (`npm run build`). Used internally by `push:hostinger` to ensure assets are only built once per full run.`--timeout=60`Maximum execution time in seconds for the Git push operation. Defaults to `60` if not specified.---

📐 Deployment Pipeline
---------------------

[](#-deployment-pipeline)

`push:hostinger` runs these phases in strict sequence:

1. **Environment Scan** — Validates and sanitizes all `.env` values before any network activity begins.
2. **Asset Compilation** — Detects `package.json`, installs dependencies if needed, and runs a production build.
3. **Git Commit &amp; Push** — Stages your changes, collects a commit message, and pushes to your remote branch.
4. **Server Connection** — Opens a passwordless SSH tunnel to Hostinger and confirms the target site directory exists.
5. **GitHub Trust Check** — Evaluates repository visibility. Generates and registers an RSA deploy key for private repos, or skips for public ones.
6. **Sync &amp; Optimize** — Pulls the latest code, streams compressed asset bundles, then runs the full remote chain:
    - Preserves your production `.env`
    - `composer install --no-dev --optimize-autoloader`
    - `php artisan migrate --force`
    - `php artisan storage:link`
    - `ln -sfn public public_html`
    - `php artisan optimize`

---

🛠 SSH Setup Guide
-----------------

[](#-ssh-setup-guide)

> One-time setup. Once done, ShipIt connects to your server automatically on every deploy.

**Official Hostinger reference:** [How to Generate SSH Keys and Add Them to hPanel → hostinger.com](https://www.hostinger.com/support/5634532-how-to-generate-ssh-keys-and-add-them-to-hostinger-hpanel)

---

### Step 1 — Enable SSH in hPanel

[](#step-1--enable-ssh-in-hpanel)

Log into **hPanel → SSH Access** and make sure SSH is enabled for your plan. Your SSH host, username, and port are all listed on this page — copy them into your `.env`.

[![Hostinger hPanel SSH Access details](https://camo.githubusercontent.com/8290463c901b2aefa983809b62516463020f4be75cb0edc95510fa3e624b2100/68747470733a2f2f7777772e686f7374696e6765722e636f6d2f737570706f72742f77702d636f6e74656e742f75706c6f6164732f73697465732f35352f323032352f30312f64353933663035662d326239622d346161642d616432332d3930396435323034376431322e6a7067)](https://camo.githubusercontent.com/8290463c901b2aefa983809b62516463020f4be75cb0edc95510fa3e624b2100/68747470733a2f2f7777772e686f7374696e6765722e636f6d2f737570706f72742f77702d636f6e74656e742f75706c6f6164732f73697465732f35352f323032352f30312f64353933663035662d326239622d346161642d616432332d3930396435323034376431322e6a7067)

---

### Step 2 — Generate an SSH Key Pair

[](#step-2--generate-an-ssh-key-pair)

Run **one** of these commands on your local machine:

**Ed25519** (recommended — modern, faster):

```
ssh-keygen -t ed25519 -N "" -f ~/.ssh/id_ed25519 -C "shipit"
```

**RSA 4096** (broader compatibility):

```
ssh-keygen -t rsa -b 4096 -N "" -f ~/.ssh/id_rsa -C "shipit"
```

The `-N ""` flag sets an empty passphrase automatically — no prompts, no hanging.

---

### Step 3 — Print &amp; Copy Your Public Key

[](#step-3--print--copy-your-public-key)

**Ed25519:**

```
cat ~/.ssh/id_ed25519.pub
```

**RSA:**

```
cat ~/.ssh/id_rsa.pub
```

Select and copy the entire output — it starts with `ssh-ed25519` or `ssh-rsa` and ends with `shipit`.

---

### Step 4 — Add the Key to Hostinger hPanel

[](#step-4--add-the-key-to-hostinger-hpanel)

1. In **hPanel → SSH Access**, click **Add SSH Key**.
2. Paste the copied key into the public key field.
3. Give it a name (e.g. `shipit`) and save.

---

### Step 5 — Test the Connection

[](#step-5--test-the-connection)

```
ssh -p YOUR_SSH_PORT YOUR_SSH_USERNAME@YOUR_SSH_HOST
```

If you land in the remote shell **with no password prompt**, you're all set. ShipIt is ready to deploy.

> If it still asks for a password, confirm the correct key was saved in hPanel and that SSH is enabled on your plan.

---

🔐 Generating a GitHub Fine-Grained Token
----------------------------------------

[](#-generating-a-github-fine-grained-token)

A Fine-grained Personal Access Token is required **only if your repository is private** and you want ShipIt to register the server's deploy key on GitHub automatically without any manual steps.

**1. Go to GitHub token settings:**

**2. Fill in the basics:**

- **Token name** — e.g. `shipit-deploy`
- **Expiration** — set to your comfort level (90 days recommended)
- **Resource owner** — select your account or org

**3. Under Repository access:**

- Choose **Only select repositories**
- Select the specific repo ShipIt will deploy

**4. Under Permissions → Repository permissions:**

- Find **Administration** and set it to **Read and Write**

> This is the only permission ShipIt needs — it uses it solely to register the server's deploy key on your repo so the server can pull code.

**5. Click Generate token**, copy it immediately, and add it to your `.env`:

```
GITHUB_API_TOKEN=github_pat_yourTokenHere
```

---

📄 License
---------

[](#-license)

The MIT License (MIT). Please see the [License File](LICENSE) for more details.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/159120489?v=4)[Nahid Hassan](/maintainers/zerofyi)[@zerofyi](https://github.com/zerofyi)

---

Top Contributors

[![zerofyi](https://avatars.githubusercontent.com/u/159120489?v=4)](https://github.com/zerofyi "zerofyi (5 commits)")

---

Tags

laravelsshgitdeploymenthostinger

### Embed Badge

![Health badge](/badges/zerofyi-shipit/health.svg)

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

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

9782.1M153](/packages/laravel-ai)[spatie/laravel-health

Monitor the health of a Laravel application

88011.3M149](/packages/spatie-laravel-health)[fadion/maneuver

Easily deploy Laravel projects via FTP or SFTP, using Git for versioning.

1739.1k](/packages/fadion-maneuver)[thecodeholic/laravel-hostinger-deploy

Laravel package for automated Hostinger deployment with GitHub Actions support

647.1k](/packages/thecodeholic-laravel-hostinger-deploy)[alegiac/laravel-release-manager

Automated release management for Laravel packages with Conventional Commits support

141.2k](/packages/alegiac-laravel-release-manager)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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