Download the PHP package stellarwp/foundation-cli without Composer
On this page you can find all versions of the php package stellarwp/foundation-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download stellarwp/foundation-cli
More information about stellarwp/foundation-cli
Files in stellarwp/foundation-cli
Package foundation-cli
Short Description Foundation CLI tooling.
License GPL-2.0-or-later
Informations about the package foundation-cli
Foundation CLI
[!WARNING] This is a read-only repository! For pull requests or issues, see stellarwp/foundation.
Foundation CLI tooling for generating application code and maintaining the Foundation monorepo.
Installation
Install this package as a development dependency in consuming projects:
foundation-cli is build-time tooling. It should not be registered in a WordPress plugin application and should not be packaged in production plugin zips. Use Composer's --no-dev install mode for production builds so the CLI, Symfony Console, generators, and local tooling stay out of the runtime artifact.
If a generated WP-CLI command ships with the plugin, install stellarwp/foundation-wpcli as a normal runtime dependency:
Generators
List all available commands:
Foundation CLI includes generators for packages that own generated class shapes. For example, the WPCli package provides a generator for command classes:
Do not add StellarWP\Foundation\Cli\CliProvider to the consuming WordPress plugin's provider list. That provider only boots the Foundation Symfony Console application for the foundation binary. Register generated WP-CLI commands from the plugin's own WP-CLI provider using stellarwp/foundation-wpcli.
See the WPCli package README for WP-CLI generator behavior, options, and stub overrides.
Foundation Monorepo Maintenance
The package:create command is for maintainers working inside the Foundation monorepo. It creates local split-package scaffolding and can create GitHub repositories for Foundation split packages.
Create a split repository for a new Foundation package:
If the package does not exist yet, the command asks whether to create the local scaffold in src/<Package> and asks for the Composer package name. For example, WPCli defaults to stellarwp/foundation-wpcli. After scaffolding, it runs composer monorepo merge so the root package metadata includes the new split package.
By default, commands that change external systems run as a dry run. Pass --apply to execute the generated repository actions.
In the Foundation monorepo, the root Composer script can also be used:
Custom Commands
Applications can build their own Foundation CLI by creating Symfony Console commands and registering them with StellarWP\Foundation\Cli\Application.
For one or more related commands, group them behind a command provider.
Then boot an application with your provider.
When commands need shared services, register them in your container and pass constructed commands or command providers into the Application.
All versions of foundation-cli with dependencies
stellarwp/foundation-container Version ^2.0
stellarwp/foundation-wpcli Version ^2.0
symfony/console Version >=5.4