Download the PHP package web64/laravel-cli-colors without Composer

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

Laravel CLI COLORS

Laravel CLI Colors is a simple package, based on the jakub-onderka/php-console-color library, that makes it easy to output text in various colors and styles.

Laravel already comes with some built in styles for the Command class but I often output debug information in other classes and also wanted more flexibility in how to style the output, so I created this package.

Note that the colors and styling features available will depend on your OS and console settings.

Installation

To publish the colors.php config file run

Run this command to see a sample of how use can use Laravel CLI Colors.

Quick Start

Default Colors

Text Colors:

default, black, red, green, yellow, blue, magenta, cyan, light_gray, dark_gray, light_red, light_green, light_yellow, light_blue, light_magenta, light_cyan, white

Background Colors:

bg_default, bg_black, bg_red, bg_green, bg_yellow, bg_blue, bg_magenta, bg_cyan, bg_white, bg_light_gray, bg_dark_gray, bg_light_red, bg_light_green, bg_light_yellow, bg_light_blue, bg_light_magenta, bg_light_cyan

Custom Styles

In the colors.php configuration file you can define your own custom styles. The key of the array will be the name of the static method on the Colors facade and the value is an array of styles to be applied.

Pre-defined styles

The colors.php config file already has a list of pre-defined styles. Feel free to change, remove or add styles to this configuration file.

View & Validate Custom Styles

Run this command to see how your custom styles look and if they are any errors.

Inline Styles

To test out styles quickly you can add several styles inline and separate them with a double underscore (__).

When you find a style you like you, can add them to the colors.php config.

Formatting

You can format the text with bold, underline, italic and reverse.

Adding nobr() prevents a newline character from being added, so you can change styles on the same line.

Shortcuts

Instead of 'light' and 'dark' you can just prefix 'l' or 'd'.

For bold, underline and reverse, you can use shortcuts: 'b', 'u' and 'rev'

Helper

A helper function is available if you don't want to use the facade.

The first argument is a string or array of styles, with the text to output as the second argument.

Fun Stuff

Display random colors for each character using the rainbow() function.

Samples

Default Config Text Colors Background Colors

Contribute

Let me know if you have any ideas on how to improve this package!

Leave an issue here or reach out to me on Twitter @OlavHjertaker


All versions of laravel-cli-colors with dependencies

PHP Build Version
Package Version
Requires php-parallel-lint/php-console-color Version ^0.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 web64/laravel-cli-colors contains the following files

Loading the files please wait ....