PHPackages                             wp-forge/wp-cli-forge-command - 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. wp-forge/wp-cli-forge-command

ActiveWp-cli-package[Utility &amp; Helpers](/categories/utility)

wp-forge/wp-cli-forge-command
=============================

A zero-config scaffolding tool for WordPress.

1.0.2(4y ago)03GPL-2.0-or-laterPHP

Since Jul 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/wp-forge/wp-cli-forge-command)[ Packagist](https://packagist.org/packages/wp-forge/wp-cli-forge-command)[ Docs](https://github.com/wp-forge/wp-cli-forge-command)[ RSS](/packages/wp-forge-wp-cli-forge-command/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

WP Forge Command
================

[](#wp-forge-command)

A zero-configuration scaffolding tool for WordPress built as a WP-CLI package.

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

[](#installation)

1. [Install WP-CLI](https://wp-cli.org/#installing)
2. Install this WP-CLI package:

```
wp package install wp-forge/wp-cli-forge-command
```

Usage
-----

[](#usage)

From your project root, run the `init` command to set up a project-level configuration file.
*\*Technically, this step is optional. However, it helps to eliminate some prompts as you run make commands.*

```
wp forge init
```

Run the `make` command to scaffold a new entity such as a plugin, theme, etc.

```
wp forge make
```

Advanced Usage
--------------

[](#advanced-usage)

Clone a Git repository containing [scaffolding templates](#scaffolding-templates) so they will be locally available to the tool.

```
wp forge clone
```

When cloning a repository, you can optionally provide a name. This allows you to utilize multiple repositories containing scaffolding templates from various sources. If you do not set a name, the system will use the name "default" automatically.

```
wp forge clone  --as=
```

To scaffold using a template from a named repository, just prefix the entity name with your custom namespace.

For example, if you set the name to be `company`, and you wanted to scaffold a `wp-plugin`, then you would run this command:

```
wp forge make company:wp-plugin
```

This will ensure that the repository containing the `company` templates will be checked for the `wp-plugin` scaffolding. In the event that you have multiple template sources configured and the requested template cannot be found under the requested namespace, the tool will ask you if you want to check the other template sources for that template.

You can also use a path to leverage templates found nested in other folders.

```
wp forge make company:github-actions/lint-php
```

The above command would look in the `~/.wp-cli/templates/company` folder for the template in the `github-actions/lint-php` directory.

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

[](#documentation)

All commands are self-documented by the tool. Simply type an available command followed by the `--help` flag for more details.

**Get high-level documentation on available commands:**

```
wp forge --help
```

**Get documentation for a specific command:**

```
wp forge config --help
```

Scaffolding Templates
---------------------

[](#scaffolding-templates)

In order to use this tool, you must first have a Git repository where you will host your scaffolding templates.

**Let's get started!**

> **Step 1:** Create a [new Git repository](https://github.com/new).

> **Step 2:** Create a folder in the repository for each thing you will want to scaffold. The name of the folder is the name you will use with the `make` command.

Examples of things you might want to scaffold:

- WordPress plugins
- WordPress themes
- WordPress sites
- Custom post types
- GitHub actions
- Other custom code you use frequently

> **Step 3:** Make sure you have a `config.json` file in the template folder. This will tell the CLI what to do with your template.

### Config Examples

[](#config-examples)

A simple `config.json` file might look like this:

```
{
  "directives": [
    {
      "action": "copy",
      "from": "lint-php.yml",
      "to": ".github/workflows/lint-php.yml",
      "relativeTo": "projectRoot"
    }
  ]
}
```

This would copy the `lint-php.yml` file from the template folder to the `.github/workflows/lint-php.yml` file relative to the project root. You can provide multiple copy directives to copy not only files, but also entire directories. If you want the path to be relative to the current directory where the CLI tool is being run, then just leave off the `relativeTo` property or set its value to `workingDir`.

It is very common that you will want to replace placeholders in your templates. To facilitate this, you must first collect the required information from the user.

You can add a `prompts` section to trigger these data requests in the CLI:

```
{
  "prompts": [
    {
      "message": "What is your first name?",
      "name": "first_name",
      "type": "input"
    },
    {
      "message": "What country are you in?",
      "name": "country",
      "type": "input",
      "default": "United States"
    },
    {
      "message": "What is your favorite ice cream?",
      "name": "ice_cream",
      "type": "radio",
      "options": [
        "Chocolate",
        "Vanilla",
        "Strawberry"
      ]
    },
    {
      "message": "Select one or more taxonomies",
      "name": "taxonomies",
      "type": "checkboxes",
      "options": [
        "Categories",
        "Tags"
      ]
    }
  ]
}
```

With these prompts defined, you can now use the `name` field as a [Mustache](https://mustache.github.io/) placeholder in any template file. You can also reference the name of any property from the project configuration file in your templates without needing to prompt the user.

You can have a template leverage other templates by using the `runCommand` directive and calling the `make` command:

```
{
  "directives": [
    {
      "action": "runCommand",
      "command": "wp forge make github-actions/lint-js"
    },
    {
      "action": "runCommand",
      "command": "wp forge make github-actions/lint-php"
    },
    {
      "action": "runCommand",
      "command": "wp forge make github-actions/lint-yml"
    }
  ]
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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 ~83 days

Total

3

Last Release

1593d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae89dc177002c2f67341cde2d525e3f3c5b1d6aaaf07df15257a284f001c5551?d=identicon)[wpscholar](/maintainers/wpscholar)

---

Top Contributors

[![wpscholar](https://avatars.githubusercontent.com/u/890951?v=4)](https://github.com/wpscholar "wpscholar (86 commits)")

### Embed Badge

![Health badge](/badges/wp-forge-wp-cli-forge-command/health.svg)

```
[![Health](https://phpackages.com/badges/wp-forge-wp-cli-forge-command/health.svg)](https://phpackages.com/packages/wp-forge-wp-cli-forge-command)
```

PHPackages © 2026

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