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.1.0(2mo ago)01MITPHPPHP ^8.2CI passing

Since Feb 19Pushed 2mo 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 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)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 theme package`Create a WordPress-uploadable ZIP from a theme directoryUsage
-----

[](#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
```

### 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)

Planned commands:

- `make block` — scaffold a custom block
- `make cpt` — scaffold a custom post type with config registration
- `doctor` — diagnose common theme configuration issues
- `config dump` — display resolved PressGang configuration
- `theme screenshot` — generate a theme screenshot

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance83

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

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

Unknown

Total

1

Last Release

88d ago

### 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 (13 commits)")

###  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

[crunzphp/crunz

Schedule your tasks right from the code.

2292.0M6](/packages/crunzphp-crunz)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[statamic/cli

Statamic CLI Tool

7587.7k](/packages/statamic-cli)[civicrm/cv

CLI tool for CiviCRM

4219.8k](/packages/civicrm-cv)[mwguerra/web-terminal

A web-based terminal component for Filament/Laravel with command whitelisting and multiple connection types

251.1k](/packages/mwguerra-web-terminal)[dpi/dogit

191.1k](/packages/dpi-dogit)

PHPackages © 2026

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