PHPackages                             robertbakker/php-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. robertbakker/php-code-generator

ActiveLibrary

robertbakker/php-code-generator
===============================

04PHP

Since Jun 20Pushed 4y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

PHP Code generator for PHP 8+
=============================

[](#php-code-generator-for-php-8)

Generate often used code by answering simple questions on the command line. The goal is to have an intelligent code generator which understands your project.

This is very early work, do not use.

Instruction
-----------

[](#instruction)

```
composer require --dev robertbakker/php-code-generator

```

Make a `.env.local` file in the root of the project containing the value:

```
CODE_GENERATOR_NAMESPACE=Your\Name\Space

```

Usage
-----

[](#usage)

```
Usage:
  ./vendor/bin/pcg [options] [arguments]

Options:
  -h, --help            Display help for the given command. When no command is given display help for the list command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  help         Display help for a command
  list         List commands
 ddd
  ddd:repository  Generate a repository interface for a Domain Driven Design (DDD) style project
  ddd:service     Generate a service class for a Domain Driven Design (DDD) style project

```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2085112?v=4)[Robert Bakker](/maintainers/robertbakker)[@robertbakker](https://github.com/robertbakker)

---

Top Contributors

[![robertbakker1](https://avatars.githubusercontent.com/u/105277436?v=4)](https://github.com/robertbakker1 "robertbakker1 (10 commits)")

### Embed Badge

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

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

PHPackages © 2026

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