Download the PHP package zero-config/cli without Composer

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

Introduction

ZeroConfig CLI is a set of CLI tools, written in PHP, that require zero configuration in order to function.

codecov Packagist PHP from Packagist Packagist Phar

This package aims to provide a set of convenience methods to create CLI tooling without having to set up a framework or having in-depth knowledge of the inner workings of PHP CLI.

By design, it solves how to deal with large data streams. It is based on data going in, data being manipulated and then data going out. Whether the source is piped data, a local file or HTTP resource, it will be streamed line by line.

Transformation of data also occurs line by line, going in and coming out. The same goes for output, whether it's written to a file or STDOUT.

If an application is assembled using components from this library, your application will hold only one line of resource data in memory, at any given moment. This WILL reduce memory consumption and is a sure fire way to keep performance high in most CLI solutions.

Installation

To install the code base on which the tools are built, as a library:

Alternatively, a built executable can be downloaded as zc.phar.

Correct execution rights and put it somewhere in your path:

I/O

The I/O is easily handled by the output components of the package.

Input

Input sources are implemented as generators and can thus be used to stream data line by line.

Resource Description
File Read files from the local filesystem.
Gzip Read Gzip archives, like backups of databases or logs.
STDIN Read piped data streams.
HTTP Stream web resources.
Callback Stream data using a callback.

Output

Output writers expect iterable data and are able to write data line by line; ideal for handling streaming data.

Writer Description
File Write to a file on the local filesystem.
STDOUT / STDERR Write to the console.
Callback Write to a callable handle.
CSV Write to CSV files.

Transformers

Transformers can be used to reduce, modify or enrich the data between output.

The following is an example of the match filter. It makes use of PCRE patterns.

The above example will output:

The following are available transformers.

Group Transformer Description
Sequence SkipFilter Skip a set number of records.
Sequence LimitFilter Limit the number of records to a set amount.
String ContainsFilter Match input that contains a substring.
String LineEnding End strings with newlines or configurable sequences.
PCRE MatchFilter Input must match a given PCRE pattern.
PCRE ReplaceFilter Replace input using a PCRE pattern.
CSV CsvParser Parse CSV strings into (associative) arrays.
Callback CallbackTransformer Create a custom transformer using a callback.

Chaining transformers

While transformers can be chained by wrapping one transformer into the other, a convenience transformer chain is available to easily chain transformers.

Guides

General documentation


All versions of cli with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
ext-spl Version ^7.1
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 zero-config/cli contains the following files

Loading the files please wait ....