Download the PHP package stellarwp/foundation-wpcli without Composer

On this page you can find all versions of the php package stellarwp/foundation-wpcli. 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 foundation-wpcli

Foundation WP-CLI

[!WARNING] This is a read-only repository! For pull requests or issues, see stellarwp/foundation.

Foundation helpers for building WP-CLI commands with the Foundation container.

Installation

WP-CLI is expected to provide the WP_CLI and WP_CLI_Command runtime classes. This package includes wp-cli/wp-cli as a development dependency for tests and static analysis, but applications normally do not need to install it separately when running inside WP-CLI.

Install stellarwp/foundation-wpcli as a normal dependency when the plugin ships WP-CLI commands. Install stellarwp/foundation-cli separately with composer require --dev stellarwp/foundation-cli only when developers need generators such as make:wpcli-command.

Commands

Extend StellarWP\Foundation\WPCli\Command for commands that should receive the Foundation container.

Generating Commands

If the project also installs stellarwp/foundation-cli as a development dependency, scaffold a WP-CLI command class in a consuming WordPress project:

If the consuming project has a Composer script named foundation that points to the installed Foundation binary, it can also run composer run foundation -- make:wpcli-command Sync_Products_Command.

The generator reads the project's autoload.psr-4 namespaces from composer.json and writes a Snake_Case command class under Cli/Commands inside the default PSR-4 root. When --namespace is passed, the output path is resolved from the matching PSR-4 root unless --path is also passed.

For example, a project with this Composer autoload entry:

will generate:

with namespace:

The generated class extends StellarWP\Foundation\WPCli\Command and includes example positional, associative, and flag arguments using constants.

When generated through foundation-cli, projects using Strauss with extra.strauss.namespace_prefix receive prefixed Foundation imports automatically.

Available options:

Project stub overrides live under:

When present, the override is used instead of the default stub from the foundation-wpcli package.

Override stubs should use the same context-aware placeholders as the default stub when writing PHP literals. For example, use {{ description_php }} and {{ subcommand_php }} for values returned from PHP methods, and {{ foundation_wpcli_command }} for the Foundation command import so Strauss-prefixed projects keep working.

Provider Setup

Applications should register their own provider so they control the command namespace and command list.

Do not register StellarWP\Foundation\Cli\CliProvider in a WordPress plugin. That provider belongs to the developer-facing foundation console binary, not plugin runtime bootstrap.

Generated command classes use Strauss-prefixed Foundation imports automatically when extra.strauss.namespace_prefix is configured. Handwritten provider code is still application code, so projects using Strauss with update_call_sites=false may need to use their prefixed Foundation namespace in the imports below.

Use cli_init so commands are registered only during WP-CLI command bootstrap, after WordPress has loaded enough for plugin providers and hooks to be available.

If your application does not use WordPress hooks during bootstrap, call the command registration loop at the point where WP-CLI is active and your container has been configured.


All versions of foundation-wpcli with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
stellarwp/foundation-container Version ^1.3
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 stellarwp/foundation-wpcli contains the following files

Loading the files please wait ...