PHPackages                             moderntribe/square1-generators - 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. moderntribe/square1-generators

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

moderntribe/square1-generators
==============================

Code generators for Square One

4.2.3(5mo ago)01.4kGPL-2.0-onlyPHPPHP &gt;=7.4

Since Jun 11Pushed 5mo ago19 watchersCompare

[ Source](https://github.com/moderntribe/square1-generators)[ Packagist](https://packagist.org/packages/moderntribe/square1-generators)[ RSS](/packages/moderntribe-square1-generators/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (48)Used By (0)

Square One Generator
====================

[](#square-one-generator)

A code generator utility to automate some of the repetitive tasks of building out a project with Square One. The WP CLI commands provided by this package will create stub files to set you on the right path for your custom work.

Component Generator
-------------------

[](#component-generator)

```
wp s1 generate component

```

Generates the assorted files required for a theme component.

Example usage:

```
wp s1 generate component link

```

This will create six files for you in the theme:

- `components/link/link.php`
- `components/link/Link_Controller.php`
- `components/link/index.pcss`
- `components/link/css/link.pcss`
- `components/link/index.js`
- `components/link/js/link.js`

The template (`link.php`) and the Controller class (`Link_Controller.php`) will be stubbed out with common properties.

Use `--no-template` to skip the template.

Use `--no-controller` to skip the Controller class.

Use `--no-css` to skip the CSS files.

Use `--no-js` to skip the JS files.

The `--dry-run` flag will show you the files the command would create, without writing to the file system.

You can use this command to generate components in nested directories. For example, `wp s1 generate component content/event ...` would create the component in `components/content/event`. All PHP classes will have their namespaces adjusted to reflect their position in the hierarchy.

Post Type Generator
===================

[](#post-type-generator)

```
wp s1 generate cpt  [--single=] [--plural=]

```

Generates the files required for a custom post type.

Example usage:

```
wp s1 generate cpt document --single="Document" --plural="Documents"

```

This will create three files for you in the core plugin:

- `src/Post_Types/Document/Document.php`
- `src/Post_Types/Document/Config.php`
- `src/Post_Types/Document/Subscriber.php`

And it will add a reference to the subscriber in `Tribe\Project\Core`.

Taxonomy Generator
==================

[](#taxonomy-generator)

```
wp s1 generate tax  [--post-types=] [--single=] [--plural=]

```

Generates the files required for a custom taxonomy.

Example usage:

wp s1 generate tax classification --post-types="page,post" --single="Classification" --plural="Classifications"

This will create three files for you in the core plugin:

- `src/Taxonomies/Classification/Classification.php`
- `src/Taxonomies/Classification/Config.php`
- `src/Taxonomies/Classification/Subscriber.php`

And it will add a reference to the subscriber in `Tribe\Project\Core`.

Block Generator
===============

[](#block-generator)

```
wp s1 generate block

```

Generate the files required to register a new block with ACF.

Example usage:

```
wp s1 generate block image-gallery

```

This will create two files for you in the core plugin:

- `src/Blocks/Types/Image_Gallery/Image_Gallery.php`
- `src/Blocks/Types/Image_Gallery/Image_Gallery_Model.php`

And create the block template in the theme:

- `blocks/imagegallery.php`

And then delegates to the component generator (see above) to generate the `image_gallery` component.

The `--dry-run` flag will show you the files the command would create, without writing to the file system.

Example with Post Loop Field Middleware:

```
wp s1 generate block image-gallery --with-post-loop-field-middleware

```

Settings Page Generator
=======================

[](#settings-page-generator)

TODO: write documentation for the settings page generator

CLI Command Generator
=====================

[](#cli-command-generator)

TODO: write documentation for the CLI command generator

Image Size Generator
====================

[](#image-size-generator)

```
wp s1 generate image-size  [--width=] [--height=] [--ratio=] [--crop=]

```

Adds an image size to the core plugin's `Image_Sizes` class.

Example usage:

```
wp s1 generate image-size test-size --width=1000 --ratio=0.75 --crop=left,top

```

This will add the constant `TEST_SIZE` to the `Image_Sizes` class and add this definition to the `$sizes` array:

```
self::TEST_SIZE => [
	'width'  => 1000,
	'height' => 750,
	'crop'   => [ 'left', 'top' ],
]

```

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance72

Regular maintenance activity

Popularity14

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 58.4% 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 ~55 days

Recently: every ~300 days

Total

44

Last Release

158d ago

Major Versions

0.0.2 → v2.0.02019-10-07

2.1.2 → v3.0.02020-09-01

3.6.0 → 4.0.32022-08-17

PHP version history (3 changes)0.0.1PHP ^7.0

v3.1.0PHP ^7.2

4.0.3PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/6aa10556f9e67f0a27a22542d7baab7914c2dae633502bf25fcc877e62bb19c5?d=identicon)[jbrinley](/maintainers/jbrinley)

---

Top Contributors

[![defunctl](https://avatars.githubusercontent.com/u/1066195?v=4)](https://github.com/defunctl "defunctl (104 commits)")[![jbrinley](https://avatars.githubusercontent.com/u/288845?v=4)](https://github.com/jbrinley "jbrinley (51 commits)")[![tarecord](https://avatars.githubusercontent.com/u/6947218?v=4)](https://github.com/tarecord "tarecord (11 commits)")[![mmcachran](https://avatars.githubusercontent.com/u/375068?v=4)](https://github.com/mmcachran "mmcachran (6 commits)")[![nickpelton](https://avatars.githubusercontent.com/u/289422?v=4)](https://github.com/nickpelton "nickpelton (2 commits)")[![dpellenwood](https://avatars.githubusercontent.com/u/1151082?v=4)](https://github.com/dpellenwood "dpellenwood (2 commits)")[![tr1b0t](https://avatars.githubusercontent.com/u/14128420?v=4)](https://github.com/tr1b0t "tr1b0t (2 commits)")

### Embed Badge

![Health badge](/badges/moderntribe-square1-generators/health.svg)

```
[![Health](https://phpackages.com/badges/moderntribe-square1-generators/health.svg)](https://phpackages.com/packages/moderntribe-square1-generators)
```

###  Alternatives

[tinect/redirects

Redirect plugin for Shopware 6

2040.6k](/packages/tinect-redirects)[defstudio/filament-column-length-limiter

Limit Filament columns length showing a tooltip when text exceeds

126.2k](/packages/defstudio-filament-column-length-limiter)

PHPackages © 2026

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