2017 © Pedro Peláez
 

library cli

Framework for command line interfaces

image

bheisig/cli

Framework for command line interfaces

  • Friday, April 27, 2018
  • by bheisig
  • Repository
  • 1 Watchers
  • 0 Stars
  • 190 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 94 % Grown

The README.md

CLI

PHP Framework for command line interfaces, (*1)

Latest Stable Version Minimum PHP Version Build Status, (*2)

About

You want an easy way to build a command line tool written in PHP? You are bored of big, over-engineered frameworks? And last but not least, you do not want to reinvent the wheel? -- Great, this could be the (almost) perfect solution for your next project., (*3)

The goal is to build intuitive CLI tools. Nobody likes to read documentation, so make your application self-descriptive!, (*4)

Features

  • Easy-to-install via Composer
  • Perfectly suited to create a single binary file from your application
  • Simple interface
  • Separate your features by commands
  • Runs on POSIX-like systems (GNU/Linux, MacOS, …) and Windows
  • Error/exception handling
  • Optional colored output based on log level
  • Log to standard or error output
  • Pre-defined usage output
  • JSON-based configuration with defaults, system-wide, user defined and runtime settings
  • Support for long and short options with optional or required values
  • Pre-defined options for verbosity/quietness, usage, version information, additional configuration files, runtime settings, configuration test
  • Verbosity mode outputs human-readable runtime in seconds and peak memory usage

Example

For a simple application look at the example/ folder., (*5)

Requirements

  • PHP, version 7.1 or higher (7.0 works but is deprecated, 7.3 is recommended, unreleased 7.4 should work)
  • PHP modules calendar, cli, date, filter and json

Installation

Go to your project folder and require this framework via Composer:, (*6)

~~~ {.bash} composer require bheisig/cli, (*7)


## Update Composer is the way to go: ~~~ {.bash} composer update

Copyright (C) 2018-19 Benjamin Heisig, (*8)

Licensed under the GNU Affero GPL version 3 or later (AGPLv3+). This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law., (*9)

The Versions

27/04 2018

dev-master

9999999-dev https://github.com/bheisig/cli

Framework for command line interfaces

  Sources   Download

AGPL-3.0+

The Requires

  • php >=5.6.0
  • ext-date *
  • ext-filter *
  • ext-json *

 

The Development Requires

app cli

24/04 2018

0.1

0.1.0.0 https://github.com/bheisig/cli

Framework for command line interfaces

  Sources   Download

AGPL-3.0+

The Requires

  • php >=5.6.0
  • ext-date *
  • ext-filter *
  • ext-json *
  • ext-posix *

 

The Development Requires

app cli