PHPackages                             zero-config/cli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. zero-config/cli

ActiveLibrary[HTTP &amp; Networking](/categories/http)

zero-config/cli
===============

CLI tooling with zero configuration required.

1.4.0(8y ago)410.3kMITPHPPHP ^7.1

Since Jan 27Pushed 8y ago2 watchersCompare

[ Source](https://github.com/ZeroConfig/CLI)[ Packagist](https://packagist.org/packages/zero-config/cli)[ RSS](/packages/zero-config-cli/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (9)Used By (0)

Introduction
============

[](#introduction)

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

[![codecov](https://camo.githubusercontent.com/9337863e0bccee33c1e102f7ca0509c86973620421b62932ca6fcdfefcc2e324/68747470733a2f2f636f6465636f762e696f2f62622f7a65726f636f6e6669672f636c692f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/bb/zeroconfig/cli)[![Packagist](https://camo.githubusercontent.com/c158bc151b266569da5f4d28cf09943aa47afeda6492ac99dfa9c0fc39bc5656/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a65726f2d636f6e6669672f636c692e737667)](https://packagist.org/packages/zero-config/cli)[![PHP from Packagist](https://camo.githubusercontent.com/70d130356205d7f7b871e4743722bddfb7c0d91057000c1dd9a43d35f8622102/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7a65726f2d636f6e6669672f636c692e737667)](https://secure.php.net/)[![Packagist](https://camo.githubusercontent.com/93e6f11ae18c18ad40b3c70cb35157679fadec00db4b0532041c8e70b3a7e58c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7a65726f2d636f6e6669672f636c692e737667)](https://github.com/ZeroConfig/CLI/blob/master/LICENSE)[![Phar](https://camo.githubusercontent.com/b980f256727e44404604e40ba695cc9f4a2548af7ede011eef82233729f54cc6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506861722d646f776e6c6f61642d627269676874677265656e2e737667)](https://bitbucket.org/zeroconfig/cli/downloads/zc.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
============

[](#installation)

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

```
composer require zero-config/cli

```

Alternatively, a built executable can be downloaded as [zc.phar](https://bitbucket.org/zeroconfig/cli/downloads/zc.phar).

Correct execution rights and put it somewhere in your path:

```
chmod +x zc.phar
sudo ln -s /path/to/zc.phar /usr/bin/zc

```

I/O
===

[](#io)

The I/O is easily handled by the [input](docs/input.md) and [output](docs/output.md)components of the package.

Input
-----

[](#input)

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

```
