PHPackages                             yiisoft/yii2-gii - 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-gii

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

yiisoft/yii2-gii
================

The Gii extension for the Yii framework

2.2.7(1y ago)21118.4M—4.1%189[22 PRs](https://github.com/yiisoft/yii2-gii/pulls)20BSD-3-ClausePHPCI passing

Since Dec 1Pushed 3mo ago34 watchersCompare

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

READMEChangelogDependencies (5)Versions (27)Used By (20)Security (3)

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

Gii Extension for Yii 2
=======================

[](#gii-extension-for-yii-2)

This extension provides a Web-based code generator, called Gii, for [Yii framework 2.0](https://www.yiiframework.com) applications. You can use Gii to quickly generate models, forms, modules, CRUD, etc.

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

Documentation is at [docs/guide/README.md](docs/guide/README.md).

[![Latest Stable Version](https://camo.githubusercontent.com/e94771047cfa5e5b2a8416728f5c8f76f232dfd29e595a9fec929f48f2f068db/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d6769692f762f737461626c652e706e67)](https://packagist.org/packages/yiisoft/yii2-gii)[![Total Downloads](https://camo.githubusercontent.com/b1b3913a3f71264808ef3b79c439b1fa593a05e78f98035b4f15beb86e3af161/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d6769692f646f776e6c6f6164732e706e67)](https://packagist.org/packages/yiisoft/yii2-gii)[![Build Status](https://github.com/yiisoft/yii2-gii/workflows/build/badge.svg)](https://github.com/yiisoft/yii2-gii/actions)[![codecov](https://camo.githubusercontent.com/0f4b6a048ba6e184432454238e3aa91e11f3fea655a4fca28bbdf9e4ce2ab11a/68747470733a2f2f636f6465636f762e696f2f67682f796969736f66742f796969322d6769692f67726170682f62616467652e737667)](https://codecov.io/gh/yiisoft/yii2-gii)

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

[](#installation)

Important

- The minimum required [PHP](https://www.php.net/) version is PHP `7.4`.
- It works best with PHP `8`.

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

Either run

```
php composer.phar require --dev --prefer-dist yiisoft/yii2-gii

```

or add

```
"yiisoft/yii2-gii": "~2.1.0"

```

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

Usage
-----

[](#usage)

Once the extension is installed, simply modify your application configuration as follows:

```
return [
    'bootstrap' => ['gii'],
    'modules' => [
        'gii' => [
            'class' => 'yii\gii\Module',
        ],
        // ...
    ],
    // ...
];
```

You can then access Gii through the following URL:

```
http://localhost/path/to/index.php?r=gii

```

or if you have enabled pretty URLs, you may use the following URL:

```
http://localhost/path/to/index.php/gii

```

Using the same configuration for your console application, you will also be able to access Gii via command line as follows,

```
# change path to your application's base path
cd path/to/AppBasePath

# show help information about Gii
yii help gii

# show help information about the model generator in Gii
yii help gii/model

# generate City model from city table
yii gii/model --tableName=city --modelClass=City

```

###  Health Score

67

—

FairBetter than 100% of packages

Maintenance64

Regular maintenance activity

Popularity68

Solid adoption and visibility

Community59

Growing community involvement

Maturity73

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

Recently: every ~311 days

Total

26

Last Release

357d ago

Major Versions

2.2.7 → 22.x-dev2025-05-26

### 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)

---

Top Contributors

[![qiangxue](https://avatars.githubusercontent.com/u/993322?v=4)](https://github.com/qiangxue "qiangxue (1970 commits)")[![cebe](https://avatars.githubusercontent.com/u/189796?v=4)](https://github.com/cebe "cebe (784 commits)")[![samdark](https://avatars.githubusercontent.com/u/47294?v=4)](https://github.com/samdark "samdark (757 commits)")[![klimov-paul](https://avatars.githubusercontent.com/u/1482054?v=4)](https://github.com/klimov-paul "klimov-paul (335 commits)")[![creocoder](https://avatars.githubusercontent.com/u/896494?v=4)](https://github.com/creocoder "creocoder (150 commits)")[![resurtm](https://avatars.githubusercontent.com/u/100198?v=4)](https://github.com/resurtm "resurtm (123 commits)")[![tonydspaniard](https://avatars.githubusercontent.com/u/566016?v=4)](https://github.com/tonydspaniard "tonydspaniard (103 commits)")[![Ragazzo](https://avatars.githubusercontent.com/u/1748844?v=4)](https://github.com/Ragazzo "Ragazzo (75 commits)")[![lucianobaraglia](https://avatars.githubusercontent.com/u/374554?v=4)](https://github.com/lucianobaraglia "lucianobaraglia (56 commits)")[![suralc](https://avatars.githubusercontent.com/u/730039?v=4)](https://github.com/suralc "suralc (46 commits)")[![thiagotalma](https://avatars.githubusercontent.com/u/612578?v=4)](https://github.com/thiagotalma "thiagotalma (41 commits)")[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (37 commits)")[![pmoust](https://avatars.githubusercontent.com/u/2493339?v=4)](https://github.com/pmoust "pmoust (36 commits)")[![slavcodev](https://avatars.githubusercontent.com/u/757721?v=4)](https://github.com/slavcodev "slavcodev (20 commits)")[![WinterSilence](https://avatars.githubusercontent.com/u/3521094?v=4)](https://github.com/WinterSilence "WinterSilence (19 commits)")[![LarryUllman](https://avatars.githubusercontent.com/u/1674823?v=4)](https://github.com/LarryUllman "LarryUllman (18 commits)")[![kartik-v](https://avatars.githubusercontent.com/u/3592619?v=4)](https://github.com/kartik-v "kartik-v (17 commits)")[![SilverFire](https://avatars.githubusercontent.com/u/4499203?v=4)](https://github.com/SilverFire "SilverFire (15 commits)")[![nineinchnick](https://avatars.githubusercontent.com/u/795177?v=4)](https://github.com/nineinchnick "nineinchnick (14 commits)")[![bwoester](https://avatars.githubusercontent.com/u/309565?v=4)](https://github.com/bwoester "bwoester (12 commits)")

---

Tags

code-generatorhacktoberfestphpyiiyii2devcode generatoryii2gii

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[yiisoft/yii2-debug

The debugger extension for the Yii framework

20323.5M598](/packages/yiisoft-yii2-debug)

PHPackages © 2026

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