Download the PHP package weebel/console without Composer

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

Weebel Console

A simple and flexible console package for PHP that lets you build command-line applications with ease.

Installation

The easiest way to install the package is through composer:

Usage

To utilize the console kernel, you must have a container class that implements the Psr\Container\ContainerInterface interface. A popular example of this is the Laravel container. Here is a simple usage example of this package using the Laravel container in the main bootstrap executable file in the project (you may name the file as console in the bin directory of your project):

In the example above, we first include the autoload file to bring in all the necessary dependencies. Then, we retrieve the CommandContainer instance, and register the ExampleCommand class with it. Finally, we create an instance of the container and pass it to the ConsoleKernelBooter class to start the console application.

Creating Commands

To create a command, extend the Weebel\Console\Command class and add a unique name constant and a description constant for the command. You can also specify the valid options for the command by defining the $validOptions property as an array. Here's an example of a greeting command:

After registering your command, you can execute it using the following syntax in the terminal:

Customizing the Console Output

The package provides a HasClimate trait, which can be used to customize the console output. You can use this trait in your commands to add colors, formatting and other customizations to the output. Here are a few examples of how you can use the HasClimate trait to customize the console output:

With the HasClimate trait, you have full control over the way the console output is displayed, allowing you to create visually appealing and easy-to-read outputs.

Extending the functionality

The package provides a way to extend its functionality by allowing you to create listeners for the events it triggers. One such event is the CommandResolved event which is triggered when a command has been resolved from the input. This event provides information about the resolved command and its options.

Here is an example of using the popular Symfony event dispatcher in the console kernel:

License

Weebel Console is open-source software licensed under the MIT license.


All versions of console with dependencies

PHP Build Version
Package Version
Requires weebel/contracts Version dev-master
league/climate Version ^3.8
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 weebel/console contains the following files

Loading the files please wait ....