Download the PHP package weew/console without Composer

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

Console application

Build Status Code Quality Test Coverage Version Licence

Table of contents

Installation

composer require weew/console

Introduction

This package provides a convenient skeleton for console application. Optically, heavily inspired by the symfony console it has it similarities and differences. Describing commands, parsing console arguments, styling and colorization of output, question helpers etc., all this is included inside this package. In related projects you'll find a list of used components that you might also use separately from this package.

Note: this package has not been tested on windows. Windows contributions are highly appreciated.

Console

To start building your console app, you need to instantiated a new console first.

Commands

Commands are the pieces of logic that you might plug and play into your console application. A command can by anything. There is no interface contract that you must fulfill. This design choice was made because of the dependency injection support for the weew/console-container-aware package.

Your command must have the setup and run method. For further information about configuration of commands refer to the weew/console-arguments package.

All the important functionality is available trough instances of IInput and IOutput. There are many more things you can do, just take a look at it. All you have to do now is to register your command on the console.

Running your command is as easy as pie.

You can prevent a command from executing in parallel setting the appropriate flag.

Input

Input contains all the information about the received arguments and offers some apis for interaction with the user.

This is how you can retrieve the current command:

You can access arguments and options that were matched for the command:

You can prompt user for input using this methods:

Output

Output is used to print information to the terminal. It uses the weew/console-formatter for styling and formatting of the text.

Widgets

Widgets are small and reusable classes that serve as a kind of ui elements.

TableWidget

This widget allows you to easily print simple tables.

Helpers

There are several helpers that you might use for interaction with the user.

PromptHelper

This helper allows you to prompt user for different kinds of input.

Related projects


All versions of console with dependencies

PHP Build Version
Package Version
Requires weew/console-arguments Version ^1.13
weew/console-formatter Version ^2.1
weew/helpers-array Version ^1.2
weew/helpers-string Version ^1.7
weew/json-encoder Version ^1.0
weew/helpers-filesystem Version ^1.2
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 weew/console contains the following files

Loading the files please wait ....