2017 © Pedro Peláez
 

library clio

Command Line Input/Output for Hack.

image

kilahm/clio

Command Line Input/Output for Hack.

  • Friday, October 9, 2015
  • by kilahm
  • Repository
  • 1 Watchers
  • 0 Stars
  • 59 Installations
  • Hack
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

clio

This package is a re-imagining of the wonderful League package Climate, except written in strict Hack., (*1)

WHY?!

I would really like to have useful tools for Hack. The primary advantage I see that Hack has over PHP is the static type checker. For the type checker to be useful, there needs to be statically typed libraries., (*2)

Usage

The API is unstable, (*3)

For now I will list example code. This is one way in which I design my public facing APIs., (*4)

Construction

// Default input and output; same as not passing any input/output handlers to clio constructor
$input = new HackPack\Clio\StreamReader(STDIN);
$output = new HackPack\Clio\StreamWriter(STDOUT);
$clio = new HackPack\Clio\Clio($input, $output);

Parameters/Options

hhvm task.php "Some Call Me Tim" --with-title -t "Tim The Wizard"
// task.php
$clio = new HackPack\Clio\Clio();
$name = $clio->param('name')
             ->described('Description of the "name" argument.')
             ->required();
$titleFlag = $clio->flag('with-title')
$title = $clio->option('title')->aka('t')

Contributing

I would love to have feedback. Pull requests and issues are welcome!, (*5)

The Versions

09/10 2015

dev-master

9999999-dev

Command Line Input/Output for Hack.

  Sources   Download

MIT

The Requires

  • hhvm >=3.5.0

 

The Development Requires

by Isaac Leinweber

17/05 2015

0.2.2

0.2.2.0

Command Line Input/Output for Hack.

  Sources   Download

MIT

The Requires

  • hhvm >=3.5.0

 

The Development Requires

by Isaac Leinweber

17/05 2015

0.2.1

0.2.1.0

Command Line Input/Output for Hack.

  Sources   Download

MIT

The Requires

  • hhvm >=3.5.0

 

The Development Requires

by Isaac Leinweber

17/05 2015

0.2.0

0.2.0.0

Command Line Input/Output for Hack.

  Sources   Download

MIT

The Requires

  • hhvm >=3.5.0

 

The Development Requires

by Isaac Leinweber

19/03 2015

0.1.1

0.1.1.0

Command Line Input/Output for Hack.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Isaac Leinweber

17/03 2015

0.1.0

0.1.0.0

Command Line Input/Output for Hack.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Isaac Leinweber