PHPackages                             yiisoft/yii2-shell - 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. [Framework](/categories/framework)
4. /
5. yiisoft/yii2-shell

ActiveYii2-extension[Framework](/categories/framework)

yiisoft/yii2-shell
==================

The interactive shell extension for Yii framework

2.0.6(1y ago)1362.7M—7.7%2020BSD-3-ClausePHPCI failing

Since Nov 22Pushed 1y ago22 watchersCompare

[ Source](https://github.com/yiisoft/yii2-shell)[ Packagist](https://packagist.org/packages/yiisoft/yii2-shell)[ Fund](https://opencollective.com/yiisoft)[ RSS](/packages/yiisoft-yii2-shell/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (8)Used By (20)

 [ ![](https://avatars0.githubusercontent.com/u/993323) ](https://github.com/yiisoft)

Interactive Shell Extension for Yii 2
=====================================

[](#interactive-shell-extension-for-yii-2)

This extension provides an interactive shell for [Yii framework 2.0](https://www.yiiframework.com) based on [psysh](https://psysh.org/).

For license information check the [LICENSE](LICENSE.md)-file.

[![Latest Stable Version](https://camo.githubusercontent.com/43f10584e5136d91688d19bf5506afa36a1f38d6d0f597845f6de95ca9fe764b/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d7368656c6c2f762f737461626c652e706e67)](https://packagist.org/packages/yiisoft/yii2-shell)[![Total Downloads](https://camo.githubusercontent.com/814df927fc49527da20237674a7934307ba5c522839105f2e063879573d4a40f/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d7368656c6c2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/yiisoft/yii2-shell)

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

[](#installation)

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

Either run

```
composer require yiisoft/yii2-shell

```

or add

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

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

Usage
-----

[](#usage)

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](https://psysh.org/#features) for a list of available features.

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

[](#configuration)

You can configure the PsySH shell by setting options via the `shellConfig` variable in the controller, i.e. add this to your console application configuration:

```
'controllerMap' => [
    'shell' => [
        'shellConfig' => [
            'updateCheck' => 'weekly',
            'verbosity' => \Psy\Configuration::VERBOSITY_VERBOSE,
        ],
    ],
],

```

See  for a list of PsySH configurable options.

**Note**: `updateCheck` is explictly set to *never* by yii2-shell. All other PsySH options use default values.

Screenshot
----------

[](#screenshot)

The following screenshot shows a usage example:

[![Usage example of Yii2 shell](screenshot.png)](screenshot.png)

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance43

Moderate activity, may be stable

Popularity58

Moderate usage in the ecosystem

Community44

Growing community involvement

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~500 days

Recently: every ~557 days

Total

7

Last Release

459d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/261a6249c6f605f3956a2fae40fbb813f6b2e1e6f2bf806180c851a965426e54?d=identicon)[cebe](/maintainers/cebe)

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

![](https://www.gravatar.com/avatar/23416c58e0dce33a8369451a4ca0e28666373594027debc10184b37ade6a926b?d=identicon)[qiangxue](/maintainers/qiangxue)

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

---

Top Contributors

[![samdark](https://avatars.githubusercontent.com/u/47294?v=4)](https://github.com/samdark "samdark (23 commits)")[![pana1990](https://avatars.githubusercontent.com/u/6630197?v=4)](https://github.com/pana1990 "pana1990 (11 commits)")[![cebe](https://avatars.githubusercontent.com/u/189796?v=4)](https://github.com/cebe "cebe (7 commits)")[![bizley](https://avatars.githubusercontent.com/u/8577314?v=4)](https://github.com/bizley "bizley (3 commits)")[![Arhell](https://avatars.githubusercontent.com/u/26163841?v=4)](https://github.com/Arhell "Arhell (3 commits)")[![SilverFire](https://avatars.githubusercontent.com/u/4499203?v=4)](https://github.com/SilverFire "SilverFire (2 commits)")[![machour](https://avatars.githubusercontent.com/u/304450?v=4)](https://github.com/machour "machour (1 commits)")[![ricpelo](https://avatars.githubusercontent.com/u/616169?v=4)](https://github.com/ricpelo "ricpelo (1 commits)")[![tobiase](https://avatars.githubusercontent.com/u/487379?v=4)](https://github.com/tobiase "tobiase (1 commits)")[![wa1kb0y](https://avatars.githubusercontent.com/u/5966172?v=4)](https://github.com/wa1kb0y "wa1kb0y (1 commits)")[![flaviovs](https://avatars.githubusercontent.com/u/1832699?v=4)](https://github.com/flaviovs "flaviovs (1 commits)")[![JasonStainton](https://avatars.githubusercontent.com/u/27767499?v=4)](https://github.com/JasonStainton "JasonStainton (1 commits)")[![javiereguiluz](https://avatars.githubusercontent.com/u/73419?v=4)](https://github.com/javiereguiluz "javiereguiluz (1 commits)")[![jiminald](https://avatars.githubusercontent.com/u/459842?v=4)](https://github.com/jiminald "jiminald (1 commits)")[![kyle-mccarthy](https://avatars.githubusercontent.com/u/7758522?v=4)](https://github.com/kyle-mccarthy "kyle-mccarthy (1 commits)")

---

Tags

hacktoberfestphppsyshshellyiiyii2shellyii2

### Embed Badge

![Health badge](/badges/yiisoft-yii2-shell/health.svg)

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

###  Alternatives

[laravel/tinker

Powerful REPL for the Laravel framework.

7.4k423.8M1.8k](/packages/laravel-tinker)[yiisoft/yii2-twig

The Twig integration for the Yii framework

1431.9M32](/packages/yiisoft-yii2-twig)[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[tecnocen/yii2-formgenerator

Yii 2 Library to configure form generator

145.7k](/packages/tecnocen-yii2-formgenerator)

PHPackages © 2026

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