The interactive shell extension for Yii framework

Installs: 107 201

Dependents: 11

Suggesters: 0

Security: 0

Stars: 119

Watchers: 23

Forks: 18

Open Issues: 1


2.0.2 2019-01-07 21:30 UTC

This package is auto-updated.

Last update: 2020-01-06 14:14:17 UTC



Interactive Shell Extension for Yii 2

This extension provides an interactive shell for Yii framework 2.0 based on psysh.

For license information check the LICENSE-file.

Latest Stable Version Total Downloads


The preferred way to install this extension is through composer.

Either run

composer require yiisoft/yii2-shell

or add

"yiisoft/yii2-shell": "~2.0.0"

to the require section of your composer.json.


After installation, you will be able to run the interactive shell via command line:

# Change path to your application's root directory
cd path/to/myapp

# Start the interactive shell
./yii shell

You can access the application object using Yii::$app. Additionally you have access to all your and your dependencies' classes.

See psysh's website for a list of available features.


The following screenshot shows a usage example:

Usage example of Yii2 shell