Yiisoft\Yii\Base\Cli\Commands\HelloController 0 1 1 2
    Yiisoft\Yii\Base\Cli\Commands\HelloController 0 1 1 2
    yii\cli\app\commands\HelloController 0 1 1 2
CA (Afferent Coupling)
Number of unique incoming dependencies from other artifacts of the same type.
CE (Efferent Coupling)
Number of unique outgoing dependencies to other artifacts of the same type.
CID (Class Interface Size)
Number of non private methods and properties of a class: CIS = public(NOM + VARS)
Measures the size of the interface from other parts of the system to a class.
Depth of Inheritance Tree
Depth of inheritance to root class
    "name": "yiisoft/yii-base-cli",
    "type": "library",
    "description": "Yii Framework Command Line Application Base",
    "keywords": ["yii", "framework", "application", "console", "cli"],
    "homepage": "https://github.com/yiisoft/yii-base-web",
    "license": "BSD-3-Clause",
    "support": {
        "source": "https://github.com/yiisoft/yii-base-cli",
        "issues": "https://github.com/yiisoft/yii-base-cli/issues",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii"
    "minimum-stability": "dev",
    "prefer-stable": true,
    "require": {
        "php": ">=7.2.0",
        "yiisoft/yii-console": "^3.0@dev",
        "yiisoft/di": "^3.0@dev",
        "yiisoft/log": "^3.0@dev",
        "yiisoft/cache": "^3.0@dev",
        "hiqdev/composer-config-plugin": "^1.0@dev",
        "yiisoft/view": "^3.0@dev"
    "require-dev": {
        "phpunit/phpunit": "^7.3"
    "extra": {
        "branch-alias": {
            "dev-master": "3.0.x-dev"
        "config-plugin": {
            "params": "config/params.php",
            "common": "config/common.php",
            "console": "config/console.php"
    "autoload": {
        "psr-4": {"Yiisoft\\Yii\\Base\\Cli\\": "src"}
    "autoload-dev": {
        "psr-4": {"Yiisoft\\Yii\\Base\\Cli\\Tests\\": "tests"}
    "config": {
        "process-timeout": 1800
yiisoft/yii-base-cli dependencies

Yii Framework

Yii Framework Command Line Application

This package is Yii Framework Command Line application best for rapidly creating projects.

The template includes all commonly used configurations that would allow you to focus on adding new features to your application.

Latest Stable Version Total Downloads Build Status


config/             contains application configurations
runtime/            contains files generated during runtime
  commands/           contains console commands (controllers)
tests/              contains various tests for the basic application
vendor/             contains dependent 3rd-party packages


The minimum requirement by this project template that your Web server supports PHP 7.2.


If you do not have Composer, you may install it by following the instructions at getcomposer.org.

You can then install this project template using the following command:

composer create-project --prefer-dist --stability=dev yiisoft/yii-base-cli myapp
cd myapp
./vendor/bin/yii serve

Now you should be able to access the application via http://localhost:8080/.



Edit the file config/db.php with real data, for example:

return [
    '__class' => \Yiisoft\Db\Connection::class,
    'dsn' => 'mysql:host=localhost;dbname=yii2basic;charset=utf8',
    'username' => 'root',
    'password' => '1234',


  • Yii won't create the database for you, this has to be done manually before you can access it.
  • Check and edit the other files in the config/ directory to customize your application as required.
  • Refer to the README in the tests directory for information specific to basic application tests.


Tests are located in tests directory.