Download the PHP package biurad/consolelite without Composer

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

This library was strongly inspired by Symfony Console

[![Latest Stable Version](https://poser.pugx.org/biurad/consolelite/v/stable)](https://packagist.org/packages/biurad/consolelite) [![Build Status](https://travis-ci.org/biurad/Console-lite.svg?branch=master)](https://travis-ci.org/biurad/Console-lite) [![Total Downloads](https://poser.pugx.org/biurad/consolelite/downloads)](https://packagist.org/packages/biurad/consolelite) ![GitHub issues](https://img.shields.io/github/issues/biurad/console-lite.svg) [![StyleCI](https://github.styleci.io/repos/186709012/shield?branch=master)](https://github.styleci.io/repos/186709012) [![BCH compliance](https://bettercodehub.com/edge/badge/biurad/Autoloader?branch=master)](https://bettercodehub.com/) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/e08ae4d55074443f8dd4fd96042c36e0)](https://app.codacy.com/app/biustudio/Console-lite?utm_source=github.com&utm_medium=referral&utm_content=biurad/Console-lite&utm_campaign=Badge_Grade_Dashboard) [![License](https://poser.pugx.org/biurad/consolelite/license)](https://packagist.org/packages/biurad/consolelite)

The Console tool allows you to create command-line commands. Your console commands can be used for any recurring task, stub generator, phar compile, such as cronjobs, imports, or other batch jobs.

Installation

Just run this composer command:

Quickstart

Creating a Console Application

First, you need to create a PHP script to define the console application:

Console Lite has a totally different approach in building console commands, not similar to Symfony Console but similar to Laravel Artisan. This was done in order to make it light weight.

You can register the commands using two different ways:

  1. php

    !/usr/bin/env php

The compile command has options for two kinds of input, thus the pack and unpack. Given them different config settings in clite.json.

If you already know the Phar class in php. you can finish up the steps by settings them up in clite.json. The phar packs or reads directories and files from your working directory.

The pack input after command compile generate a phar file using the clite.json or using the options below.

The unpack input after the command compile extracts exverything containing in the phar file, into a directory reading from the clite.json or using the options.

Stuble

Stuble is command line tool built with PHP to simplify working with stubs. Stuble will collect parameters in your stub(s) file(s) and ask you those parameters. So you don't need to write scripts to handle each stub file.

This is a class that simple let's you generate a class or php file out of a template. This is an abstract class, so you don't need to use it like phar, but use it to create a stub.

For usuage, extends the your stuble class to StubleGenerator. The StubleGenerator has a similarity to Laravel GeneratorCommand, cause part of the class is from Laravel, but made simple. Check the class to find out.

When working with ConsoleLite Stuble, you don't need to input a destination path. Path deternation are generated from your namespaces and then the class in inserted into the the namespaces folders, starting from your working directory.

This code below is an example of how to implement a stuble.

and the template file which was saved in .stub file extention, looks like the one below

PSR-3 Logging

The CLI class is a fully PSR-3 compatible logger (printing colored log data to STDOUT and STDERR). This is useful when you call backend code from your CLI that expects a Logger instance to produce any sensible status output while running.

By default the logger functions are written in Command class.

To use this ability simply inherit from BiuradPHP\Toolbox\ConsoleLite\PSR3 instead of BiuradPHP\Toolbox\ConsoleLite\Command, then pass $this as the logger instance. Be sure you have the suggested psr/log composer package installed.

License


All versions of consolelite with dependencies

PHP Build Version
Package Version
Requires biurad/filephp Version ^1.0
psr/log Version ^1.1
seld/jsonlint Version ^1.7
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 biurad/consolelite contains the following files

Loading the files please wait ....