PHPackages                             webkul/code-generator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. webkul/code-generator

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

webkul/code-generator
=====================

module lets you generate models, controller, helpers in seconds so that you can focus more on application logic

2.0.8(2y ago)422.3k16[1 issues](https://github.com/webkul/magento2-code-generator/issues)proprietaryPHP

Since Nov 26Pushed 2y ago5 watchersCompare

[ Source](https://github.com/webkul/magento2-code-generator)[ Packagist](https://packagist.org/packages/webkul/code-generator)[ RSS](/packages/webkul-code-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)DependenciesVersions (12)Used By (0)

Code Generator For Magento2
===========================

[](#code-generator-for-magento2)

Installation
============

[](#installation)

`composer require webkul/code-generator`

`php -f bin/magento setup:upgrade`

User Guide
==========

[](#user-guide)

- [Magento 2 Code Generator](https://webkul.com/blog/magento-2-code-generator/)

Usage
=====

[](#usage)

- To create new Module

`php bin/magento generate:code Module_Name --type=new-module `

- To create models

`php bin/magento generate:code Module_Name --table="table_name" --type=model --name=ModelName`

If you have created the db\_schema file for the table in the above command, it will automatically create setter and getter of all the columns in the schema.

- To create repositories

`php bin/magento generate:code Module_Name --type=repository --name=RepositoryClassName --model-class=ModelClassFullName --collection-class=CollectionClassFullName`

- To create controller

`php bin/magento generate:code Module_Name --type=controller --name=ControllerName --area=frontend|adminhtml --path=RelativeToModuleControolerFolder --router=RouteName`

- To create helper

`php bin/magento generate:code Module_Name --type=helper --name=HelperName `

- To create payment method

`php bin/magento generate:code Module_Name --type=payment --name=MethodName --payment-code=PaymentMethodCode`

- To create shipping method

`php bin/magento generate:code Module_Name --type=shipping --shipping-code=custom_shipping`

- To create Plugin

`php bin/magento generate:code Module_Name --type=plugin --name=PluginName --plugin=FullClassName [--area=frontend|adminhtml] `

- To create observer

`php bin/magento generate:code Module_Name --type=observer --name=ObserverName --event=event_name [--area=frontend|adminhtml] `

- To create cron

`php bin/magento generate:code Module_Name --type=cron --name=CronName [--schedule="0 1 * * *"] `

- To create unit test cases

`php bin/magento generate:code Module_Name --type=unit-test `

- To create view

`php bin/magento generate:code Module_Name --type=create-view --name=webkul_index_index --area=adminhtml --block-class=Main --template=hello.phtml --layout-type=admin-2column-left`

`--block-class`, `--template`, `--layout-type` are optional.

- To create logger

`php bin/magento generate:code Module_Name --type=logger [--name=loggerfile] `

- To create command

`php bin/magento generate:code Module_Name --type=command --name=CommandClass --command='test:hello' `

- To override/rewrite a class (Block, Model, Controller)

`php bin/magento generate:code Module_Name --type=rewrite --name=ClassName --rewrite='OverriddenClass' [--path=RelativeToModuleFolder] `

- To create email template

`php bin/magento generate:code Module_Name --type=email --name="Email Label" [--id="module_email_test"] [--template="test"] `

- To create Ui Grid Listing

`php bin/magento generate:code Module_Name --type=ui_component_listing --name="test_test" [--columns_name="test_column"] [--model_class_name="Model Class Name"][--table="Table Name"]  `

- To create Ui Component Form

`php bin/magento generate:code Module_Name --type=ui_component_form --name="test_test_form" [--provider_name="Data Provider Name"] [--model_class_name="Model Class Name"] [--fieldset_name="Field Set Name"] [--fieldset_label="Field Set Label"] [--submit_url="Form Submit Url"] [--form_field="Form Fields in Json Format"]`

` Ex : form_field = '[{"field_name": "test_input_field", "field_type": "input", "field_label": "Test Input Field", "is_required": "true"}, {"field_name": "test_image_field", "field_type": "imageUploader", "field_label": "Image Uploader", "is_required": "false", "image_upload_url": "test/test/upload"}]'`

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity64

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

Recently: every ~401 days

Total

10

Last Release

735d ago

Major Versions

1.0.0 → 2.0.02019-12-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/87f400f19d2c602040b38dc2db6412c18f8c1ee7405e40a06bf4a21f24ea12c7?d=identicon)[webkul](/maintainers/webkul)

---

Top Contributors

[![mahesh-rajawat](https://avatars.githubusercontent.com/u/32479280?v=4)](https://github.com/mahesh-rajawat "mahesh-rajawat (7 commits)")[![VikasTiwari-Webkul](https://avatars.githubusercontent.com/u/59952963?v=4)](https://github.com/VikasTiwari-Webkul "VikasTiwari-Webkul (5 commits)")[![webkul](https://avatars.githubusercontent.com/u/519857?v=4)](https://github.com/webkul "webkul (3 commits)")

### Embed Badge

![Health badge](/badges/webkul-code-generator/health.svg)

```
[![Health](https://phpackages.com/badges/webkul-code-generator/health.svg)](https://phpackages.com/packages/webkul-code-generator)
```

###  Alternatives

[laravel-frontend-presets/vuetify

Laravel 5.5+ Front-end preset for vuetify

8013.4k](/packages/laravel-frontend-presets-vuetify)[bigperson/auto-base-buy

The package allows you to access data through the base car by model

173.6k](/packages/bigperson-auto-base-buy)

PHPackages © 2026

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