PHPackages                             dealroadshow/kodegen - 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. dealroadshow/kodegen

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dealroadshow/kodegen
====================

Generates PHP classes from json schema, including Kubernetes json schema

v0.4.2(4y ago)261[1 PRs](https://github.com/dealroadshow/kodegen/pulls)MITPHPPHP &gt;=8.0

Since Oct 6Pushed 9mo ago7 watchersCompare

[ Source](https://github.com/dealroadshow/kodegen)[ Packagist](https://packagist.org/packages/dealroadshow/kodegen)[ RSS](/packages/dealroadshow-kodegen/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (10)Versions (9)Used By (0)

Dealroadshow Kodegen
====================

[](#dealroadshow-kodegen)

This project provides cli to generate PHP classes for Kubernetes API objects. It uses official Kubernetes API json schema in order to generate classes for all API objects that corresponding Kubernetes version provides.

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

[](#installation)

The recommended way to install Kodegen is Composer. Install `kodegen` cli globally and use it anywhere, as long as Composer `vendor/bin` directory is in your `PATH`. Usually this dir is `$HOME/.composer/vendor/bin`.

```
composer global require dealroadshow/kodegen
```

Usage
-----

[](#usage)

### For generic json schemas

[](#for-generic-json-schemas)

In order to generate PHP code from generic json schema, just run the following command:

```
kodegen json-schema:generate:php path/to/json-schema-file.json

```

It will guide you through the generation process interactively.

### For Kubernetes json schema

[](#for-kubernetes-json-schema)

At first you want to determine the latest API versions for chosen Kubernetes version. For example, the latest json schema version for Kubernetes v1.20 is v1.20.10. In order to get this versions, run command:

```
k8s:schema:versions [number of latest Kubernetes versions].

```

The output of this command may look like follows:

```
kodegen k8s:schema:versions 4
{"v1.19":"v1.19.14","v1.20":"v1.20.10","v1.21":"v1.21.4","v1.22":"v1.22.0"}

```

After that you may use this json to retrieve Kubernetes json schema:

```
export DEALROADSHOW_KODEGEN_JSON_SCHEMA_VERSIONS='{"v1.19":"v1.19.14","v1.20":"v1.20.10","v1.21":"v1.21.4","v1.22":"v1.22.0"}'
kodegen k8s:schema:fetch /tmp/kubernetes-schema.json

```

The command above will let you chose one on Kubernetes versions, defined in `DEALROADSHOW_KODEGEN_JSON_SCHEMA_VERSIONS` env variable.

When you have your Kubernetes json schema, you can generate PHP classes from it:

```
kodegen k8s:generate:php /tmp/kubernetes-schema.json

```

This command will guide you through the generation process interactively.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance40

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

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

Recently: every ~336 days

Total

7

Last Release

618d ago

Major Versions

v0.4.2 → v1.33.x-dev2024-08-29

PHP version history (4 changes)v0.1.0PHP ^7.4

v0.2.0PHP ^8.0

v0.4.1PHP &gt;=8.0

v1.33.x-devPHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/9adf705447d5690c63cd0eb4fbb036a2abca73933f1fe29e3cb0cdf738623e90?d=identicon)[dealroadshow](/maintainers/dealroadshow)

---

Top Contributors

[![petr-buchin](https://avatars.githubusercontent.com/u/11417582?v=4)](https://github.com/petr-buchin "petr-buchin (10 commits)")[![petr-buchyn](https://avatars.githubusercontent.com/u/54354491?v=4)](https://github.com/petr-buchyn "petr-buchyn (5 commits)")

---

Tags

managed-by-terraformopensourcephp

### Embed Badge

![Health badge](/badges/dealroadshow-kodegen/health.svg)

```
[![Health](https://phpackages.com/badges/dealroadshow-kodegen/health.svg)](https://phpackages.com/packages/dealroadshow-kodegen)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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