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 11mo ago7 watchersCompare

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

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

30

—

LowBetter than 62% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity55

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

672d 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://avatars.githubusercontent.com/u/6832933?v=4)[Finsight Group Inc.](/maintainers/dealroadshow)[@dealroadshow](https://github.com/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

[oro/platform

Business Application Platform (BAP)

645143.5k114](/packages/oro-platform)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M568](/packages/shopware-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[prestashop/prestashop

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

9.1k17.8k](/packages/prestashop-prestashop)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

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