PHPackages                             calcinai/gendarme - 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. calcinai/gendarme

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

calcinai/gendarme
=================

Application to generate constrained SKDs based on JSON schemas

v0.1.2(9y ago)4171[1 PRs](https://github.com/calcinai/gendarme/pulls)MITPHP

Since Oct 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/calcinai/gendarme)[ Packagist](https://packagist.org/packages/calcinai/gendarme)[ RSS](/packages/calcinai-gendarme/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

Gendarme
========

[](#gendarme)

A tool for creating PHP data structures from [JSON Schemas](http://json-schema.org).

Setup
-----

[](#setup)

via composer

```
composer create-project calcinai/gendarme

```

Usage
-----

[](#usage)

From the project root:

```
./bin/gendarme generate --namespace [TARGET_NAMESPACE] --root-class [ROOT_CLASS]  [SCHEMA_FILE].json [OUTPUT_DIR]

```

Output
------

[](#output)

All models will be PSR-4 compliant based on the arguments given at runtime. A typical output folder structure will be as follows:

```
- OUTPUT_DIR
  - BaseSchema.php (the class all models extend)
  - RootClass.php (the --root-class argument)
  - Definitions
    - ...
    - ...

```

This project was started to generate the schema files for [Strut](https://github.com/calcinai/strut), a Swagger/OAPI manipulation library. Although a very complex example, it shows the basic output structure that will be generated.

The generated models will include type-hinting to other models where possible, and non-hintable objects will be put in the doc blocks. At this point, many, but not all schema keywords are parsed. As more desired functionality is identified, more can be implemented.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~29 days

Total

3

Last Release

3449d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2415868?v=4)[Michael Calcinai](/maintainers/calcinai)[@calcinai](https://github.com/calcinai)

---

Top Contributors

[![calcinai](https://avatars.githubusercontent.com/u/2415868?v=4)](https://github.com/calcinai "calcinai (42 commits)")

### Embed Badge

![Health badge](/badges/calcinai-gendarme/health.svg)

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

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k26.2M1.8k](/packages/infection-infection)[roave/backward-compatibility-check

Tool to compare two revisions of a public API to check for BC breaks

5953.3M56](/packages/roave-backward-compatibility-check)[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4723.6M20](/packages/coenjacobs-mozart)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[friendsofphp/pickle

Installer for PHP extension, supports pecl package or install from src tree directly

1.7k3.3k](/packages/friendsofphp-pickle)

PHPackages © 2026

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