PHPackages                             italystrap/theme-json-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. [Templating &amp; Views](/categories/templating)
4. /
5. italystrap/theme-json-generator

ActiveLibrary[Templating &amp; Views](/categories/templating)

italystrap/theme-json-generator
===============================

WordPress theme.json generator from a PHP array

0.3.0(2y ago)25209MITPHP &gt;=7.4

Since Oct 21Compare

[ Source](https://github.com/ItalyStrap/theme-json-generator)[ Packagist](https://packagist.org/packages/italystrap/theme-json-generator)[ RSS](/packages/italystrap-theme-json-generator/feed)WikiDiscussions Synced 1w ago

READMEChangelog (3)Dependencies (36)Versions (7)Used By (0)

ItalyStrap Theme Json Generator
===============================

[](#italystrap-theme-json-generator)

[![Tests Status](https://github.com/ItalyStrap/theme-json-generator/actions/workflows/test.yml/badge.svg)](https://github.com/ItalyStrap/theme-json-generator/actions/workflows/test.yml)[![Latest Stable Version](https://camo.githubusercontent.com/48040a77bfaa0625e652146d34423d12cfb8a929a4d3f01ba6b3bc03d076a25c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6974616c7973747261702f7468656d652d6a736f6e2d67656e657261746f722e737667)](https://packagist.org/packages/italystrap/theme-json-generator)[![Total Downloads](https://camo.githubusercontent.com/15eb0c88bbea41f22d0d8f4c1d55a5814b8844b7254d6e4c8b2ec56053a1bf7c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6974616c7973747261702f7468656d652d6a736f6e2d67656e657261746f722e737667)](https://packagist.org/packages/italystrap/theme-json-generator)[![Latest Unstable Version](https://camo.githubusercontent.com/fd7be559e38e2db9ebe076969582252c633754e2d845a7c294b0d9272d303de4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f6974616c7973747261702f7468656d652d6a736f6e2d67656e657261746f722e737667)](https://packagist.org/packages/italystrap/theme-json-generator)[![License](https://camo.githubusercontent.com/eafc0e92075b3972a55da66e1fc28abdd93a47f04b03351a44c090ed71557a1d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6974616c7973747261702f7468656d652d6a736f6e2d67656e657261746f722e737667)](https://packagist.org/packages/italystrap/theme-json-generator)[![PHP from Packagist](https://camo.githubusercontent.com/5879032df5ea719ebbfd9a28b06c8d7fe17e7c190bce6840f1dccc7882e34873/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6974616c7973747261702f7468656d652d6a736f6e2d67656e657261746f72)](https://camo.githubusercontent.com/5879032df5ea719ebbfd9a28b06c8d7fe17e7c190bce6840f1dccc7882e34873/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6974616c7973747261702f7468656d652d6a736f6e2d67656e657261746f72)

WordPress Theme Json Generator: The OOP Way

**Work in Progress:** This project is experimental and currently in development. As we navigate through the 0.x.x versions, please note that API changes may occur. For understanding versioning, refer to the [SemVer](http://semver.org/) specification.

**Project Vision:** The aim is to revolutionize the way `theme.json` files (and other `*.json` files within the `styles` folder) are generated because json sucks 😁 (just kidding).

PHP offers the flexibility to divide configurations into multiple files, include comments, and generate dynamic content, overcoming the limitations of JSON.

**Who is This For?**

- Ideal for those seeking a more maintainable and predictable method to generate JSON files for WordPress themes.
- Perfect if you prefer writing your configurations once and reusing them efficiently.

**Not Suited For:**

- Users content with direct JSON file manipulation without the need for PHP generation.
- Those who believe this approach complicates the JSON generation process.
- Individuals comfortable managing extensive JSON configurations manually.

**Explore With Us:** Join us in exploring this CLI and WP\_CLI tool for generating and validating JSON files for Block Themes, and see how it can streamline your development process.

**Important Considerations for Developers:**

This package is designed with the development phase in mind and **should only be used for development purposes**. For performance reasons, it is not recommended to use this tool in production environments. JSON files should be generated in advance during the development process and considered as a form of cache in your project. Generating these files on the fly in a production environment is strongly discouraged. Therefore, **this package should not be used in production**.

**Extending Functionality with CLI Commands:**

To enhance your development workflow, this package includes CLI commands that simplify the initialization, generation, and validation of JSON files. These tools are crafted to streamline the creation and management of your theme’s configuration, ensuring a smooth and efficient development process.

Table Of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [License](#license)
- [Credits](#credits)
- [Resources](#resources)

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

[](#installation)

The best way to use this package is through Composer:

```
composer require italystrap/theme-json-generator --dev
```

This package adheres to the [SemVer](http://semver.org/) specification and will be fully backward compatible between minor versions.

Documentation
-------------

[](#documentation)

1. [Basic Usage](./docs/01-basic-usage.md)
2. [Advanced Usage](./docs/02-advanced-usage.md)

[🆙](#table-of-contents)

Changelog
---------

[](#changelog)

Until the first stable version is released, BC breaks may occur.

`ItalyStrap\ThemeJsonGenerator\Application\Config\ThemeJson` to `\ItalyStrap\ThemeJsonGenerator\Domain\ThemeJson\ThemeJson`

[🆙](#table-of-contents)

Contributing
------------

[](#contributing)

All feedback / bug reports / pull requests are welcome.

License
-------

[](#license)

Copyright (c) 2021 Enea Overclokk, ItalyStrap

This code is licensed under the [MIT](LICENSE).

Credits
-------

[](#credits)

Resources
---------

[](#resources)

- [Theme.json Documentation](https://developer.wordpress.org/themes/global-settings-and-styles/)
- [Full Site Editing](https://fullsiteediting.com/)

###  Health Score

23

—

LowBetter than 25% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

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.

###  Release Activity

Cadence

Every ~100 days

Total

3

Last Release

829d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13d145319a065be260ee79e728655780ddd63002e5ac6c317701c8996ec8d94c?d=identicon)[overclokk](/maintainers/overclokk)

---

Top Contributors

[![overclokk](https://avatars.githubusercontent.com/u/4604932?v=4)](https://github.com/overclokk "overclokk (232 commits)")

---

Tags

wordpressWordPress theme.jsontheme.json

###  Code Quality

Static AnalysisPsalm, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/italystrap-theme-json-generator/health.svg)

```
[![Health](https://phpackages.com/badges/italystrap-theme-json-generator/health.svg)](https://phpackages.com/packages/italystrap-theme-json-generator)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

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

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k199.6M3.4k](/packages/composer-composer)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k257.0M27.9k](/packages/friendsofphp-php-cs-fixer)[sylius/sylius

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

8.5k6.0M777](/packages/sylius-sylius)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k17.0M1.1k](/packages/phpro-grumphp)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M235](/packages/sulu-sulu)

PHPackages © 2026

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