Download the PHP package atomicsmash/nucleus-cli without Composer

On this page you can find all versions of the php package atomicsmash/nucleus-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nucleus-cli

Nucleus CLI

A WordPress development toolkit for working with projects that use composer and node to manage assets with a DevOps focus.

Installation

You can install the package globally via composer:

Next you should setup the global Nucleus config (default values):

The config is stored at ~/.config/nucleus/config.yml.

Here is an example with all the current available options:

If you want to view the contents of the config at any time just run:

Usage

Nucleus provides several commands to help set up and manage WordPress projects:

Full Project Setup

Run a complete project setup that executes all setup commands in sequence:

This command will:

  1. Ask for confirmation to proceed with the overall setup
  2. For each setup command, show a description and ask if you want to run it:
    • Project Configuration: Collect and store project settings (vendor, project name, web root, etc.)
    • Project Core Setup: Copy and configure core project files (composer.json, wp-config.php, etc.)
    • WordPress Setup: Move WordPress to the correct location and organise wp-content directory
    • Plugin Migration: Migrate WordPress plugins to Composer via wpackagist
    • Theme Cleanup: Remove unused themes, keeping only the active theme and its parent
  3. Allow you to skip any individual section if you don't need it
  4. Provide a summary of completed tasks and next steps

You can also run each command independently if you prefer to set up your project step by step.

Project config file (.nucleus/config.yml)

Per-project settings live in .nucleus/config.yml in the project root. Example:

Key Default (if missing) Description
onboarded false When true, blocks onboarding commands: project:setup, project:config, project:core, wordpress:setup, plugins:migrate, theme:cleanup. Set automatically after a successful project:setup, or edit the YAML manually.
wordpress_user_management true When false, disables user:add, user:list, and user:delete for this project.
plugins_update — Used by plugins:update (e.g. exclude plugin slugs).
maintenance_email — Used by plugins:update for client email details.

Project Configuration

Configure in-memory project settings that are shared across onboarding commands:

This command collects and stores the following project information:

The configuration is stored in memory and used by subsequent commands, eliminating duplicate prompts.

WordPress Setup

Set up your WordPress installation with proper directory structure:

Note: Requires project configuration to be set up first using nucleus project:config.

The command will:

  1. Use stored project configuration (web root, WordPress install path)
  2. Find your WordPress installation in common locations
  3. Move WordPress to the specified location within the web root
  4. Move the wp-content directory to the web root
  5. Remove WordPress core files from the target location
  6. Provide next steps guidance

WordPress User Management

Manage WordPress users across development, staging, and production environments:

Requirements:

Environment selection: Each command prompts you to choose an environment (defaults to development). For staging and production, WP-CLI commands are run remotely over SSH using credentials from your .env file.

Required .env variables for remote environments:

Variable Description
STAGING_SSH_HOST Staging server hostname
STAGING_SSH_USER Staging SSH username (also accepts STAGING_SSH_USERNAME)
STAGING_SSH_PORT Staging SSH port
STAGING_WEB_ROOT Absolute path to WordPress on staging
PRODUCTION_SSH_HOST Production server hostname
PRODUCTION_SSH_USER Production SSH username (also accepts PRODUCTION_SSH_USERNAME)
PRODUCTION_SSH_PORT Production SSH port
PRODUCTION_WEB_ROOT Absolute path to WordPress on production

Optional defaults for user:add:

Global config (developer_defaults section via nucleus config:setup):

Key Description
username Default username
email_address Default email address
first_name Default first name
last_name Default last name
job_title Stored as user meta job_title
team Stored as user meta team

Project .env fallbacks:

Variable Description
WORDPRESS_USER Default username (if global config has none)
WORDPRESS_USER_EMAIL Default email address (if global config has none)
WORDPRESS_PASSWORD Default password

Project Core Setup

Copy and configure core project files from templates:

Note: Requires project configuration to be set up first using nucleus project:config.

The command will:

  1. Use stored project configuration (vendor, project name, web root, etc.)
  2. Collect environment-specific configuration (database settings, security keys, external services)
  3. Copy template files from the nucleus package:
    • .config/wp-configs/* → .config/wp-configs/
    • public/wp-config.php → [web-root]/wp-config.php
    • .editorconfig → .editorconfig
    • .gitignore → .gitignore
    • .valetrc → .valetrc
    • composer.json → composer.json
    • herd.yml → herd.yml
  4. Replace placeholders with collected configuration
  5. Handle file conflicts with options to overwrite, backup and replace, or skip

Plugin Migration

Migrate your WordPress plugins to Composer via wpackagist:

The command will:

  1. Look for the wp-content directory in either:
    • The project root
    • A public directory
  2. If not found, prompt you to enter the path or quit
  3. Scan all plugins in the plugins directory
  4. For each plugin:
    • Extract its version from the main plugin file
    • Check if it exists in the WordPress plugin directory
    • If it exists, add it to composer via wpackagist
    • If not, add it to a list of not found plugins
  5. Display any plugins that weren't found in the WordPress directory

Plugins Update

Run the monthly plugin update workflow with optional maintenance emails and deploy steps:

Requirements: Project must have composer.json with johnpbloch/wordpress and at least one of https://wpackagist.org or https://release-belt.atomicsmash.co.uk in repositories. A .nucleus/config.yml file is required.

The command will:

  1. Ask if you want to send the monthly maintenance email to your client
  2. Check project and (if sending email) global config; prompt for MailerSend API key and sender details if missing
  3. Optionally create a maintenance branch from main (e.g. feature/🛠️-Maintenance-YYYY-MM-DD)
  4. Optionally send the "starting maintenance" email (Template 1) via MailerSend
  5. Check wpackagist and release-belt plugins for updates; show changelog; apply updates (including release-belt flow: plugins.atomicsmash.co.uk + SSH update script)
  6. Optionally commit changes to the maintenance branch with a generated commit message
  7. Optionally deploy to staging (create release branch, merge maintenance, run npm run deploy)
  8. Prompt you to check staging and create a PR (e.g. via Sourcetree or GitLab)
  9. Pull main, then optionally deploy to production (npm run deploy:prod)
  10. Optionally send the "maintenance complete" email (Template 2) via MailerSend
  11. Finish and clear workflow state

Progress is stored in .nucleus/plugin-workflow.yml so you can resume if interrupted. Use --no-resume to start fresh.

Config:

Theme Cleanup

Clean up themes by keeping only the active theme and its parent (if child theme):

The command will:

  1. Check for active theme in package.json config (if exists)
  2. If not found, prompt you to select the active theme from available themes
  3. Detect if the active theme is a parent or child theme by reading style.css
  4. If it's a child theme, identify and preserve the parent theme
  5. Show a summary of themes to be deleted
  6. Confirm deletion with the user
  7. Delete all other themes while preserving the active theme and its parent (if applicable)

Template Files

The package includes template files that are copied during the project core setup. These files contain placeholders that are replaced with user input:

Basic Project Settings

Environment Configuration

Git Configuration

Development Environment

Staging Environment

Production Environment

WordPress Security Keys

The package automatically generates secure WordPress security keys using the rbdwllr/wordpress-salts-generator package. These include:

External Services

During the project core setup, you'll be prompted for all these values with sensible defaults provided. For WordPress security keys, you can choose to generate them automatically or enter them manually.

Requirements

License

The MIT License (MIT). Please see License File for more information.


All versions of nucleus-cli with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
symfony/console Version ^6.0
symfony/process Version ^6.0
symfony/yaml Version ^6.0
guzzlehttp/guzzle Version ^7.0
mailersend/mailersend Version ^0.35
composer-plugin-api Version ^2.0
rbdwllr/wordpress-salts-generator Version ^0.2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package atomicsmash/nucleus-cli contains the following files

Loading the files please wait ...