Download the PHP package shalvah/clara without Composer

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

Clara 🔊

image Total Downloads Build Status

Simple, pretty, testable console output for PHP CLI apps. (Used in Scribe.)

Features:

Icons mode

Labels mode

Installation

(PHP 7.4+)

Using Clara

Picking a mode

By default, Clara uses "icons" mode—the output is coloured differently by output type and an emoji is added (as in the first screenshot above). If you prefer, you can switch to "labels" mode:

In labels mode, (the second screenshot above), the emojis are still present, but the output types are written out, and the main output message is not coloured.

Disabling colours and emojis

If you'd like to output a line of text without the extra formatting provided by the functions above, you can use the ->line() method instead.

Customising the colour palette

You can also customise the colours Clara uses for each type, by passing in an array as the third argument, containing your preferred colours:

See the Symfony docs for details about supported colours.

Toggling debug output

It's common practice to include a verbose flag (--verbose) in your CLI app that lets you show additional (debug) output to the user. With Clara, you can easily enable or disable debug logging:

Note that by default, Clara will show all output.

Muting output

Sometimes when running your app's tests, you don't want to clutter your console with the output messages. You can turn off Clara's output by using the mute() and unmute static methods. To mute or unmute a specific app, pass in the app name.

Showing only your app's output.

Imagine your app includes another app that uses Clara. By default, the output from all apps will be shown. You can turn off output for all apps but yours by calling ->only().

Capturing the output

Sometimes you need to assert that your app printed what you expect. An easy way is to use output capturing.

You can reset the entire state of Clara to default by calling Clara::reset(). This will clear captured output, stop capturing for all apps and unmute all apps.

Setting an output channel

By default, Clara outputs to the console, but you can actually output to somewhere else. This is helpful if you're writing a Laravel Artisan command and want to use Clara for output while still capturing the output via Artisan's ->output() method. All you need to do is call useOutput with an instance of Symfony\Component\Console\Output\OutputInterface (for Artisan classes, it's $this->output).


All versions of clara with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
symfony/console Version ^4.0|^5.0|^6.0|^7.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 shalvah/clara contains the following files

Loading the files please wait ....