CLI for WordPress

WordPress CLI for Git workflows and deployment

The Nucleo CLI pulls your WordPress site into a folder, versions it with Git and pushes it back to the site. One command for each step.

Node 20 or laterGitDesign tokensScreenshots
The problem

The site lives in the database, not in files

The WordPress site lives in the database. Changes made in wp-admin do not go through repository review, and deployment becomes manual work.

Nucleo puts pages, tokens and components in files. The folder goes into Git, the CLI syncs it with the site, and the quality engine checks every push before publishing.

Features

What the Nucleo CLI gives you

Commands for every step

pull, push, tokens, component, media, screenshot and critical. The site downloads and uploads with two commands.

Git as your workflow

nucleo pull writes the site to a folder. Commits, branches and reviews are those of your repository.

Tokens from the design

tokens suggest reads the CSS of the design and proposes tokens for values used at least three times. push --use-tokens replaces the values with tokens.

Components locally

component new creates a plugin with the required header. component deploy copies it to the local or development site, after the check.

Agents over STDIO

nucleo mcp acts as a STDIO proxy to the site MCP server. The AI client starts the command and works with the permissions of the connected user.

Screenshots and critical CSS

screenshot saves pages at 390 and 1440 px. critical generates the critical CSS. Both use Playwright, an optional dependency.

How to use it

Export, edit and push the site back

  1. 1
    Configure the site

    You need Node 20 or later. Set the site, user and WordPress Application Password in nucleo.config.json, or in the NUCLEO_SITE, NUCLEO_USER and NUCLEO_APP_PASSWORD variables.

  2. 2
    Export and version

    nucleo pull nucleo-site downloads pages, tokens and content into the folder. Commit with Git as you would for any project.

  3. 3
    Check and publish

    nucleo push nucleo-site --dry-run validates each document as the real push would. With no errors, run the push without --dry-run.

Questions

Questions about the WordPress CLI

Does Nucleo CLI replace wp-cli?
No. The plugin adds wp nucleo commands to wp-cli. The Nucleo CLI is a separate program that works on the site folder.
Does the site server need Node?
No. Node 20 or later is needed where you work on the project. The site receives requests with the WordPress Application Password.
How do I version a WordPress site with Git?
nucleo pull writes pages, tokens and content to files. Git keeps the history, and changes are read in the diffs.
How do I deploy a WordPress component?
nucleo component deploy copies the plugin to the local or development site, after the check. On staging and production the component arrives with the migration or the Git deploy.
How do I extract tokens from a design?
nucleo tokens suggest design.html proposes a token for each value used at least three times. The command does not write to the site.
Can a push publish pages with quality errors?
No. A blocking issue stops publishing. A person decides with --acknowledge, never the agent.
What are the requirements?
Node 20 or later and an Application Password for a WordPress user. The Nucleo plugin requires WordPress 6.9 or later and PHP 8.2 or later.
Get started

Bring your site into your repository

The free Nucleo plugin is on the WordPress repository. Configure the CLI with the site and an Application Password, then export the first pull.