PHPackages                             johnhenryspike/php-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. johnhenryspike/php-web-terminal

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

johnhenryspike/php-web-terminal
===============================

A minimal single-endpoint PHP web terminal emulator with Bearer auth.

1.1.0(3mo ago)0499↓50%MITPHPPHP &gt;=8.4

Since Oct 12Pushed 3mo agoCompare

[ Source](https://github.com/JohnHenrySpike/php-web-terminal)[ Packagist](https://packagist.org/packages/johnhenryspike/php-web-terminal)[ Docs](https://github.com/JohnHenrySpike/php-web-terminal)[ RSS](/packages/johnhenryspike-php-web-terminal/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

PHP Web Terminal (Single-Endpoint)
==================================

[](#php-web-terminal-single-endpoint)

A minimal web-based terminal emulator implemented in PHP. All interactions happen via one resource:

- GET /index.php → serves the UI
- POST /index.php (JSON) → executes whitelisted commands on the server via PHP handlers (no eval, no shell execution)

Features
--------

[](#features)

- Single endpoint (UI + API)
- Commands implemented as PHP functions only (no `eval`, no system command execution)
- Bearer token auth (token requested on page load and stored in localStorage)
- Minimal inline HTML/CSS/JS
- Client-side command history

Installation (Composer library)
-------------------------------

[](#installation-composer-library)

This project can be installed as a Composer library.

1. Require it in your project: ```
    composer require spike/php-web-terminal
    ```
2. Publish or serve the included web entry point `index.php`, or embed the services in your own controller.

Autoloading follows PSR-4: the `App\\` namespace maps to `src/`.

### Embedding as a library (example)

[](#embedding-as-a-library-example)

```
