Download the PHP package tflori/hugga without Composer

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

tflori/hugga

.github/workflows/push.yml Code Coverage Maintainability Latest Stable Version Total Downloads License

PHP library for console applications. It supports formatting of messages and tables as well input handling with choices.

Installation

Like all my libraries: only with composer

Basic usage

Usage

Create a Console instance and use it throughout your application. All input and output goes through this object.

Writing output

line() writes a message followed by a newline. write() writes without a newline. Both accept an optional weight (verbosity level) as the second argument — output below the current verbosity threshold is silently dropped.

Convenience methods apply a predefined style and write to the appropriate stream:

Formatting

Embed format tags using ${...} syntax anywhere in a string. Reset all formatting with ${r} or ${reset}.

Available attributes: color names (red, green, cyan, yellow, blue, magenta, white, grey, …), bold / b, underline / u, fg:<color>, bg:<color>.

Deleting output

Remove recently written text without leaving a blank line:

Asking questions

Pass a string for a free-text prompt (optional default value as second argument):

Use Confirmation for yes/no questions — returns true or false:

Use Choice to let the user pick from a list. With an associative array the key is returned by default:

In an interactive terminal the choice is navigated with cursor keys. Chain methods to customise behaviour:

Tables

Pass the data rows and an optional header row to Table, then call draw():

Chain options to customise the appearance before drawing:

Progress bars

Provide the total number of steps (or null for an indeterminate spinner) and call start(). Call advance() inside your loop and finish() when done:

Multiple progress bars can run concurrently — each one stays pinned to the bottom of the output while regular log lines scroll above it. Pass null as the total for an indeterminate throbber:

Reading raw input

Observing keyboard input

getInputObserver() gives direct, non-echoed access to individual key presses:

Full reference

See the API reference for the complete method list, or run the bundled demo:

A paginated-table example is in examples/paginated-table.php.

Features

Some features are still planned but a lot of features are available and they are enough for start and replacing symfony/console.

Output Handling

Input Handling

Planned features


All versions of hugga with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-mbstring Version *
ext-readline Version *
nicmart/string-template Version ^0.1.1
psr/log Version ^1.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 tflori/hugga contains the following files

Loading the files please wait ...