PHPackages                             pointybeard/helpers-functions-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. [CLI &amp; Console](/categories/cli)
4. /
5. pointybeard/helpers-functions-cli

ActiveLibrary[CLI &amp; Console](/categories/cli)

pointybeard/helpers-functions-cli
=================================

A collection of functions relating to the command-line

1.1.10.1(4y ago)23.7k↓50%1[2 PRs](https://github.com/pointybeard/helpers-functions-cli/pulls)7MITPHPPHP &gt;=7.2

Since May 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/pointybeard/helpers-functions-cli)[ Packagist](https://packagist.org/packages/pointybeard/helpers-functions-cli)[ Docs](https://github.com/pointybeard/helpers-functions-cli)[ RSS](/packages/pointybeard-helpers-functions-cli/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (12)Versions (17)Used By (7)

PHP Helpers: Command-line Functions
===================================

[](#php-helpers-command-line-functions)

- Version: v1.1.10
- Date: July 29 2021
- [Release notes](https://github.com/pointybeard/helpers-functions-cli/blob/master/CHANGELOG.md)
- [GitHub repository](https://github.com/pointybeard/helpers-functions-cli)

A collection of functions relating to the command-line

Installation
------------

[](#installation)

This library is installed via [Composer](http://getcomposer.org/). To install, use `composer require pointybeard/helpers-functions-cli` or add `"pointybeard/helpers-functions-cli": "~1.1"` to your `composer.json` file.

And run composer to update your dependencies:

```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

```

### Requirements

[](#requirements)

This library makes use of the [PHP Helpers: Command-line Input and Input Type Handlers](https://github.com/pointybeard/helpers-cli-input), [PHP Helpers: Flag Functions](https://github.com/pointybeard/helpers-functions-flags) (`pointybeard/helpers-functions-flags`), [PHP Helpers: Command-line Colour](https://github.com/pointybeard/helpers-cli-colours) (`pointybeard/helpers-cli-colours`) and [PHP Helpers: String Functions](https://github.com/pointybeard/helpers-functions-strings) packages. They are installed automatically via composer.

To include all the [PHP Helpers](https://github.com/pointybeard/helpers) packages on your project, use `composer require pointybeard/helpers` or add `"pointybeard/helpers": "~1"` to your composer file.

Usage
-----

[](#usage)

This library is a collection convenience function for command-line tasks. They are included by the vendor autoloader automatically. The functions have a namespace of `pointybeard\Helpers\Functions\Cli`

The following functions are provided:

- `run_command()`
- `which()`
- `can_invoke_bash()`
- `is_su()`
- `run_command()`
- `usage()`
- `manpage()`
- `get_window_size()`
- `display_error_and_exit()`

Example usage:

```
