PHPackages                             pressgang-wp/capstan - 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. [CLI &amp; Console](/categories/cli)
4. /
5. pressgang-wp/capstan

ActiveWp-cli-package[CLI &amp; Console](/categories/cli)

pressgang-wp/capstan
====================

WP-CLI command package for PressGang WordPress themes.

v0.3.0(1mo ago)01MITPHPPHP ^8.3CI passing

Since Feb 19Pushed 1mo agoCompare

[ Source](https://github.com/pressgang-wp/pressgang-capstan)[ Packagist](https://packagist.org/packages/pressgang-wp/capstan)[ RSS](/packages/pressgang-wp-capstan/feed)WikiDiscussions main Synced 1w ago

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

Capstan
=======

[](#capstan)

WP-CLI command package for PressGang WordPress themes.

What is Capstan
---------------

[](#what-is-capstan)

Capstan is a WP-CLI extension that scaffolds, configures, and manages PressGang-based WordPress themes. It provides a repeatable, inspectable workflow for theme development, invoked directly through WP-CLI.

Requirements
------------

[](#requirements)

- PHP 8.3+
- [WP-CLI](https://wp-cli.org/) installed and available
- [Composer](https://getcomposer.org/) installed and available

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

[](#installation)

Install as a global WP-CLI package:

```
wp package install https://github.com/pressgang-wp/pressgang-capstan.git
```

WP-CLI's shorthand package index (`wp package install pressgang-wp/capstan`) is deprecated and may not resolve this package. Use the Git URL command above.

Composer install into the WP-CLI packages directory is also supported:

```
mkdir -p ~/.wp-cli/packages && cd ~/.wp-cli/packages && composer require pressgang-wp/capstan:dev-main
```

This makes all `wp capstan` commands available system-wide. Global installation is the recommended approach because scaffolding commands like `wp capstan new` and `wp capstan make child` run before a project or theme exists — there is no project `composer.json` to require Capstan into yet.

### For Capstan development

[](#for-capstan-development)

If you are contributing to Capstan itself, clone the repo and install dependencies locally:

```
git clone git@github.com:pressgang-wp/pressgang-capstan.git
cd pressgang-capstan
composer install
```

Available Commands
------------------

[](#available-commands)

CommandDescription`wp capstan about`Display Capstan version, PHP version, and WordPress root detection`wp capstan new`Scaffold a full PressGang WordPress project (core, parent, child theme)`wp capstan make child`Scaffold a PressGang child theme from the built-in template`wp capstan make cpt`Scaffold a custom post type entry in config/custom-post-types.php`wp capstan make block`Scaffold an ACF block: block.json, Twig template, config registration`wp capstan make controller`Scaffold a controller with a documented context\_getters manifest`wp capstan make muster`Scaffold a development seed (`muster/SiteMuster.php`) from the theme's shape`wp capstan resolve `Show template hierarchy candidates and the resolved controller for a URL`wp capstan context `Show a controller's context manifest and getters; --add publishes keys`wp capstan config dump`Display the resolved PressGang configuration`wp capstan snippets`List registered snippets, their resolved classes, and args`wp capstan matrix`Enumerate the theme's routes (post types, taxonomies, templates, menus)`wp capstan doctor`Run deterministic theme configuration health checks`wp capstan theme package`Create a WordPress-uploadable ZIP from a theme directoryWhen [Muster](https://github.com/pressgang-wp/pressgang-muster) is installed in the theme, it also registers `wp capstan seed` (run the theme's `SiteMuster` by convention, with a production guard) and `wp capstan muster ` (the low-level runner). See the Muster docs for their flags.

Usage
-----

[](#usage)

### New project

[](#new-project)

Create a complete PressGang WordPress project in one command — downloads WordPress core, installs the PressGang parent theme via Composer, scaffolds a child theme, and optionally configures ACF Pro as an MU-plugin.

```
# Preview the execution plan (dry-run)
wp capstan new my-theme --dbuser=root

# Execute it
wp capstan new my-theme --dbuser=root --force

# With ACF Pro as an MU-plugin
wp capstan new my-theme --dbuser=root --acf --force

# Full customisation
wp capstan new my-theme \
  --dbname=mytheme --dbuser=wp --dbpass=secret --dbhost=localhost \
  --url=http://mytheme.local --title="My Theme" \
  --admin-user=admin --admin-email=dev@example.com \
  --namespace=MyTheme --acf --force
```

The command runs dry by default — review the plan, then re-run with `--force` to execute.

When `--acf` is used, the root `composer.json` and an MU-plugin loader are written but ACF Pro itself is not downloaded (it requires licence authentication). The summary output includes the steps to complete the install.

### Child theme

[](#child-theme)

Scaffold a PressGang child theme into an existing WordPress installation.

```
# Preview what would be generated
wp capstan make child my-theme

# Generate the theme
wp capstan make child my-theme --force

# Custom name and namespace
wp capstan make child my-theme --name="My Theme" --namespace=MyTheme --force

# Explicit target path
wp capstan make child my-theme --path=/srv/www/wp-content/themes --force
```

### Development seeding

[](#development-seeding)

Scaffold a `SiteMuster` from the theme's own shape — its post types, taxonomies, page templates, menu locations, and ACF JSON — then seed with [Muster](https://github.com/pressgang-wp/pressgang-muster).

```
wp capstan make muster          # preview muster/SiteMuster.php
wp capstan make muster --force  # write it, and print the autoload-dev mapping to add

wp capstan seed                 # run it (requires pressgang-wp/muster in the theme)
```

Seeders live in a top-level `muster/` directory mapped under the theme's composer `autoload-dev` — they are development and test fixtures, not shipped code; `make muster` prints the exact mapping. See the Muster docs for the manifest, Recipes, and seeding flags.

### Theme packaging

[](#theme-packaging)

Package a theme directory into a zip ready for "Appearance &gt; Themes &gt; Upload Theme" in WordPress admin. Build artifacts (`.git/`, `vendor/`, `node_modules/`, editor dirs, `.env`, dev config files) are automatically excluded.

```
# Preview what would be packaged (from inside a theme directory)
wp capstan theme package

# Create the zip
wp capstan theme package --force

# Package a specific directory
wp capstan theme package /path/to/my-theme --force

# Custom output path
wp capstan theme package --output=release/my-theme.zip --force
```

The zip is created alongside the theme directory by default (e.g. `themes/my-theme.zip`).

### Environment info

[](#environment-info)

```
wp capstan about
```

Philosophy
----------

[](#philosophy)

- Dry-run by default — always preview before writing
- Explicit over implicit — no hidden global state
- Minimal abstractions, maximum inspectability
- Global WP-CLI package — available before any project exists

Roadmap
-------

[](#roadmap)

This roadmap is the single source of truth for planned Capstan commands (other ecosystem docs link here rather than restating it).

Theme utilities:

- `theme screenshot` — generate a theme screenshot

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance94

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Total

3

Last Release

33d ago

PHP version history (2 changes)v0.1.0PHP ^8.2

v0.2.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1303610?v=4)[Benedict](/maintainers/benedict-w)[@benedict-w](https://github.com/benedict-w)

---

Top Contributors

[![benedict-w](https://avatars.githubusercontent.com/u/1303610?v=4)](https://github.com/benedict-w "benedict-w (45 commits)")

---

Tags

pressgangwp-cliwp-cli-commandwp-cli-package

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pressgang-wp-capstan/health.svg)

```
[![Health](https://phpackages.com/badges/pressgang-wp-capstan/health.svg)](https://phpackages.com/packages/pressgang-wp-capstan)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.9k556.2M21.5k](/packages/laravel-framework)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19467.3M1.9k](/packages/drupal-core)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k257.3M12.4k](/packages/symfony-framework-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.2k30.0M2.9k](/packages/infection-infection)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

762297.9k53](/packages/civicrm-civicrm-core)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.9M535](/packages/pimcore-pimcore)

PHPackages © 2026

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