An open API service indexing awesome lists of open source software.

https://github.com/phore/phore-cli-tools

cli tools
https://github.com/phore/phore-cli-tools

Last synced: 5 months ago
JSON representation

cli tools

Awesome Lists containing this project

README

          

# Phore Cli Helper

Boilerplate CLI Tool

## Example

- [Example executable](doc/exampleExec);

### The Main Command

```php
class MainCmd extends PhoreAbstractMainCmd
{

public function invoke(CliContext $context)
{
$opts = $context->getOpts("i:");

$context->dispatchMap([
"import" => new ImportCmd(),
"search" => new SearchCmd()
], $opts);
}
}
```

### The Subcommand

```php
class SearchCmd extends PhoreAbstractCmd
{

public function invoke(CliContext $context)
{
$opts = $context->getOpts();
$context->ask("Do you want to continue?");

}
}
```