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

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

asinfotrack/yii2-webshell
=========================

Yii2-Webshell allows you to execute any shell command from a web-interface.

0.8.1(7y ago)4774MITPHPPHP &gt;=5.4.0CI failing

Since Jan 11Pushed 7y ago5 watchersCompare

[ Source](https://github.com/asinfotrack/yii2-webshell)[ Packagist](https://packagist.org/packages/asinfotrack/yii2-webshell)[ RSS](/packages/asinfotrack-yii2-webshell/feed)WikiDiscussions master Synced today

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

yii2-webshell
=============

[](#yii2-webshell)

Yii2-Webshell allows you to execute any shell command from a web-interface. This is especially useful to call console-commands from the frontend. The execution is done via AJAX and a special action-class (`ShellAction`).

The output of the shell action **is displayed live** (line by line).

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

[](#installation)

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

```
"asinfotrack/yii2-webshell": "0.8.*"

```

Changelog
---------

[](#changelog)

[Learn about the latest improvements](https://github.com/asinfotrack/yii2-webshell/blob/master/changelog.md)

Contents
--------

[](#contents)

### Components

[](#components)

###### ShellAction

[](#shellaction)

This is the action you can attach to any controller via its `actions()`-method. Here you define who and who the action can be accessed. All the regular RBAC-controls are of course available.

The following is an example for a configuration calling a yii-console-command under windows:

```
class MyController extends \yii\web\Controller
{

	//...

	public function actions()
	{
		return [
			'my-shell-action'=>[
				'class'=>'asinfotrack\yii2\webshell\actions\ShellAction',
				'command'=>'php "c:\path\to\my_yii2_application\yii" my-console-command/index',
			],
		];
	}

	//...

}
```

### Widgets

[](#widgets)

###### ShellWidget

[](#shellwidget)

The widget allows you to create a console like container in your views, which communicates with a `ShellAction`as documented above. The following represents a full configuration:

```
