PHPackages                             zowesoft/web-terminal - 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. [CLI &amp; Console](/categories/cli)
4. /
5. zowesoft/web-terminal

ActiveLibrary[CLI &amp; Console](/categories/cli)

zowesoft/web-terminal
=====================

A secure web-based terminal for Laravel applications — run Artisan, Git, Composer and shell commands from the browser.

v1.1.0(3w ago)07MITBladePHP ^8.1

Since May 15Pushed 3w agoCompare

[ Source](https://github.com/Zowesoft/web-terminal)[ Packagist](https://packagist.org/packages/zowesoft/web-terminal)[ Docs](https://github.com/Zowesoft/web-terminal)[ RSS](/packages/zowesoft-web-terminal/feed)WikiDiscussions main Synced 1w ago

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

🖥️ Laravel Web Terminal
=======================

[](#️-laravel-web-terminal)

A secure, browser-based terminal for Laravel applications. Run Artisan, Git, Composer and shell commands directly from your browser — perfect for shared hosting environments where SSH access is unavailable.

---

Features
--------

[](#features)

- 🔐 **Dual security** — requires both Laravel auth session AND a personal terminal token
- ⚙️ **Artisan support** — run any Artisan command natively via `Artisan::call()`
- 🌿 **Git support** — `git pull`, `git status`, `git log` and more
- 📦 **Composer support** — `composer install`, `dump-autoload`, etc.
- 🛡️ **Command blacklist** — blocks dangerous commands like `rm -rf /`
- 🕹️ **Command history** — navigate previous commands with arrow keys
- ✏️ **Customisable** — publish config, views and migrations to override anything
- 🚀 Compatible with Laravel 9, 10, 11, 12 and 13

---

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 9.x / 10.x / 11.x / 12.x / 13.x
- `proc_open` or `shell_exec` enabled on your server (for shell commands)

> **Note:** Artisan commands work even if `shell_exec` is disabled, since they run in-process.

---

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

[](#installation)

### 1. Install via Composer

[](#1-install-via-composer)

```
composer require Zowesoft/web-terminal
```

### 2. Publish and run the migration

[](#2-publish-and-run-the-migration)

```
php artisan vendor:publish --tag=web-terminal-migrations
php artisan migrate
```

This adds two columns to your `users` table:

- `is_admin` — boolean flag to grant terminal access
- `terminal_token` — the secret token required to unlock the terminal

### 3. Grant yourself access

[](#3-grant-yourself-access)

```
php artisan tinker
```

```
$user = User::where('email', 'you@example.com')->first();
$user->is_admin       = true;
$user->terminal_token = bin2hex(random_bytes(32));
$user->save();

// Copy this token — you'll need it to log in to the terminal
echo $user->terminal_token;
```

### 4. Visit the terminal

[](#4-visit-the-terminal)

```
https://yourapp.com/admin/terminal

```

Log in with your Laravel account, paste your token when prompted, and you're in.

---

Publishing
----------

[](#publishing)

You can publish various parts of the package for customisation:

```
# Publish everything
php artisan vendor:publish --provider="Zowesoft\WebTerminal\WebTerminalServiceProvider"

# Publish only the config file
php artisan vendor:publish --tag=web-terminal-config

# Publish only the views (UI)
php artisan vendor:publish --tag=web-terminal-views

# Publish only the migrations
php artisan vendor:publish --tag=web-terminal-migrations
```

---

Configuration
-------------

[](#configuration)

Publish the config file to customise behaviour:

```
php artisan vendor:publish --tag=web-terminal-config
```

```
// config/web-terminal.php

return [
    'prefix'       => 'admin',          // URL prefix: /admin/terminal
    'middleware'   => ['web', 'auth'],  // Applied to all terminal routes
    'timeout'      => 120,              // Max seconds per command
    'admin_column' => 'is_admin',       // Column that marks admin users
    'token_column' => 'terminal_token', // Column that stores the token

    'blacklist' => [
        'rm -rf /',
        'rm -rf *',
        // add more blocked commands here
    ],

    'path' => '/usr/local/bin:/usr/bin:/bin', // Shell PATH for finding executables
];
```

---

Customising the UI
------------------

[](#customising-the-ui)

Publish the views to override the terminal interface:

```
php artisan vendor:publish --tag=web-terminal-views
```

This copies the view to `resources/views/vendor/web-terminal/index.blade.php` where you can freely edit it.

---

Environment Variables
---------------------

[](#environment-variables)

You can configure the package via `.env` without publishing the config:

```
WEB_TERMINAL_PREFIX=admin
WEB_TERMINAL_TIMEOUT=120
WEB_TERMINAL_PATH=/usr/local/bin:/usr/bin:/bin
```

---

Security
--------

[](#security)

This package uses two independent security layers:

```
Request → auth middleware → is_admin check → token check → command runs

```

1. **Laravel auth** — user must be logged in
2. **Admin flag** — `is_admin` must be `true` on the user record
3. **Terminal token** — a per-user secret sent as `X-Terminal-Token` on every request

Recommendations:

- Use a strong, unique token per user (the `bin2hex(random_bytes(32))` approach gives 64 hex chars)
- Add IP allowlisting via `.htaccess` or your server config for extra protection
- Consider disabling the terminal route in production when not in use via config

---

Available Commands
------------------

[](#available-commands)

CategoryExamplesArtisan`artisan migrate --force`, `artisan cache:clear`, `artisan optimize`Git`git pull origin main`, `git status`, `git log --oneline -10`Composer`composer install --no-dev`, `composer dump-autoload`PHP/Shell`php -v`, `ls -la`, `pwd`Built-in`help`, `clear`---

Troubleshooting
---------------

[](#troubleshooting)

**Shell commands return no output**Your host likely has `shell_exec` / `proc_open` disabled. Artisan commands will still work. Check with:

```
php -r "echo shell_exec('php -v');"
```

**`git` or `composer` not found**Add the correct binary paths to `WEB_TERMINAL_PATH` in your `.env`. Find the path with:

```
which git
which composer
```

**403 on every request**Make sure you have run the migration, set `is_admin = true` on your user, and are sending the correct token.

---

License
-------

[](#license)

MIT — see [LICENSE](LICENSE) for details.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance95

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

25d ago

PHP version history (2 changes)v1.0.0PHP ^8.0

v1.1.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/a7b4252ffb8e6587c9b38d9eff586f7a321001b4f16fb08f5d9f78773f8c8de4?d=identicon)[zowesoft](/maintainers/zowesoft)

---

Top Contributors

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

---

Tags

terminallaravelshellartisangitweb-terminal

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zowesoft-web-terminal/health.svg)

```
[![Health](https://phpackages.com/badges/zowesoft-web-terminal/health.svg)](https://phpackages.com/packages/zowesoft-web-terminal)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76318.2M110](/packages/laravel-mcp)[spatie/laravel-health

Monitor the health of a Laravel application

88011.3M149](/packages/spatie-laravel-health)[api-platform/laravel

API Platform support for Laravel

59156.3k10](/packages/api-platform-laravel)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1232.2k16](/packages/fleetbase-core-api)

PHPackages © 2026

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