Download the PHP package troublete/cli without Composer

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

Cli

It's like meow, but for PHP.

Build Status

Install

Usage

Some script content, let's assume cli.php.

By calling the script with the following arguments, it'll output 🌈.

For examples see /examples.

API

Functions

cli($arguments, $helpMessage, $flagAliases = [], $showHelp = true, $outputStreams = [])

Function to instantiate an anonymous class instance with relevant information as public properties. So they are exposed and can be used directly.

Arguments
Argument Type Description
$arguments array The arguments from which the script shall take the flags and values (should be in most cases $argv).
$helpMessage string The help/welcome message that shall be shown on script call with --help or when no arguments are provided (flag based, see $showHelp).
$flagAliases array An array with short aliases for flags. For example ['h' => 'help'], would allow that -h is used instead of --help.
$showHelp bool Flag to determine if the help message should be shown on call without arguments.
$outputStreams array Array of output streams the print() method will write to when called. (defaults to STDOUT)
Properties
Property Type Description
composer \stdClass Contains the composer package information, read from getcwd() if available.
flags class@anonymous Contains the flags with simple API to use (see related package argv for more information).
isCommand bool Contains the information if the current call is a command call.
commandName string Contains the current comman name, given it's a command call, else empty.
helpMessage string Contains the help message defined for the CLI.
Methods
Method Description
print(string $contents) Method to print something in the set output streams (just to have a common way of doing this, see $outputStreams)

Related Packages

License

GPL-2.0 © Willi Eßer


All versions of cli with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
troublete/argv Version ^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 troublete/cli contains the following files

Loading the files please wait ....