PHPackages                             samdark/yii2-webshell - 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. samdark/yii2-webshell

ActiveYii2-extension[CLI &amp; Console](/categories/cli)

samdark/yii2-webshell
=====================

A web shell that allows to run yii console commands and create your own commands.

2.0.0(10y ago)22585.3k↓38.6%36[3 issues](https://github.com/samdark/yii2-webshell/issues)[2 PRs](https://github.com/samdark/yii2-webshell/pulls)2BSD-3-ClausePHP

Since Aug 7Pushed 7y ago31 watchersCompare

[ Source](https://github.com/samdark/yii2-webshell)[ Packagist](https://packagist.org/packages/samdark/yii2-webshell)[ RSS](/packages/samdark-yii2-webshell/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (2)

Yii 2.0 web shell
=================

[](#yii-20-web-shell)

Web shell allows to run `yii` console commands using a browser.

[![](screenshot.png)](screenshot.png)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist samdark/yii2-webshell "~2.0"

```

or add

```
"samdark/yii2-webshell": "~2.0"

```

to the require section of your `composer.json` file.

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

[](#configuration)

To use web shell, include it as a module in the application configuration like the following:

```
return [
    'modules' => [
        'webshell' => [
            'class' => 'samdark\webshell\Module',
            // 'yiiScript' => Yii::getAlias('@root'). '/yii', // adjust path to point to your ./yii script
        ],
    ],

    // ... other application configuration
]
```

With the above configuration, you will be able to access web shell in your browser using the URL `http://localhost/path/to/index.php?r=webshell`

Access control
--------------

[](#access-control)

By default access is restricted to local IPs. It could be changed via `allowedIPs` property. Additionally, `checkAccessCallback` is available to be able to introduce custom access control:

```
return [
    'modules' => [
        'webshell' => [
            'class' => 'samdark\webshell\Module',
            // 'yiiScript' => Yii::getAlias('@root'). '/yii', // adjust path to point to your ./yii script
            'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.2'],
            'checkAccessCallback' => function (\yii\base\Action $action) {
                // return true if access is granted or false otherwise
                return true;
            }
        ],
    ],

    // ... other application configuration
]
```

Limitations
-----------

[](#limitations)

Web shell is unable to work interactively because of request-response nature of web. Therefore you should disable interactive mode for commands.

###  Health Score

43

—

FairBetter than 90% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity50

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 71.4% 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 ~104 days

Total

3

Last Release

3763d ago

Major Versions

1.0.1 → 2.0.02016-03-04

### Community

Maintainers

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

---

Top Contributors

[![samdark](https://avatars.githubusercontent.com/u/47294?v=4)](https://github.com/samdark "samdark (10 commits)")[![YaroslavShapoval](https://avatars.githubusercontent.com/u/2136103?v=4)](https://github.com/YaroslavShapoval "YaroslavShapoval (2 commits)")[![cebe](https://avatars.githubusercontent.com/u/189796?v=4)](https://github.com/cebe "cebe (1 commits)")[![unasoft](https://avatars.githubusercontent.com/u/24616765?v=4)](https://github.com/unasoft "unasoft (1 commits)")

---

Tags

shellweb-shellyii2consoleshellyii2extensionwebshell

### Embed Badge

![Health badge](/badges/samdark-yii2-webshell/health.svg)

```
[![Health](https://phpackages.com/badges/samdark-yii2-webshell/health.svg)](https://phpackages.com/packages/samdark-yii2-webshell)
```

###  Alternatives

[toriphes/yii2-console-runner

Runs console command in yii web application

29248.0k](/packages/toriphes-yii2-console-runner)[vova07/yii2-console-runner-extension

An extension for running console commands on background in Yii framework.

88209.0k2](/packages/vova07-yii2-console-runner-extension)[fedemotta/yii2-cronjob

Yii2 extension to help in the creation of automated console scripts

2233.9k](/packages/fedemotta-yii2-cronjob)[trntv/yii2-tactician

A simple, flexible command bus. This package provide it's integration with Yii2

1459.2k](/packages/trntv-yii2-tactician)

PHPackages © 2026

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