Skip to content

๐Ÿ›ž WP-CLI package ยท PHP 8.3+ ยท dry-run by default

A whole WordPress project, one turn of the capstan

Capstan scaffolds, configures, and packages PressGang projects from the command line โ€” WordPress core, parent theme, and child theme in one command. Like artisan, but it speaks WP-CLI.

Read the docs
$ wp capstan new harbour-cafe Plan (dry-run โ€” nothing written yet):๏ผ‹ WordPress core (latest)   โ†’ ./harbour-cafe๏ผ‹ pressgang (parent theme)  โ†’ wp-content/themes/pressgang๏ผ‹ harbour-cafe (child)      โ†’ wp-content/themes/harbour-cafe๏ผ‹ composer.json ยท config/ ยท src/Controllers/ Proceed? [y/n] y โœ” All lines made fast. Ready to build.

Heavy lifting, steady hands

The setup work that eats the first day of every project โ€” done in the time it takes to pour a coffee.

๐Ÿ—๏ธ Scaffold everything

WordPress core, the PressGang parent theme, and a ready-to-build child theme โ€” controllers, config/, Composer autoloading, all wired.

๐Ÿ” Dry-run by default

Every command prints its plan before it writes a byte. See exactly what will land where โ€” then say yes.

๐Ÿ“ฆ Package & configure

Not just day one: Capstan configures and packages existing PressGang projects too โ€” repeatable, scriptable, CI-friendly.

No surprises

Preview every plan before it writes a byte

Scaffolding tools that write first and explain later are how projects start with mystery files. Capstan inverts it: the plan is the default output, writing is the opt-in. The same philosophy as the rest of the PressGang fleet โ€” explicit over magic, nothing smuggled aboard.

Command reference
$ wp capstan new harbour-cafe# default โ€” prints the plan only Plan โ†’ review โ†’ confirm โ†’ write# nothing lands without your say-so

More than a WordPress starter theme generator

Day one is just the start. Capstan generates controllers, context getters and blocks for your PressGang themes from the command line, then configures and packages the whole WordPress theme for deployment โ€” repeatable, scriptable, CI-friendly.

Controller + Twig view
$ wp capstan make controller Events \    --type=posts --view ๏ผ‹ src/Controllers/EventsController.php๏ผ‹ Twig view โ€” routed by convention
Context getter, wired in
$ wp capstan context FrontPage \    --add=news,events --force ๏ผ‹ getters + $context_getters entries
Block, config-registered
$ wp capstan make block hero \    --title=Hero ๏ผ‹ block + view โ€” config-registered
Custom post type, config-first
$ wp capstan make cpt event \    --icon=dashicons-calendar ๏ผ‹ config/custom-post-types.php entry
See how a URL routes
$ wp capstan resolve /events/ # template โ†’ controller โ†’ view,# resolved without a browser
Health check
$ wp capstan doctor # checks the rigging โ€” versions,# config, autoloading, routing
New project, one command
$ wp capstan new harbour-cafe # core + parent + child theme,# Composer wired, plan first
Child theme for an existing install
$ wp capstan make child my-theme # controllers, config/, Twig views โ€”# into an existing WordPress install
Package for deployment
$ wp capstan theme package \    --output=release/my-theme.zip # production archive, dev deps ashore

Built for the PressGang fleet

Capstan is the launch ramp for PressGang โ€” the modern WordPress parent theme framework for Timber & Twig. Pair it with Quartermaster for fluent queries once you're underway.